# Decomp — 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.

> Track decompilation projects and monitor progress on decomp.me by viewing recent scratches, diving into project details, exploring user contributions, and checking overall site statistics. Perfect for staying updated on code decompilation work and community activity across the platform.

**Category:** Developer Tools | **Website:** [decomp.me/](https://decomp.me/) | **Docs:** [parse.bot/marketplace/66d7b08f-fc32-45a0-ac72-7cc284db2b9d/decomp-me-api](https://parse.bot/marketplace/66d7b08f-fc32-45a0-ac72-7cc284db2b9d/decomp-me-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-decomp-me-api-66d7b08f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_recent_scratches

Retrieve the latest decompilation projects and site activity. Returns a paginated list of scratch projects sorted by the specified ordering. Each result is a summary containing slug, owner, name, platform, compiler, score, and timestamps. Paginates via cursor.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cursor` | string | No | Opaque pagination cursor for fetching subsequent pages. |
| `has_owner` | string | No | Filter for scratches with a registered owner. Accepted values: 'true', 'false'. |
| `ordering` | string | No | Sort order for results. |
| `page_size` | string | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-decomp-me-api-66d7b08f/get_recent_scratches \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cursor":"<string>","has_owner":"<string>","ordering":"<string>","page_size":"<string>"}'
```

### get_scratch_detail

Retrieve full details for a specific scratch project, including source code, context, compiler flags, and version family history. The family array shows all related versions of this scratch. A separate round-trip fetches family data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Unique alphanumeric identifier for the scratch (e.g. 'ypP2f'). Obtainable from get_recent_scratches results[*].slug or get_user_contributions results[*].slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-decomp-me-api-66d7b08f/get_scratch_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### get_stats

Retrieve site-wide statistics including total assembly instruction count, scratch count, and registered GitHub user count. No parameters required. Returns a single object with aggregate counts.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-decomp-me-api-66d7b08f/get_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_user_contributions

Retrieve all contributions (scratches) for a specific user. Returns a paginated list of the user's scratch projects sorted by the specified ordering. Paginates via cursor.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cursor` | string | No | Opaque pagination cursor for fetching subsequent pages. |
| `ordering` | string | No | Sort order for results. |
| `page_size` | string | No | Number of results per page. |
| `username` | string | Yes | GitHub/decomp.me username (e.g. 'sonicdcer'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-decomp-me-api-66d7b08f/get_user_contributions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cursor":"<string>","ordering":"<string>","page_size":"<string>","username":"<string>"}'
```
