---
title: "GitHub Activity API"
method: GET
path: "/v1/github/activity"
tags: ["GitHub"]
---

# GitHub Activity API

`GET /v1/github/activity`

## Request

- Base URL: `https://api.captapi.com`
- URL: `https://api.captapi.com/v1/github/activity`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Public events with typed payload (Push commits/ref, PR/issue action) — 90-event ceiling.

Recent public events from /users/{login}/events/public with a normalized payload per type: PushEvent → ref, size, commits[{sha,message}]; PullRequestEvent → action + PR fields; IssuesEvent → action + issue fields. actor is omitted (same as username). GitHub caps this feed at 90 events (~90 days) — eventCeiling is echoed and pagination stops there (limit max 90). Opaque nextCursor from the Link header. Not a contribution graph — use github/contributions for the heatmap.

Docs: https://captapi.com/apis/github-activity

## Query parameters

- `username` string, required
- `limit` integer
- `cursor` string
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `username` string: Account username / handle.
    - `eventCeiling` integer: Hard cap of 90 — GitHub's /users/{u}/events/public limit. hasMore is false once reached.
    - `totalReturned` integer: Number of items returned in this response.
    - `nextCursor` string: Opaque Link-header cursor. Pagination stops at eventCeiling.
    - `hasMore` boolean: Whether more results are available beyond this page. When true, pass nextCursor to fetch the next page.
    - `events` object[]
      - `id` string: Id of this events item.
      - `type` string: GitHub event enum: PushEvent, PullRequestEvent, IssuesEvent, CreateEvent, WatchEvent, ForkEvent, …
      - `repo` string: owner/name of the repository the event targets.
      - `repoUrl` string: Repo url URL.
      - `payload` object: Type-specific details — PushEvent: ref/size/commits[]; PullRequestEvent/IssuesEvent: action + entity fields.
        - `ref` string
        - `head` string
        - `before` string
        - `size` integer
        - `distinctSize` integer
        - `commits` object[]
          - `sha` string
          - `message` string
          - `authorName` string
          - `authorEmail` string
          - `distinct` boolean
        - `action` string
        - `number` integer
        - `title` string
        - `url` string
        - `state` string
      - `createdAt` string: Creation date (ISO 8601).
      - `public` boolean: Public. Example: true.

## Other responses

- `400`: Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.
- `401`: Missing, invalid or revoked API key. Not billed.
- `402`: Not enough credits for this request. Not billed.
- `404`: The resource does not exist or is not public. Not billed.
- `422`: A required parameter is missing or has the wrong type. Not billed.
- `429`: Rate limit reached. Wait for Retry-After seconds. Not billed.
- `502`: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.

---

[API](https://skmtc.dev/captapi/apis/captapi-api.md) · [All operations](https://skmtc.dev/captapi/apis/captapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/captapi/apis/captapi-api/revisions/c9b9ac5ff1bd?raw)
