[Settings] [Home] [Catalog] [Search] [Private messages] [Admin]
[Return]

Post API guide

Kokonotsuba provides a read-only API for fetching post data. You can fetch data from individual posts or whole threads.

Get a single post

GET https://img.heyuri.net/l/koko.php?mode=module&load=postApi&post_uid={post_uid}

Returns JSON with the post data and rendered HTML

Parameters

ParameterTypeDescription
post_uidintegerThe unique ID of the post

Response fields

FieldTypeDescription
post_uidintegerPost unique ID
timestampstringPost timestamp
namestringPoster name
tripcodestringTripcode (formatted)
secure_tripcodestringSecure tripcode
capcodestringStaff capcode
emailstringEmail field
subjectstringPost subject
commentstringRaw comment text
parent_thread_uidintegerUID of the parent thread
parent_post_numberintegerPost number of the thread OP
htmlstringFully rendered post HTML

Get posts from a thread (paginated)

GET https://img.heyuri.net/l/koko.php?mode=module&load=postApi&pageName=thread&thread_uid={thread_uid}&page={page}

Returns JSON with a page of posts from the specified thread. The OP is always included on every page.

Parameters

ParameterTypeDescription
thread_uidstringThe unique ID of the thread
pageintegerPage number (0-based, optional, defaults to 0)

Response

Returns an object with thread_uid, page, post_count, and posts (array of post objects with the same fields as the single post endpoint).

Get thread list (paginated)

GET https://img.heyuri.net/l/koko.php?mode=module&load=postApi&pageName=threads&board_uid={board_uid}&page={page}

Returns a paginated list of thread UIDs for the board, sorted by creation time (newest first).

Parameters

ParameterTypeDescription
board_uidintegerThe numeric board UID (optional, defaults to the current board)
pageintegerPage number (0-based, optional, defaults to 0)

Response

Returns an object with page, threads_per_page, thread_count, and threads (array of thread objects).

FieldTypeDescription
thread_uidstringUnique ID of the thread
subjectstringSubject of the opening post
last_bump_timestringTimestamp of the last bump
thread_created_timestringTimestamp of when the thread was created
post_countintegerTotal number of posts in the thread