What you get#
Onekey exposes Codeberg as 16 endpoints behind one API key: 5 endpoints return one record (data is an object) and 11 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 Codeberg also works for the rest of the developer platforms category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
branches | Branches of a Codeberg repository. | owner*, repo* | 5 | stable |
commits | Recent commits of a Codeberg repository. | owner*, repo* | 5 | stable |
issue | One issue of a Codeberg repository. | owner*, repo*, number* | 1 | stable |
issues | Recent issues of a Codeberg repository. | owner*, repo* | 5 | stable |
labels | Labels of a Codeberg repository. | owner*, repo* | 5 | stable |
org | Codeberg organisation profile. | org* | 1 | stable |
org_repos | Public repositories of a Codeberg organisation. | org* | 5 | stable |
pulls | Recent pull requests of a Codeberg repository. | owner*, repo* | 5 | stable |
releases | Releases of a Codeberg repository. | owner*, repo* | 5 | stable |
repo | Codeberg repository metadata. | owner*, repo* | 1 | stable |
search_repos | Search Codeberg repositories. | q* | 5 | stable |
search_users | Search Codeberg users and organisations. | q* | 5 | stable |
tags | Tags of a Codeberg repository. | owner*, repo* | 5 | stable |
topics | Topics of a Codeberg repository. | owner*, repo* | 1 | stable |
user | Codeberg user profile. | login* | 1 | stable |
user_repos | Public repositories of a Codeberg user. | login* | 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 codeberg.issue (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/codeberg/issue?owner=forgejo&repo=forgejo&number=1" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from Codeberg, with the same names as on every other platform. The count is how many of its 16 mapped endpoints return the field; a field the source lacks is null, never missing. 7 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
author.username | string | 12 |
content.text | string | 8 |
author.avatarUrl | URL | 7 |
content.id | string | 6 |
entity.name | string | 6 |
content.createdAt | ISO 8601 date | 5 |
content.title | string | 5 |
content.url | URL | 5 |
entity.description | string | 5 |
entity.id | string | 5 |
entity.updatedAt | ISO 8601 date | 5 |
author.displayName | string | 4 |
entity.createdAt | ISO 8601 date | 4 |
entity.language | string | 4 |
entity.stats.forks | integer | 4 |
entity.stats.openIssues | integer | 4 |
entity.stats.stars | integer | 4 |
entity.stats.watchers | integer | 4 |
entity.url | URL | 4 |
package.archived | boolean | 4 |
package.defaultBranch | string | 4 |
author.id | string | 3 |
content.state | string | 3 |
content.updatedAt | ISO 8601 date | 3 |
engagement.comments | integer | 3 |
author.location | string | 2 |
author.url | URL | 2 |
author.createdAt | ISO 8601 date | 1 |
author.followers | integer | 1 |
author.following | integer | 1 |
author.website | URL | 1 |
entity.tags | list of strings | 1 |
The full schema is in Unified schema.
Pricing#
Codeberg 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.