# GitHub API

> Make use of GitHub repositories, code and user info programmatically.

GitHub is a development API from github.com. Requests are authenticated with OAuth. It is served over HTTPS and allows browser requests (CORS). Its OpenAPI description documents 1043 endpoints.

## At a glance

- Category: [Development](https://www.openparable.com/apis/category/development)
- Provider: github.com
- Authentication: OAuth
- HTTPS: Yes
- CORS: Yes
- Base URL: https://api.github.com
- Documentation: https://docs.github.com/en/free-pro-team@latest/rest
- OpenAPI description: https://api.apis.guru/v2/specs/github.com/github.ae/1.1.4/openapi.json
- Version: 1.1.4
- Specification updated: 2023-02-15

## Example request

```bash
curl -X GET "https://api.github.com/" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Endpoints

- `GET /` — GitHub API Root
- `GET /app` — Get the authenticated app
- `POST /app-manifests/{code}/conversions` — Create a GitHub App from a manifest
- `GET /app/hook/config` — Get a webhook configuration for an app
- `PATCH /app/hook/config` — Update a webhook configuration for an app
- `GET /app/hook/deliveries` — List deliveries for an app webhook
- `GET /app/hook/deliveries/{delivery_id}` — Get a delivery for an app webhook
- `POST /app/hook/deliveries/{delivery_id}/attempts` — Redeliver a delivery for an app webhook
- `GET /app/installations` — List installations for the authenticated app
- `GET /app/installations/{installation_id}` — Get an installation for the authenticated app
- `DELETE /app/installations/{installation_id}` — Delete an installation for the authenticated app
- `POST /app/installations/{installation_id}/access_tokens` — Create an installation access token for an app
- `PUT /app/installations/{installation_id}/suspended` — Suspend an app installation
- `DELETE /app/installations/{installation_id}/suspended` — Unsuspend an app installation
- `DELETE /applications/{client_id}/grant` — Delete an app authorization
- `POST /applications/{client_id}/token` — Check a token
- `PATCH /applications/{client_id}/token` — Reset a token
- `DELETE /applications/{client_id}/token` — Delete an app token
- `POST /applications/{client_id}/token/scoped` — Create a scoped access token
- `GET /apps/{app_slug}` — Get an app
- `GET /codes_of_conduct` — Get all codes of conduct
- `GET /codes_of_conduct/{key}` — Get a code of conduct
- `GET /emojis` — Get emojis
- `GET /enterprises/{enterprise}/dependabot/alerts` — List Dependabot alerts for an enterprise
- `GET /enterprises/{enterprise}/secret-scanning/alerts` — List secret scanning alerts for an enterprise
- `GET /events` — List public events
- `GET /feeds` — Get feeds
- `GET /gists` — List gists for the authenticated user
- `POST /gists` — Create a gist
- `GET /gists/public` — List public gists
- `GET /gists/starred` — List starred gists
- `GET /gists/{gist_id}` — Get a gist
- `PATCH /gists/{gist_id}` — Update a gist
- `DELETE /gists/{gist_id}` — Delete a gist
- `GET /gists/{gist_id}/comments` — List gist comments
- `POST /gists/{gist_id}/comments` — Create a gist comment
- `GET /gists/{gist_id}/comments/{comment_id}` — Get a gist comment
- `PATCH /gists/{gist_id}/comments/{comment_id}` — Update a gist comment
- `DELETE /gists/{gist_id}/comments/{comment_id}` — Delete a gist comment
- `GET /gists/{gist_id}/commits` — List gist commits
- `GET /gists/{gist_id}/forks` — List gist forks
- `POST /gists/{gist_id}/forks` — Fork a gist
- `GET /gists/{gist_id}/star` — Check if a gist is starred
- `PUT /gists/{gist_id}/star` — Star a gist
- `DELETE /gists/{gist_id}/star` — Unstar a gist
- `GET /gists/{gist_id}/{sha}` — Get a gist revision
- `GET /gitignore/templates` — Get all gitignore templates
- `GET /gitignore/templates/{name}` — Get a gitignore template
- `GET /installation/repositories` — List repositories accessible to the app installation
- `DELETE /installation/token` — Revoke an installation access token
- `GET /issues` — List issues assigned to the authenticated user
- `GET /licenses` — Get all commonly used licenses
- `GET /licenses/{license}` — Get a license
- `POST /markdown` — Render a Markdown document
- `POST /markdown/raw` — Render a Markdown document in raw mode
- `GET /marketplace_listing/accounts/{account_id}` — Get a subscription plan for an account
- `GET /marketplace_listing/plans` — List plans
- `GET /marketplace_listing/plans/{plan_id}/accounts` — List accounts for a plan
- `GET /marketplace_listing/stubbed/accounts/{account_id}` — Get a subscription plan for an account (stubbed)
- `GET /marketplace_listing/stubbed/plans` — List plans (stubbed)
- `GET /marketplace_listing/stubbed/plans/{plan_id}/accounts` — List accounts for a plan (stubbed)
- `GET /meta` — Get GitHub meta information
- `GET /networks/{owner}/{repo}/events` — List public events for a network of repositories
- `GET /notifications` — List notifications for the authenticated user
- `PUT /notifications` — Mark notifications as read
- `GET /notifications/threads/{thread_id}` — Get a thread
- `PATCH /notifications/threads/{thread_id}` — Mark a thread as read
- `GET /notifications/threads/{thread_id}/subscription` — Get a thread subscription for the authenticated user
- `PUT /notifications/threads/{thread_id}/subscription` — Set a thread subscription
- `DELETE /notifications/threads/{thread_id}/subscription` — Delete a thread subscription
- `GET /octocat` — Get Octocat
- `GET /organizations` — List organizations
- `GET /orgs/{org}` — Get an organization
- `PATCH /orgs/{org}` — Update an organization
- `GET /orgs/{org}/actions/cache/usage` — Get GitHub Actions cache usage for an organization
- `GET /orgs/{org}/actions/cache/usage-by-repository` — List repositories with GitHub Actions cache usage for an organization
- `GET /orgs/{org}/actions/oidc/customization/sub` — Get the customization template for an OIDC subject claim for an organization
- `PUT /orgs/{org}/actions/oidc/customization/sub` — Set the customization template for an OIDC subject claim for an organization
- `GET /orgs/{org}/actions/permissions` — Get GitHub Actions permissions for an organization
- `PUT /orgs/{org}/actions/permissions` — Set GitHub Actions permissions for an organization
- `GET /orgs/{org}/actions/permissions/repositories` — List selected repositories enabled for GitHub Actions in an organization
- `PUT /orgs/{org}/actions/permissions/repositories` — Set selected repositories enabled for GitHub Actions in an organization
- `PUT /orgs/{org}/actions/permissions/repositories/{repository_id}` — Enable a selected repository for GitHub Actions in an organization
- `DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}` — Disable a selected repository for GitHub Actions in an organization
- `GET /orgs/{org}/actions/permissions/selected-actions` — Get allowed actions and reusable workflows for an organization
- `PUT /orgs/{org}/actions/permissions/selected-actions` — Set allowed actions and reusable workflows for an organization
- `GET /orgs/{org}/actions/permissions/workflow` — Get default workflow permissions for an organization
- `PUT /orgs/{org}/actions/permissions/workflow` — Set default workflow permissions for an organization
- `GET /orgs/{org}/actions/required_workflows` — List required workflows
- `POST /orgs/{org}/actions/required_workflows` — Create a required workflow
- `GET /orgs/{org}/actions/required_workflows/{required_workflow_id}` — Get a required workflow
- `PATCH /orgs/{org}/actions/required_workflows/{required_workflow_id}` — Update a required workflow
- `DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}` — Delete a required workflow
- `GET /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories` — List selected repositories for a required workflow
- `PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories` — Sets repositories for a required workflow
- `PUT /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}` — Add a repository to a required workflow
- `DELETE /orgs/{org}/actions/required_workflows/{required_workflow_id}/repositories/{repository_id}` — Remove a selected repository from required workflow
- `GET /orgs/{org}/actions/runners` — List self-hosted runners for an organization
- `GET /orgs/{org}/actions/runners/downloads` — List runner applications for an organization
- `POST /orgs/{org}/actions/runners/registration-token` — Create a registration token for an organization

## Questions

### Does the GitHub API need an API key?

Yes. The GitHub API uses OAuth authentication; the documentation explains how to get credentials.

### Can I call the GitHub API from the browser?

Yes. The GitHub API sends CORS headers, so a web page can call it directly with fetch().

### Does the GitHub API support HTTPS?

Yes, the GitHub API is served over HTTPS.

### How many endpoints does the GitHub API have?

Its OpenAPI description lists 1043 endpoints in version 1.1.4. The first 100 are shown on this page.

### What are alternatives to the GitHub API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

## Similar development APIs

- [Cloudflare](https://www.openparable.com/apis/cloudflare): Manage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
- [Azure DevOps](https://www.openparable.com/apis/azure-devops): The Azure DevOps basic components of a REST API request/response pair
- [IPify](https://www.openparable.com/apis/ipify): A simple IP Address API
- [App Store Connect API](https://www.openparable.com/apis/app-store-connect): The data structure that represents an app store connect api resource.
- [StackExchange](https://www.openparable.com/apis/stackexchange): Q&A forum for developers
- [IPinfo](https://www.openparable.com/apis/ipinfo): Another simple IP Address API
- [IBM Text to Speech](https://www.openparable.com/apis/ibm-text-to-speech): Convert text to speech
- [SiteIntel](https://www.openparable.com/apis/siteintel): Extract metadata, tech stack, emails, and screenshots from any URL
- [DigitalOcean Status](https://www.openparable.com/apis/digitalocean-status): Status of all DigitalOcean services
- [Netlify](https://www.openparable.com/apis/netlify): Netlify is a hosting service for the programmable web
- [Docker Hub](https://www.openparable.com/apis/docker-hub): Interact with Docker Hub
- [MineSkin API](https://www.openparable.com/apis/mineskin): Client implementations: Java: https://github.com/InventivetalentDev/MineskinClient NodeJS: https://github.com/InventivetalentDev/mineskin-client Examples: https://github.com/MineSkin/examples

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/github (OpenParable). Cite the canonical URL above.
