# /fourchan/threads/search

`POST /api/fourchan/threads/search`

Price: 20 credits

List the threads currently live on one 4chan board, stickied threads first and the rest newest bump first, each with its subject, opening-post text, attached file, reply and image counts and a preview of its trailing replies. Narrow by keyword or by minimum reply count

## How to use it

The board's stickied threads head the list whatever their bump time, so the first rows can be years older than the rest — `is_sticky` marks them, and a small `count` may return nothing else. This is the whole live board, not a site-wide search: pick the board first with fourchan/boards/search, because 4chan has no cross-board search of any kind. `query` and `min_reply_count` are applied to that board's threads after they are read, so a term that matches nothing returns an empty list rather than an error. `replies` here is a short trailing preview and `omitted_post_count` says how many were left out — pass the `id` to fourchan/threads for every post. Threads drop off the board within hours, so a thread listed now may already be gone when you fetch it.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `board` (string, required) — Board slug to list, or a 4chan URL containing it (examples: "g", "vrpg", "https://boards.4chan.org/g/"; minLength: 1)
- `count` (integer, required) — Max number of threads to return (min: 1)
- `query` (string, nullable) — Keep only threads whose subject, opening-post text or URL slug contains this text, matched case-insensitively (examples: "linux", "thinkpad"; minLength: 1)
- `min_reply_count` (integer, nullable) — Keep only threads with at least this many replies (examples: 50; min: 0)

## Response

### 200 — Successful Response

- `@type` (string) (default: "FourchanThread")
- `id` (string, required)
- `board` (string, required)
- `url` (string, nullable)
- `alias` (string, nullable)
- `text` (string, nullable)
- `text_html` (string, nullable)
- `created_at` (integer, nullable)
- `last_modified_at` (integer, nullable)
- `archived_at` (integer, nullable)
- `reply_count` (integer, nullable)
- `image_count` (integer, nullable)
- `omitted_post_count` (integer, nullable)
- `omitted_image_count` (integer, nullable)
- `is_sticky` (boolean, nullable)
- `is_closed` (boolean, nullable)
- `is_archived` (boolean, nullable)
- `is_bump_limit_reached` (boolean, nullable)
- `is_image_limit_reached` (boolean, nullable)
- `author_name` (string, nullable)
- `tripcode` (string, nullable)
- `capcode` (string, nullable)
- `poster_id` (string, nullable)
- `country` (string, nullable)
- `country_name` (string, nullable)
- `board_flag` (string, nullable)
- `board_flag_name` (string, nullable)
- `pass_since_year` (integer, nullable)
- `tag` (string, nullable)
- `file` (object, nullable)
  - `@type` (string) (default: "FourchanFile")
  - `name` (string, nullable)
  - `extension` (string, nullable)
  - `url` (string, nullable)
  - `thumbnail` (string, nullable)
  - `width` (integer, nullable)
  - `height` (integer, nullable)
  - `thumbnail_width` (integer, nullable)
  - `thumbnail_height` (integer, nullable)
  - `size` (integer, nullable)
  - `md5` (string, nullable)
  - `is_spoiler` (boolean, nullable)
  - `is_deleted` (boolean, nullable)
  - `has_mobile_variant` (boolean, nullable)
  - `spoiler_id` (integer, nullable)
- `replies` (array) (default: [])
  - `@type` (string) (default: "FourchanPost")
  - `id` (string, required)
  - `board` (string, required)
  - `thread_id` (string, required)
  - `url` (string, nullable)
  - `created_at` (integer, nullable)
  - `text` (string, nullable)
  - `text_html` (string, nullable)
  - `author_name` (string, nullable)
  - `tripcode` (string, nullable)
  - `capcode` (string, nullable)
  - `poster_id` (string, nullable)
  - `country` (string, nullable)
  - `country_name` (string, nullable)
  - `board_flag` (string, nullable)
  - `board_flag_name` (string, nullable)
  - `pass_since_year` (integer, nullable)
  - `file` (object, nullable)
    - `@type` (string) (default: "FourchanFile")
    - `name` (string, nullable)
    - `extension` (string, nullable)
    - `url` (string, nullable)
    - `thumbnail` (string, nullable)
    - `width` (integer, nullable)
    - `height` (integer, nullable)
    - `thumbnail_width` (integer, nullable)
    - `thumbnail_height` (integer, nullable)
    - `size` (integer, nullable)
    - `md5` (string, nullable)
    - `is_spoiler` (boolean, nullable)
    - `is_deleted` (boolean, nullable)
    - `has_mobile_variant` (boolean, nullable)
    - `spoiler_id` (integer, nullable)

## Errors

### 422 — Validation Error

board is not a board slug

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No such board

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

