Profiles and discovery
Public discovery of public repositories. Optional auth; only public repositories are ever returned.
Authorization
bearerAuth In: header
Query Parameters
Free-text query matched against repository name and description.
One of: stars, forks, updated, created, alpha. Empty for relevance.
asc or desc.
Match the query against repository topics only.
Include archived repositories. Defaults to false.
One-indexed page. Handler clamps values below 1 to 1.
int641 <= value1Items per page. Handler defaults to 30 and clamps above 100.
int641 <= value <= 10030Base64 cursor encoding page and per_page; overrides page/per_page when valid.
Response Body
application/json
curl -X GET "https://example.com/v1/explore/repositories?q=abc123&sort=abc123&order=abc123&topic_only=false&include_archived=false&page=2&per_page=2&cursor=abc123""abc123"Public discovery of repositories trending by stars gained within a rolling window. Optional auth; only public repositories are ever returned. Falls back to all-time most-starred when recent activity is insufficient.
Authorization
bearerAuth In: header
Query Parameters
Rolling trending window in days. Handler defaults to 7.
int64Maximum repositories to return. Handler defaults to 30.
int64Response Body
application/json
curl -X GET "https://example.com/v1/explore/trending?window_days=1&limit=1""abc123"Public discovery of users. Optional auth.
Authorization
bearerAuth In: header
Query Parameters
Free-text keyword matched against username, full name, and email.
Forgejo user sort key (newest, oldest, alphabetically, reversealphabetically).
One-indexed page. Handler clamps values below 1 to 1.
int641 <= value1Items per page. Handler defaults to 30 and clamps above 100.
int641 <= value <= 10030Base64 cursor encoding page and per_page; overrides page/per_page when valid.
Response Body
application/json
curl -X GET "https://example.com/v1/explore/users?q=abc123&sort=abc123&page=2&per_page=2&cursor=abc123""abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthResponse Body
application/json
curl -X GET "https://example.com/v1/profiles/aa""abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthResponse Body
application/json
curl -X GET "https://example.com/v1/profiles/aa/contributions""abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login of the user to follow or unfollow.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/profiles/aa/follow" \ -H "Content-Type: application/json" \ -d '{ "following": false, "targetId": 2 }'"abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthQuery Parameters
One-indexed page. Handler clamps values below 1 to 1.
int641 <= value1Items per page. Handler defaults to 30 and clamps above 100.
int641 <= value <= 10030Response Body
application/json
curl -X GET "https://example.com/v1/profiles/aa/followers?page=2&per_page=2""abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthQuery Parameters
One-indexed page. Handler clamps values below 1 to 1.
int641 <= value1Items per page. Handler defaults to 30 and clamps above 100.
int641 <= value <= 10030Response Body
application/json
curl -X GET "https://example.com/v1/profiles/aa/following?page=2&per_page=2""abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthResponse Body
application/json
curl -X GET "https://example.com/v1/profiles/aa/pinned-repositories""abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/v1/profiles/aa/pinned-repositories" \ -H "Content-Type: application/json" \ -d '{ "repositories": [ "abc123" ] }'"abc123"Authorization
bearerAuth In: header
Path Parameters
Forgejo login.
1 <= lengthQuery Parameters
One-indexed page. Handler clamps values below 1 to 1.
int641 <= value1Items per page. Handler defaults to 30 and clamps above 100.
int641 <= value <= 10030Base64 cursor encoding page and per_page; overrides page/per_page when valid.
Response Body
application/json
curl -X GET "https://example.com/v1/profiles/aa/repositories?page=2&per_page=2&cursor=abc123""abc123"