BYTETOOLS

Codeberg (Forgejo) API

Free Codeberg API with no key for public data: repository search, issues, releases and users on the non-profit Git host. Same API as Gitea and Forgejo. Tested.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 20 Aug 2026

What is the Codeberg (Forgejo) API?

The Codeberg API is a free, key-free (for public data) REST API for the non-profit Git hosting platform, providing repository search, issues, pull requests, releases and user data. It implements the Forgejo/Gitea API, so the same code works against any self-hosted instance.

Codeberg is a non-profit, community-funded Git host built on Forgejo, and it is the practical open alternative to GitHub for projects that want independence from a commercial platform.

The real value of learning this API is portability: Forgejo and Gitea share it, so code written against Codeberg works unchanged against any self-hosted Gitea or Forgejo instance by changing the hostname.

Quick facts

Base URL
https://codeberg.org/api/v1
Authentication
Public repository data needs no auth. Private data and writes require a token.
Rate limit
No published hard limit for anonymous reads; be considerate of a non-profit's infrastructure.
Pricing
Free, funded by donations.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the Codeberg (Forgejo) API

Every request below was executed against the live API on 20 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. Search public repositories

GET https://codeberg.org/api/v1/repos/search?limit=1

curl
curl 'https://codeberg.org/api/v1/repos/search?limit=1'
JavaScript (fetch)
const res = await fetch("https://codeberg.org/api/v1/repos/search?limit=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://codeberg.org/api/v1/repos/search?limit=1", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "ok": true,
  "data": [
    {
      "id": 1604031,
      "owner": {
        "id": 1014846,
        "login": "dzw047p001",
        "login_name": "",
        "source_id": 0,
        "full_name": "",
        "email": "dzw047p001@noreply.codeberg.org",
        "avatar_url": "https://codeberg.org/avatars/26dc58d132dd9820bee5ee97097cd918",
        "html_url": "https://codeberg.org/dzw047p001",
        "language": "",
        "is_admin": false,
        "last_login": "0001-01-01T00:00:00Z",
        "created": "2026-04-14T16:59:59+02:00",
        "restricted": false,
        "active": false,
        "prohibit_login": false,
        "location": "",
        "pronouns": "",
        "website": "",
        "description": "",
        "visibility": "public",
        "followers_count": 0,
        "following_count": 0,
        "starred_repos_count": 0,
        "username": "dzw047p001"
      },
      "name": "_",
      "full_name": "dzw047p001/_",
      "description": "",
      "empty": false,
      "private": false,
      "fork": false,
      "template": false,
      "parent": null,
      "mirror": false,
      "size": 8,
      "language": "",
      "languages_url": "https://codeberg.org/api/v1/repos/dzw047p001/_/languages",
      "html_url": "https://codeberg.org/dzw047p001/_",
      "url": "https://codeberg.org/api/v1/repos/dzw047p001/_",
      "link": "",
      "ssh_url": "ssh://git@codeberg.org/dzw047p001/_.git",
      "clone_url": "https://codeberg.org/dzw047p001/_.git",
      "original_url": "",
      "website": "",
      "stars_count": 1,
      "forks_count": 0,
      "watchers_co

Parameters

ParameterTypeRequiredDescription
repos/searchpathOptionalSearch repositories. repos/search
qstringOptionalSearch query. rust
limitintegerOptionalResults per page, max 50. 10
sortstringOptionalalpha, created, updated, size or id. updated
repos/<owner>/<repo>pathOptionalA specific repository. repos/forgejo/forgejo

Response fields

okboolean
Whether the search succeeded.
data[].idinteger
Repository id.
data[].full_namestring
owner/repo.
data[].descriptionstring
Repository description.
data[].stars_count / forks_countinteger
Popularity metrics.
data[].languagestring
Primary language.
data[].updated_atstring
Last update timestamp.
data[].ownerobject
Owning user or organisation.

What you can build with the Codeberg (Forgejo) API

  • Mirror a GitHub-style repository listing from an open host
  • Build tooling that works against self-hosted Gitea or Forgejo
  • Track issues and releases on Codeberg-hosted projects
  • Display project activity on a personal site

Common errors and how to fix them

401

The repository is private.

Fix: Private data requires a personal access token in the Authorization header.

Empty data with ok: true

The search matched nothing.

Fix: Check `ok` and the data array length separately — an empty result is not an error.

Rate limiting

Codeberg is a donation-funded non-profit.

Fix: Cache aggressively; do not treat it like commercial infrastructure.

Codeberg (Forgejo) API — frequently asked questions

Is the Codeberg API free?

Yes, public repository data requires no API key. Codeberg is a donation-funded non-profit, so cache rather than polling aggressively.

Is it the same as the Gitea API?

Yes. Codeberg runs Forgejo, a Gitea fork, so the API is shared. Code written against Codeberg works against any self-hosted Gitea or Forgejo instance by changing the hostname.

How does it compare to the GitHub API?

Similar surface — repositories, issues, pull requests, releases — with a smaller ecosystem. Its advantage is portability to self-hosted instances and independence from a commercial platform.

Do I need a token?

Only for private repositories or write operations. Public reads are anonymous.

Tools that pair with this API

Alternatives to Codeberg (Forgejo) API

If Codeberg (Forgejo) does not fit, these developer & testing apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
GitHub REST APIGitHub REST API with no key for public data: repository details, users, issues, releases and commits. 60 req/hour unauthenticated, 5,000 with a token.No keyYes19 Aug 2026
JSONPlaceholderFree fake REST API for testing and prototyping. Posts, comments, users and todos with full GET, POST, PUT and DELETE support. No key. Real curl examples.No keyYes19 Aug 2026
Postman EchoPostman Echo reflects your HTTP request back as JSON: headers, body, query params and auth. Free, no key, ideal for debugging clients. Real POST example.No keyNo19 Aug 2026
DummyJSONFree fake REST API with realistic products, users, carts, recipes and auth. Supports search, pagination, sorting and POST. No key. Tested GET and POST examples.No keyYes19 Aug 2026
CRAN DBRead any CRAN package's DESCRIPTION file as JSON: version, licence, dependencies, maintainer and full history. No key required. Verified example and field notes.No keyNo21 Aug 2026
crates.ioFree crates.io API with no key: Rust crate metadata, versions, download counts, dependencies and repository links. CORS enabled. Tested curl example.No keyYes19 Aug 2026
All Developer & Testing APIs

Codeberg (Forgejo) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.