REST API endpoints for API Insights

Use the REST API to view statistics for API usage in an organization.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

Get route stats by actor

GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}

Get API request count statistics for an actor broken down by route within a specified time frame.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/route-stats/ACTOR_TYPE/ACTOR_ID?min_timestamp=MIN_TIMESTAMP"

Response schema (Status: 200):

Array of objects:

Get subject stats

GET /orgs/{org}/insights/api/subject-stats

Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/subject-stats?min_timestamp=MIN_TIMESTAMP"

Response schema (Status: 200):

Array of objects:

Get summary stats

GET /orgs/{org}/insights/api/summary-stats

Get overall statistics of API requests made within an organization by all users and apps within a specified time frame.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/summary-stats?min_timestamp=MIN_TIMESTAMP"

Response schema (Status: 200):

Get summary stats by user

GET /orgs/{org}/insights/api/summary-stats/users/{user_id}

Get overall statistics of API requests within the organization for a user.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/summary-stats/users/USER_ID?min_timestamp=MIN_TIMESTAMP"

Response schema (Status: 200):

Same response schema as Get summary stats.

Get summary stats by actor

GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}

Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/summary-stats/ACTOR_TYPE/ACTOR_ID?min_timestamp=MIN_TIMESTAMP"

Response schema (Status: 200):

Same response schema as Get summary stats.

Get time stats

GET /orgs/{org}/insights/api/time-stats

Get the number of API requests and rate-limited requests made within an organization over a specified time period.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/time-stats?min_timestamp=MIN_TIMESTAMP&timestamp_increment=TIMESTAMP_INCREMENT"

Response schema (Status: 200):

Array of objects:

Get time stats by user

GET /orgs/{org}/insights/api/time-stats/users/{user_id}

Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/time-stats/users/USER_ID?min_timestamp=MIN_TIMESTAMP&timestamp_increment=TIMESTAMP_INCREMENT"

Response schema (Status: 200):

Same response schema as Get time stats.

Get time stats by actor

GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}

Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/time-stats/ACTOR_TYPE/ACTOR_ID?min_timestamp=MIN_TIMESTAMP&timestamp_increment=TIMESTAMP_INCREMENT"

Response schema (Status: 200):

Same response schema as Get time stats.

Get user stats

GET /orgs/{org}/insights/api/user-stats/{user_id}

Get API usage statistics within an organization for a user broken down by the type of access.
Under normal conditions, you can expect API data to appear within 4–6 hours after making a request. During incidents or periods of unusually high volume, it may take longer to show up.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  "https://api.github.com/orgs/ORG/insights/api/user-stats/USER_ID?min_timestamp=MIN_TIMESTAMP"

Response schema (Status: 200):

Array of objects: