# Gitee — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and explore Gitee repositories by category, view repository metadata and contents, and discover projects from specific users. Access commit history, file structures, and repository details all in one place.

**Category:** Developer Tools | **Website:** [gitee.com/](https://gitee.com/) | **Docs:** [parse.bot/marketplace/468fc2fc-26f3-4868-ae86-fbb6ad94860f/gitee-com-api](https://parse.bot/marketplace/468fc2fc-26f3-4868-ae86-fbb6ad94860f/gitee-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_repository

Fetch full details of a single repository by owner and repo name. Returns comprehensive metadata including stars, forks, language, project labels, namespace information, license, and timestamps. The response includes the full owner/assigner user objects and project membership details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner (user or organization) path. |
| `repo` | string | Yes | Repository name path. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/get_repository \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","repo":"<string>"}'
```

### get_repository_type

Retrieve classification fields for a repository, including its category labels, GVP (Gitee Most Valuable Project) status, and recommendation status. The project_labels array may be empty for repositories without configured labels.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner (user or organization) path. |
| `repo` | string | Yes | Repository name path. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/get_repository_type \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","repo":"<string>"}'
```

### get_user

Get public profile information for a Gitee user including follower counts, bio, public repository count, and contact information. Returns 404 for non-existent usernames.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | Gitee username. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/get_user \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"<string>"}'
```

### list_repo_commits

List commits for a repository with pagination. Returns array of commit objects including SHA, author, committer, and message. Ordered by date descending (newest first).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner. |
| `page` | integer | No | Page number. |
| `repo` | string | Yes | Repository name. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/list_repo_commits \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","page":"<integer>","repo":"<string>"}'
```

### list_repo_contents

List files and directories in a repository path. Returns array of content objects with type (dir or file), name, path, SHA, and URLs. Omitting path returns the root directory contents.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner. |
| `path` | string | No | Directory path within the repository. Omitting returns the root directory contents. |
| `repo` | string | Yes | Repository name. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/list_repo_contents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","path":"<string>","repo":"<string>"}'
```

### list_user_repos

List public repositories for a specific user. Returns paginated array of repository objects with full metadata including stars, forks, language, and timestamps.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number. |
| `per_page` | integer | No | Results per page (max 100). |
| `username` | string | Yes | Gitee username. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/list_user_repos \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","per_page":"<integer>","username":"<string>"}'
```

### search_repositories

Search for repositories by keyword using Gitee's search service. Returns paginated results with metadata including star counts, languages, and descriptions. At least one of 'query' or 'name' must be provided.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | No | Filter by repository name. When provided alongside query, both terms are combined. When provided alone, searches specifically for repositories matching that name (e.g. "agent"). |
| `page` | integer | No | Page number. |
| `per_page` | integer | No | Results per page. |
| `query` | string | No | General search keyword matching repository title, description, and content. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gitee-com-api-468fc2fc/search_repositories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>","page":"<integer>","per_page":"<integer>","query":"<string>"}'
```
