Go client library for accessing the GitHub v3 REST API, with typed services for repos, orgs, issues, and more.
octokit/octokit.js
The all-in-one GitHub SDK for Browsers, Node.js, and Deno, combining REST, GraphQL, GitHub App, webhook, and OAuth clients in one package.
- Stars
- 7,874
- Forks
- 1,287
- Open issues
- 55
- Last commit
- 9 days ago
What is it?
octokit.js is the `octokit` package that bundles the main Octokit libraries for calling GitHub's platform APIs from JavaScript and TypeScript. The API client sends REST requests (via `octokit.rest.*` methods or `octokit.request`) and GraphQL queries, with built-in authentication, retries, and rate-limit throttling.
The package also includes an App client for GitHub Apps, installation tokens, webhook handling and verification, and OAuth login flows. A `createNodeMiddleware` helper provides ready-made routes for receiving webhooks and handling OAuth redirects in Node's http server or Express. An Action client entry is listed as pending.
The SDK runs in modern browsers, Node.js (18 or higher for native fetch), and Deno, and ships with TypeScript declarations. Its modules can also be installed separately if only part of the functionality is needed.
Key features
- 01Calls GitHub REST and GraphQL APIs through one client.
- 02Includes authentication strategies for tokens and GitHub Apps.
- 03Handles request retries and rate-limit throttling by default.
- 04Provides pagination helpers for REST and GraphQL results.
- 05Receives and verifies webhooks, and handles OAuth flows, via a Node middleware.
- 06Ships TypeScript declarations and runs in browsers, Node.js, and Deno.
Use cases
- Building a bot or automation that creates issues, comments, or pull requests.
- Writing a GitHub App that reacts to webhook events on installed repositories.
- Adding GitHub OAuth login to a web application.
- Querying GitHub data with GraphQL from a frontend or Node.js service.
Quick start
- 1
Install the octokit package with npm
npm install octokit - 2
Import Octokit and call the GitHub API with a personal access token
Things to know
- Requires Node 18 or higher unless you supply your own fetch implementation.
- Node.js does not use standard proxy environment variables by default; a custom fetch with a proxy agent is needed.
- Using it with Node's conditional exports requires setting moduleResolution and module to node16 in tsconfig.json.
In collections
Topics
FAQ
- What is octokit.js?
- The all-in-one GitHub SDK for Browsers, Node.js, and Deno, combining REST, GraphQL, GitHub App, webhook, and OAuth clients in one package. octokit.js is the `octokit` package that bundles the main Octokit libraries for calling GitHub's platform APIs from JavaScript and TypeScript. The API client sends REST requests (via `octokit.rest.*` methods or `octokit.request`) and GraphQL queries, with built-in authentication, retries, and rate-limit throttling.
- Is octokit.js free to use? What license does it have?
- octokit.js is open source under the MIT license. Check the license terms before using it in commercial products.
- Is octokit.js still maintained?
- Actively maintained. The last commit to octokit.js was on Oct 28, 2026.
- What can I use octokit.js for?
- Building a bot or automation that creates issues, comments, or pull requests. Writing a GitHub App that reacts to webhook events on installed repositories. Adding GitHub OAuth login to a web application. Querying GitHub data with GraphQL from a frontend or Node.js service.
- How do I install octokit.js?
- Install the octokit package with npm: npm install octokit Import Octokit and call the GitHub API with a personal access token
- Where can I get octokit.js?
- The source code and installation instructions are on GitHub: https://github.com/octokit/octokit.js
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source platform for building and running product integrations with 1,000+ APIs, handling OAuth, token refresh and API requests.
Command-line tool that generates API client SDKs, server stubs and HTML docs from an OpenAPI/Swagger definition.
A terminal-based HTTP API client, an alternative to Postman and Insomnia, with requests stored as plain YAML files.
Offline, Git-native API client that stores requests, tests and docs as plain-text .void Markdown files.
A RESTful and GraphQL API serving structured data about Pokémon, their species, moves, types and more.