4plebs APIarchive.4plebs.org ↗
Access archived 4chan boards via the 4plebs API. Search posts by text, subject, tripcode, username, and date range. Retrieve threads, media metadata, and board galleries.
What is the 4plebs API?
The 4plebs Archive API exposes 14 endpoints for retrieving and searching archived 4chan posts across boards including pol, tv, x, adv, and others. The search_posts endpoint accepts filters for text, subject, username, tripcode, date range, and post type, while get_thread returns a full thread with the original post and all replies keyed by post number. Media objects include OCR-extracted text, ML-generated image descriptions, dimensions, and direct file URLs.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/a10feac1-9ed4-4ee8-a751-0f43cbc30203/list_boards' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace archive-4plebs-org-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: 4plebs Archive API — search and browse archived 4chan posts."""
from parse_apis.fourplebs_archive_api import FourPlebs, Board_, PostNotFound
client = FourPlebs()
# List all archived boards
for board in client.boards.list(limit=5):
print(board.shortname, board.fullname)
# Construct a board and search for posts
pol = client.board("pol")
for post in pol.search(text="bitcoin", limit=3):
print(post.num, post.name, (post.comment or "")[:80])
# Search by username across all boards
for post in client.searchresults.by_username(username="moot", boards=Board_.POL, limit=3):
print(post.num, post.fourchan_date, post.name)
# Get a random thread and list its replies
thread = pol.random_thread()
for reply in thread.replies(limit=3):
print(reply.num, reply.name, (reply.comment or "")[:60])
# Typed error handling: catch not-found for a specific post
try:
post = pol.search(text="bitcoin", limit=1).first()
if post:
media = post.media_info()
print(media.media_filename, media.media_w, media.media_h)
except PostNotFound as exc:
print(f"post not found: {exc}")
print("exercised: boards.list / board.search / searchresults.by_username / random_thread / thread.replies / post.media_info")
List all archived boards with their short names, full names, and URLs. Returns the complete set of boards available on the 4plebs archive.
No input parameters required.
{
"type": "object",
"fields": {
"boards": "array of board objects with shortname, fullname, and url"
},
"sample": {
"data": {
"boards": [
{
"url": "https://archive.4plebs.org/adv/",
"fullname": "Advice",
"shortname": "adv"
},
{
"url": "https://archive.4plebs.org/pol/",
"fullname": "Politically Incorrect",
"shortname": "pol"
},
{
"url": "https://archive.4plebs.org/tv/",
"fullname": "Television & Film",
"shortname": "tv"
}
]
},
"status": "success"
}
}About the 4plebs API
Boards, Threads, and Posts
The list_boards endpoint returns all archived boards with their shortname, fullname, and url. You pass those shortnames directly into most other endpoints. get_board_index accepts a board and optional page parameter and returns threads paginated by page, keyed by thread number. get_thread accepts a board and thread_num, returning the original post under the op key and all replies as an object keyed by post number. If you only want replies, get_thread_replies returns an array of reply objects without the OP.
Search Filters
search_posts is the most flexible endpoint, accepting text, subject, boards, type (use op to restrict to original posts), order (use asc for oldest-first), and start/end date filters in YYYY-MM-DD format. Results include a meta object with total_found, max_results, and search_title. Focused variants exist for common patterns: search_by_subject, search_by_username, search_by_tripcode, search_with_date_range, and search_op_only. The search_by_username endpoint works best with specific display names; searching for Anonymous returns too broad a result set to be practical.
Media and Gallery Data
get_board_gallery returns paginated media objects for a board, each with media_link, thumb_link, media_filename, media_w, media_h, ocr_t (OCR text extracted from the image), and ml (an ML-generated image description). The get_media_info endpoint retrieves the same media fields for a specific post identified by board and post_num, and returns null in the media field for posts without attachments. The media_hash field is an MD5 hash of the media file, useful for deduplication.
Additional Endpoints
get_post returns a single post's full data including num, name, comment, board, and the media object. get_random_thread resolves a random thread from a given board and returns the same structure as get_thread, which can be useful for sampling the archive without a specific target.
The 4plebs API is a managed, monitored endpoint for archive.4plebs.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when archive.4plebs.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official archive.4plebs.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track posts from a specific tripcode across boards using
search_by_tripcodewith optional board scoping - Build a timeline of archived posts on a topic using
search_with_date_rangewithstartandendfilters - Audit media posted to a board by iterating
get_board_gallerypages and inspectingocr_tandmlfields - Extract all replies in a thread for sentiment or conversation analysis using
get_thread_replies - Find original posts only on a board filtered by subject keyword using
search_op_onlyorsearch_by_subject - Identify duplicate media uploads across threads using the
media_hashfield fromget_media_info - Sample random archived threads for dataset construction using
get_random_threadacross multiple boards
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does 4plebs have an official developer API?+
Which boards are available through this API?+
list_boards endpoint returns the current set of archived boards, which as of writing includes pol, tv, x, adv, sp, tg, trv, hr, o, f, and s4s. 4plebs does not archive all 4chan boards — only those it has explicitly chosen to mirror. Boards outside that set are not accessible.What does the `search_posts` response include beyond the post text?+
meta object in the response carries total_found (total matching posts), max_results (cap on returned results), and search_title. Media objects include media_link, thumb_link, media_w, media_h, ocr_t, ml, and media_hash.Can I retrieve live or currently active 4chan threads through this API?+
Is there a way to search posts by image hash or file name rather than text?+
media_hash field is available in post responses for deduplication, but there is no dedicated hash-based search endpoint. You can fork this API on Parse and revise it to add a media hash search endpoint if 4plebs surfaces that filter.