# Archive 4plebs — 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 browse archived 4chan threads, posts, and media with filters for username, tripcode, subject, and date ranges. Explore board galleries, view thread replies, and discover random threads from the 4plebs archive.

**Category:** Social Media | **Website:** [archive.4plebs.org/](https://archive.4plebs.org/) | **Docs:** [parse.bot/marketplace/283a9556-a995-4751-9240-22347db77510/archive-4plebs-org-api](https://parse.bot/marketplace/283a9556-a995-4751-9240-22347db77510/archive-4plebs-org-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-archive-4plebs-org-api-283a9556/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_board_gallery

Get the image/media gallery for a board. Returns paginated array of post objects that have media attached, including OCR text and ML-generated descriptions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x) |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_board_gallery \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","page":"<integer>"}'
```

### get_board_index

Get the latest threads on a given board. Returns thread data keyed by thread number, each containing the OP and recent replies. Paginated by page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x, adv, sp, tg, trv, hr, o, f, s4s) |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_board_index \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","page":"<integer>"}'
```

### get_media_info

Get media metadata for a specific post. Returns the media object with dimensions, links, OCR text, and ML descriptions. Posts without media will return an empty object.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x) |
| `post_num` | string | Yes | Post number |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_media_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","post_num":"<string>"}'
```

### get_post

Get a single post by board and post number. Returns full post data including media metadata, poster info, and processed content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x) |
| `post_num` | string | Yes | Post number |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_post \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","post_num":"<string>"}'
```

### get_random_thread

Get a random thread from a board. Follows the board's random redirect to retrieve a full thread with OP and all replies.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x, adv) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_random_thread \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>"}'
```

### get_thread

Get all posts in a specific thread. Returns the OP and all reply posts keyed by post number within a thread-number-keyed wrapper.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x) |
| `thread_num` | string | Yes | Thread number |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_thread \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","thread_num":"<string>"}'
```

### get_thread_replies

Get all replies to a specific thread, excluding the OP. Returns an array of reply post objects.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board` | string | Yes | Board shortname (e.g. pol, tv, x) |
| `thread_num` | string | Yes | Thread number |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/get_thread_replies \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board":"<string>","thread_num":"<string>"}'
```

### list_boards

List all archived boards with their short names, full names, and URLs. Returns the complete set of boards available on the 4plebs archive.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/list_boards \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_by_subject

Search posts by subject/title. Returns OP posts matching the subject string, with pagination and metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `boards` | string | No | Board shortname to restrict search to (e.g. pol) |
| `page` | integer | No | Page number for pagination. |
| `subject` | string | Yes | Subject text to search for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/search_by_subject \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"boards":"<string>","page":"<integer>","subject":"<string>"}'
```

### search_by_tripcode

Search posts by tripcode. Returns posts from any user with the given cryptographic tripcode, with pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `boards` | string | No | Board shortname to restrict search to (e.g. pol) |
| `page` | integer | No | Page number for pagination. |
| `tripcode` | string | Yes | Tripcode to search for (e.g. !Ep8pui8Vw2) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/search_by_tripcode \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"boards":"<string>","page":"<integer>","tripcode":"<string>"}'
```

### search_by_username

Search posts by display name. Returns posts from users matching the given name. Use specific usernames (not 'Anonymous' which is too broad).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `boards` | string | No | Board shortname to restrict search to (e.g. pol) |
| `page` | integer | No | Page number for pagination. |
| `username` | string | Yes | Username (display name) to search for. Specific names like 'moot' work best. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/search_by_username \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"boards":"<string>","page":"<integer>","username":"<string>"}'
```

### search_op_only

Search only original posts (OPs). Equivalent to search_posts with type='op'. Returns paginated OP-only results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `boards` | string | No | Board shortname to restrict search to (e.g. pol) |
| `page` | integer | No | Page number for pagination. |
| `text` | string | Yes | Text to search for in post content |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/search_op_only \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"boards":"<string>","page":"<integer>","text":"<string>"}'
```

### search_posts

Search posts with various filters including text, subject, username, tripcode, date range, post type, and sort order. Returns paginated search results with posts array and metadata including total_found count. At least one search parameter should be provided.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `boards` | string | No | Board shortname to restrict search to (e.g. pol) |
| `end` | string | No | End date filter in YYYY-MM-DD format |
| `order` | string | No | Sort order. Use 'asc' for oldest first. |
| `page` | integer | No | Page number for pagination. |
| `start` | string | No | Start date filter in YYYY-MM-DD format |
| `subject` | string | No | Subject/title to search for |
| `text` | string | No | Text to search for in post content |
| `tripcode` | string | No | Tripcode to search for (e.g. !Ep8pui8Vw2) |
| `type` | string | No | Post type filter. Use 'op' to return only original posts. |
| `username` | string | No | Username (display name) to search for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/search_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"boards":"<string>","end":"<string>","order":"<string>","page":"<integer>","start":"<string>","subject":"<string>","text":"<string>","tripcode":"<string>","type":"<string>","username":"<string>"}'
```

### search_with_date_range

Search posts within a date range. Combines text search with start/end date filters for time-bounded queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `boards` | string | No | Board shortname to restrict search to (e.g. pol) |
| `end` | string | No | End date in YYYY-MM-DD format |
| `page` | integer | No | Page number for pagination. |
| `start` | string | No | Start date in YYYY-MM-DD format |
| `text` | string | No | Text to search for in post content |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-archive-4plebs-org-api-283a9556/search_with_date_range \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"boards":"<string>","end":"<string>","page":"<integer>","start":"<string>","text":"<string>"}'
```
