SLURP OUR JSON

Studies show that 766% of developers had enhanced libido & strength after parsing our data

Last Updated: May 15, 2013

Welcome to the 420chan JSON API documentation

We now have a JSON API. It's built to be as close to the 4chan API as possible for familiarity sake. Please beat the shit out of it and report any issues you may find.

I'm fairly excited to see what people do with it. Build and share!

For stuff not yet implemented, you can make a fair assumption that it will be like the existing 4chan API, with 90% of functionality currently present. Unimplemented items are marked.

getCategoriesList - Returns a list of all board categories

URL - http://api.420chan.org/categories.json

Example Output
--------------
{
    "categories": [
        {
            "id": 2,
            "title": "Burritos",
            "nws_category": 0,
            "display_order": 1
        },
	]
}

getBoardsList - Returns a list of all boards

URL - http://api.420chan.org/boards.json

Example Output
--------------
{
    "boards": [
        {
            "category": 2,
            "board": "beef",
            "title": "Beef Burrito Discussion",
            "nws_board": 0,
            "display_order": 1
        },
        {
            "category": 2,
            "board": "bean",
            "title": "Bean Burrito Discussion",
            "nws_board": 0,
            "display_order": 2
        }
	]
}

getNetjester - Returns a list of all NJ posts on a board

URL - http://api.420chan.org/[BOARD]/netjester.json

LIVE EXAMPLE - http://api.420chan.org/b/netjester.json

Example Output
--------------
{
    "njposts": [
        {
            "no": 3128807,
            "now": "Tue, 30 Apr 2013 06:09:52 EST",
            "name": "Netjester",
            "trip": "!AI.skYnEt",
            "id": "iLikEToleARn",
            "staff": "1",
            "com": ">>3128806 \nI got totally immersed in it when I'm building myself up to achieve that other than the moon, hermetically sealing buildings, a well regulated police force, it should have fresh gauze bandages, medical tape, a good initial trajectory, and a mix of any other.",
            "time": 1367316592,
            "resto": 3128760
		}
	]
}

getBoard - Returns a basic list of thread IDs, subjects, and modification times

URL - http://api.420chan.org/b/threads.json

LIVE EXAMPLE - http://api.420chan.org/b/threads.json

Example Output
--------------
[
    {
        "page": 0,
        "threads": [
            {
                "no": 152084,
                "sub": "I SMELL LIKE ASSHOLE",
                "last_modified": 1367520295
            }
		]
	}
]

getCatalog - Returns a detailed list of all threads on a board

URL - http://api.420chan.org/[BOARD]/catalog.json

LIVE EXAMPLE - http://api.420chan.org/b/catalog.json

Example Output
--------------

getThread - Returns a full single thread

URL - http://api.420chan.org/[BOARD]/res/[THREAD].json

Example Output
--------------
{
    "posts": [
        {
            "no": 151958,
            "now": "Wed, 01 May 2013 01:22:41 EST",
            "name": "The Celt",
            "trip": "!BzcOsK03.w",
            "id": "aamITKLP",
            "staff": "1",
            "sub": "I'm fat",
            "com": "Oh god\r\nLick my blubs\r\n[b]FAT[/b]",
            "filename": "1367385761801",
            "ext": ".jpg",
            "w": 1069,
            "h": 491,
            "tn_w": 256,
            "tn_h": 117,
            "time": 1367385761,
            "fsize": 102258,
            "resto": 0
        },
        {
            "no": 151959,
            "now": "Wed, 01 May 2013 01:24:50 EST",
            "name": "Matilda Blinningdatch",
            "id": "iuWZpiQD",
            "com": "ALL THAT FAT\r\nCAN'T FIT IT ALL IN MY MOUTH",
            "time": 1367385890,
            "resto": 151958
        },
	]
}

getPost - Returns a single post on a board

URL - http://api.420chan.org/[BOARD]/single/[POST].json

Example Output
--------------
{
    "post": [
        {
            "no": 151958,
            "now": "Wed, 01 May 2013 01:22:41 EST",
            "name": "The Celt",
            "trip": "!BzcOsK03.w",
            "id": "aamITKLP",
            "staff": 1,
            "sub": "I'm fat",
            "com": "Oh god\r\nLick my blubs\r\n[b]FAT[/b]",
            "filename": "1367385761801",
            "ext": ".jpg",
            "w": 1069,
            "h": 491,
            "tn_w": 256,
            "tn_h": 117,
            "time": 1367385761,
            "fsize": 102258
        }
	]
}

getBoardPage - Returns a single page (with replies and omit count) (NOT YET IMPLEMENTED)

URL - http://api.420chan.org/[BOARD]/[PAGE].json

LIVE EXAMPLE - http://api.420chan.org/b/0.json

Example Output
--------------

getActiveDiscussions - Returns the last 10 posts (WIP)

URL - http://api.420chan.org/latest.json

Example Output
--------------
{
    "latest": [
        {
            "board": "cd",
            "thread": 339676,
            "resto": 339756,
            "text": ">>339687\r\nmemory is extremely unreliable. honestly i have tried to analyze my feelings towards being"
        },
        {
            "board": "weed",
            "thread": 4515663,
            "resto": 4515828,
            "text": "Is there a source on that GIF?\r\n\r\nLike, is he actually punching a baby?\r\n\r\nThe fuck."
        },
	]
}

getStats - Returns some basic metrics (WIP)

URL - http://api.420chan.org/stats.json

Example Output
--------------
{
    "stats": [
        {
            "board": "weed",
            "users": 1531,
            "postcount": 4515872,
            "size": 537992276
        },
        {
            "board": "b",
            "users": 1470,
            "postcount": 3132777,
            "size": 1409468522
        },
        {
            "board": "wooo",
            "users": 1401,
            "postcount": 2910416,
            "size": 2151624614
        }
	]
}

getRandomNetjesterQuote - Returns a completely random AI response

URL - http://api.420chan.org/netjester/random.json

Example Output
--------------
{"text":">no legends minitrons unless they've been on TV and nobody improves in FCW."}

IF NETJESTER DAEMON IS OFFLINE, JSON RETURNED WILL BE AS FOLLOWS
-------------
{"offline":true}

getNetjesterResponse - Returns an AI response to the given input

URL - http://api.420chan.org/netjester/reply.json?t=[INPUT TEXT]

LIVE EXAMPLE - http://api.420chan.org/netjester/reply.json?t=HORSES

Example Output
--------------
{"text":"Not gonna lie, the cab driver on the way back he sees a woman pushing a stroller with two babies in it, I noticed how FUCKING GOOD HORSES ARE AT WALL-CLIMBING!"}

IF NETJESTER DAEMON IS OFFLINE, JSON RETURNED WILL BE AS FOLLOWS
-------------
{"offline":true}

Single Thread, Catalog, Netjester, & Page Objects

* - Not yet implemented

AttributeValueDescriptionPossible ValuesExample Value
no integer Post number 1-9999999999999 80085
resto integer Reply to 0 (is thread), 1-9999999999999 0
stickyinteger Stickied thread?0 (no), 1 (yes)1
closedinteger Locked thread?0 (no), 1 (yes)0
closedbystring Thread locked bytextNetjester
closedreasonstring Reason for locktextBeing human
bannedinteger Banned user?0 (no), 1 (yes)0
bannedbystring User banned bytextNetjester
banreasonstring Reason for bantextDaisy, Daisy
nowstringDate and timeDay, DD Month YYYY HH:MM:SS ESTThu, 02 May 2013 09:12:03 EST
timeintegerUNIX timestampUNIX timestamp1344570123
namestringNametextNetjester
tripstringTripcodetext (format: !tripcode!!securetripcode)!AI.skYnEt
staffinteger Is user staff?0 (no), 1 (yes)1
idstringIDtext (8 characters), iLikEToleARniLikEToleARn
substringSubjecttext (only present in OP)This is a subject
comstringCommenttext (unparsed bbcode and newlines)This is a comment
filenameintegerRenamed filenameUNIX timestamp + microseconds1344402680740
extstringFile extension.jpg, .png, .gif, .mp3, .swf.jpg
fsizeintegerFile size1-999999992500
md5 *stringFile MD5text (24 character, packed base64 MD5 hash)NOetrLVnES3jUn1x5ZPVAg==
wintegerImage width1-10000500
hintegerImage height1-10000500
tn_wintegerThumbnail width1-250250
tn_hintegerThumbnail height1-250250
filedeleted *integerFile deleted?0 (no), 1 (yes)0
spoiler *integerSpoiler image?0 (no), 1 (yes)0
omitted_posts *integer# replies omitted1-1000033
omitted_images *integer# image replies omitted1-1000021
replies *integer# replies total0-99999231
images *integer# images total0-99999132
bumplimit *integerBump limit met?0 (no), 1 (yes)0

Check back later

Check back later

Access Denied

Access Denied

Access Denied