4chan / 4chan-API

Documentation for 4chan's read-only JSON API.
http://www.4chan.org/
1.02k stars 73 forks source link

API endpoint for find/search #82

Closed Ckath closed 4 years ago

Ckath commented 4 years ago

Since there is no way to get 'all posts on all boards' through the api, or even 'all posts on this board', going over all posts programatically requires requests for the boards, then the threads on each board, then the posts in each thread. This is rather painful and annoying, also inefficient. (if there is a better way please do let me know)

The on site search and this rather hidden find page would solve this issue, if they had an api endpoint. These pages arent ideal for programatically accessing due to their paging of results, which causes overlap when new posts are added while going through the pages.

tl;dr: API endpoint for either all posts, or a nice json response from the global search would be nice

desuwa commented 4 years ago

The API mostly maps to 4chan's HTML pages and, in general, we can't stray too far from this model.

To get all posts from a board, grab the thread list then fetch individual threads. Or you can use the catalog json too.

Ckath commented 4 years ago

That is what I currently settled on as well, it just results in a lot of api requests. If that's fine and it isnt going to change thats the end of this issue I guess.