4chan API

Beginner's Pick Social / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)
95 A+
Measured Score 0 50 100 Reachability 30/30 Speed 15/20 Security 15/15 Developer XP 20/20 Reliability 15/15 TESTED 2026-07-23

Overview

The 4chan API provides read-only, public access to boards, threads, and posts on 4chan with no authentication required. You can retrieve thread lists, individual posts, and board catalogs in JSON format. It is a great beginner-friendly API for learning how to parse JSON responses and build a simple reader app.

Beginner Tip

The 4chan API has strict rate limits — wait at least 1 second between requests to the same board and at least 10 seconds between full thread list fetches. Ignoring this will get your IP temporarily banned.

Available Data

thread and post listings
message content
user information
timestamps

Example Response

JSON Response
{
  "page": 1,
  "threads": [
    {
      "no": 123456789,
      "sub": "Example Thread",
      "com": "Discussion content...",
      "time": 1705320000,
      "replies": 42
    }
  ]
}

Field Reference

no Unique post number within the board, used to reference individual posts.
com HTML-encoded body text of the post comment.
sub Subject line of the thread, only present on the opening post if set.
tim Unix timestamp used as part of the filename for any image attached to the post.
replies Number of replies the thread has received.
images Number of image replies in the thread.

Implementation Example

Request
const url = "https://github.com/4chan/4chan-API";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

404 Not Found The board abbreviation or thread number does not exist, or the thread has been archived or deleted.
Check the board abbreviation is correct (e.g., "g" for technology) and confirm the thread is still active via the catalog endpoint.
429 Too Many Requests You are sending requests too quickly and have been rate-limited.
Add a delay of at least 1 second between requests. For catalog and thread list endpoints, wait at least 10 seconds between refreshes.
Empty or null fields Some post fields such as sub (subject) or com (comment) are optional and may be absent.
Always check if a field exists before accessing it in your code, using optional chaining or null checks.

Measured Score Breakdown

Live HTTP request to the API endpoint

Reachability 30/30
Speed 15/20
Security 15/15
Developer XP 20/20
Reliability 15/15
Endpoint Response Time 336ms

Fully tested on Jul 23, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Social
Difficulty Beginner
Verified: 2026-04-04

Related Tags

Similar APIs

View All →