What you get#
Onekey exposes GitHub as 58 endpoints behind one API key: 18 endpoints return one record (data is an object) and 40 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for GitHub also works for the rest of the developer platforms category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
advisories | Global GitHub security advisories (reviewed), filterable by ecosystem. | ecosystem, cursor | 5 | stable |
advisories_graphql | GitHub security advisories via GraphQL (requires a token). | - | 5 | beta |
advisory | One GitHub security advisory by GHSA id. | ghsa* | 1 | stable |
branches | Branches of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
commit | One GitHub commit with change stats (sha or ref). | owner*, repo*, ref* | 1 | stable |
commits | Recent commits of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
community | Community health profile of a GitHub repository. | owner*, repo* | 1 | stable |
contributors | Top contributors of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
forks | Recent forks of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
gist | One public GitHub gist. | id* | 1 | stable |
issue | One GitHub issue. | owner*, repo*, number* | 1 | stable |
issue_comments | Comments of a GitHub issue or pull request. | owner*, repo*, number*, cursor | 1 | stable |
issues | Recent issues (and PRs) of a GitHub repository. | owner*, repo*, cursor | 1 | stable |
labels | Labels of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
languages | Language breakdown (bytes) of a GitHub repository. | owner*, repo* | 1 | stable |
latest_release | Latest published release of a GitHub repository. | owner*, repo* | 1 | stable |
license | Detected license of a GitHub repository. | owner*, repo* | 1 | stable |
license_info | Details of one open-source license (permissions, conditions, limitations). | key* | 1 | stable |
licenses | Common open-source licenses known to GitHub. | cursor | 5 | stable |
milestones | Milestones of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
org | GitHub organisation profile. | org* | 1 | stable |
org_events | Recent public events of a GitHub organisation. | org*, cursor | 5 | stable |
org_members | Public members of a GitHub organisation. | org*, cursor | 5 | stable |
org_repos | Public repositories of a GitHub organisation (most recently pushed). | org*, cursor | 5 | stable |
profile | Fetch a GitHub user's public profile. | username* | 1 | stable |
public_gists | Most recent public GitHub gists. | cursor | 5 | stable |
pull | One GitHub pull request with change stats. | owner*, repo*, number* | 1 | stable |
pull_commits | Commits of a GitHub pull request. | owner*, repo*, number*, cursor | 5 | stable |
pull_files | Files changed by a GitHub pull request. | owner*, repo*, number*, cursor | 5 | stable |
pulls | Recent pull requests of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
readme | README file descriptor of a GitHub repository (name, path, links). | owner*, repo* | 1 | stable |
release_by_tag | A GitHub release by tag name. | owner*, repo*, tag* | 1 | stable |
releases | Releases of a GitHub repository. | owner*, repo*, cursor | 1 | stable |
repo | Full metadata of a GitHub repository. | owner*, repo* | 1 | stable |
repo_dossier | Project dossier of a repository: stars, forks, watchers, open issues, license, topics, language, activity dates. | owner*, repo* | 1 | stable |
repo_events | Recent public events of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
repos | List a GitHub user's most recently updated public repositories. | username*, cursor | 1 | stable |
search | Search GitHub users by keyword. | q*, cursor | 1 | stable |
search_code | Search code across GitHub (requires a token). | q*, cursor | 5 | beta |
search_commits | Search GitHub commits. | q*, cursor | 5 | stable |
search_issues | Search GitHub issues and pull requests. | q*, cursor | 5 | stable |
search_repos | Search GitHub repositories (most starred first). | q*, cursor | 5 | stable |
search_topics | Search GitHub topics. | q*, cursor | 5 | stable |
stargazers | Recent stargazers of a GitHub repository (requires a token). | owner*, repo*, cursor | 5 | beta |
subscribers | Watchers of a GitHub repository (requires a token). | owner*, repo*, cursor | 5 | beta |
tags | Tags of a GitHub repository. | owner*, repo*, cursor | 5 | stable |
top_issues | Most-reacted open issues of a repository (feature requests and complaints ranked by reactions). | owner*, repo* | 1 | stable |
topics | Topics of a GitHub repository. | owner*, repo* | 1 | stable |
user_events | Recent public events of a GitHub user. | username*, cursor | 5 | stable |
user_followers | Followers of a GitHub user. | username*, cursor | 5 | stable |
user_following | Accounts a GitHub user follows. | username*, cursor | 5 | stable |
user_gists | Public gists of a GitHub user. | username*, cursor | 5 | stable |
user_orgs | Public organisations of a GitHub user. | username* | 5 | stable |
user_profile_velocity | A GitHub user's contribution activity for a year (total contributions). | handle* | 2 | beta needs a pack |
user_social_accounts | Social accounts linked to a GitHub profile. | username* | 5 | stable |
user_starred | Repositories starred by a GitHub user. | username*, cursor | 5 | stable |
workflow_runs | Recent GitHub Actions runs of a repository. | owner*, repo*, cursor | 5 | stable |
workflows | GitHub Actions workflows of a repository. | owner*, repo* | 5 | stable |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls github.advisory (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/github/advisory?ghsa=GHSA-9wx4-h78v-vm56" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from GitHub, with the same names as on every other platform. The count is how many of its 58 mapped endpoints return the field; a field the source lacks is null, never missing. 42 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
author.username | string | 39 |
content.id | string | 28 |
content.createdAt | ISO 8601 date | 25 |
content.url | URL | 25 |
content.text | string | 23 |
entity.name | string | 19 |
content.title | string | 18 |
engagement.comments | integer | 16 |
author.avatarUrl | URL | 15 |
author.id | string | 11 |
author.url | URL | 10 |
entity.description | string | 10 |
entity.id | string | 10 |
entity.url | URL | 10 |
content.state | string | 9 |
content.updatedAt | ISO 8601 date | 9 |
entity.updatedAt | ISO 8601 date | 9 |
package.license | string | 9 |
engagement.likes | integer | 8 |
entity.stats.openIssues | integer | 7 |
entity.tags | list of strings | 7 |
author.displayName | string | 6 |
author.type | string | 6 |
entity.createdAt | ISO 8601 date | 6 |
entity.language | string | 6 |
entity.stats.forks | integer | 6 |
entity.stats.stars | integer | 6 |
entity.stats.watchers | integer | 6 |
package.defaultBranch | string | 6 |
package.homepageUrl | URL | 6 |
package.pushedAt | ISO 8601 date | 6 |
package.archived | boolean | 5 |
author.followers | integer | 2 |
author.following | integer | 2 |
author.createdAt | ISO 8601 date | 1 |
author.location | string | 1 |
author.verified | boolean | 1 |
author.website | URL | 1 |
engagement.shares | integer | 1 |
engagement.votes | integer | 1 |
The full schema is in Unified schema.
Pricing#
GitHub calls cost 1 to 5 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.