Schemas

Contribution Calendar

An account's contributions on each day of a year or the last twelve months: per-day counts, the platform's shade for each day, and the total.

Endpoints

1 endpoint returns contribution calendars on GitHub.

Schema

Every endpoint above returns this object as data. The standard meta comes with every response.

platformstring

Platform ID (github, …).

urlstring uri

The public page that shows this calendar: the account's page, with the period selected where the platform links one (GitHub's year links).

accountobject

The account whose contributions these are; at least its username.

ShowHide 6 child fields
idstringnullable

Platform-native account ID; null when only the handle is known.

usernamestringnullable

Handle without the @; null when the account has none.

display_namestringnullable

Display name shown on the profile.

urlstring urinullable

Canonical profile URL.

avatar_urlstring urinullable

Profile picture URL. Platform CDN URLs can expire within hours.

is_verifiedbooleannullable

Platform verification badge; null where the platform has no badge.

yearintegernullable

The calendar year the period is, when it is one (January 1 to December 31, cut at today for the current year); null when the period is the trailing twelve months.

start_datestring date

First day of the period, YYYY-MM-DD (days[0].date).

end_datestring date

Last day of the period, inclusive, YYYY-MM-DD (the last of days[]); today when the period runs to now: days to come are never listed.

daysobject[]

Every day of the period, oldest first, one per date from start_date to end_date: days without contributions included, with a count of 0.

ShowHide 3 child fields
datestring date

The day, YYYY-MM-DD, as the platform buckets contributions (GitHub: UTC).

levelintegernullable

The shade the platform paints the day, 0 (no contributions) to 4 (its busiest), as it computes it; null when it shows none.

metricsobject

The day's counts; null = the platform did not say, 0 = none.

ShowHide 1 child field
contribution_countintegernullable

Contributions that day as the platform counts them (GitHub: commits, issues, pull requests, reviews, and private ones when the account shows them); 0 when none.

metricsobject

The period's totals; null = the platform did not say.

ShowHide 1 child field
contribution_countintegernullable

Contributions over the whole period, the sum of days[].metrics.contribution_count.

platform_specificobject

Fields only this platform has, under its ID (platform_specific.<platform>); each null when unknown.

ShowHide 1 child field
githubobjectnullable

A GitHub calendar's own fields: its activity overview.

ShowHide 4 child fields
commit_percentintegernullable

Share of the period's contributions that are commits, 0 to 100, as GitHub's activity overview rounds it; null when the account hides its overview.

issue_percentintegernullable

Share that are issues opened, 0 to 100; null when the account hides its overview.

pull_request_percentintegernullable

Share that are pull requests opened, 0 to 100; null when the account hides its overview.

code_review_percentintegernullable

Share that are pull request reviews, 0 to 100; null when the account hides its overview.

approximate_fieldsstring[]

JSON paths of values rounded or capped by the platform. [] when all exact (every platform's counts are exact today).

unknown_fieldsstring[]

JSON paths of lists whose [] means unknown rather than none; days always lists the period, so always [].

Item errors

Besides the request-level errors every endpoint can return, contribution calendar endpoints return:

CodeHTTPRetryMeaningWhat to do
not_found404NoThe item does not exist or was deleted. On GET /v1/requests/{id}/response: the response was not kept (details.reason says why).Check the link or ID. Do not retry.
private_or_unavailable403NoThe item exists but is not public: it is private, age- or region-restricted, or needs a login to view. It shares 403 with forbidden (which is about the key), so branch on the code.Only public items can be fetched. Do not retry.

Last updated