Keep it civil, do not flame or bait other users. If you notice anything illegal or inappropriate being discussed, contact an administrator or moderator.
I currently understand the purpose of limiting paging navigation to 1000 (I believe it's a standard in favor of SEO or something?). However, can anyone advise about the purpose of the limitation via the API?
The purpose of going for an API was solely to allow browsing over this limit, i.e say tag pokemon, even if, filtered by two tags, may result in an amount of images crossing the 1000 page limit. I tried browsing past over 1000 without any tags, it lets me reach up to 1212 so far, but if I type 1500 I have an error "Too deep! Pull it back some. Holy fuck.". Is it because of the performance/cost over the database? Are there any means to work around as in, perform such kind of query without being consuming on the database/server?
In my experience, I've observed other APIs having such limitations, however, I've worked on laravel and notice there's no such limitation and the paging seems to work fine even on a very huge list.
Sorry I had to google to spot where the FAQ sits on the site. So after reading around, I understand the offset seems to be a problem to SEO, but is it still an issue as well to the API? If so, I read a workaround I am willing to try. It was said that you can request posts from a range/set of ids at gelbooru.com/index.php?page=forum&s=view&id=1549 but I am not sure how to achieve this with the API as the argument mentioned on the API page seems to accept only 1 id. Is there a way to use the API and return a list of post i.e from id 1 to 10?
Jerl
- Group: The Real Administrator - Total Posts: 6706
I am not an experienced user of the site, really sorry for missing on the above and thanks a lot for hinting me in the right direction. I've tested the above and I think I can try to work around it however, this causes another issue in the sense that, the API (or the regular search) is limited to two tags per search ... so if I use the above, means I am now down to/allowed of using 1 tag while searching, is that correct? Though I observe I can blacklist tags as much as I want? (tried blacklisting 6 tags)
Jerl
- Group: The Real Administrator - Total Posts: 6706
The API and regular search is not limited to two tags per search. There is a limit, but it's based on the total size of the HTTP request header and so large that you have to try really hard to even find posts that have enough tags for it to work on, and even then it'll have narrowed it down to just one post well before you get anywhere near the limit. You can, for all intents and purposes, search for as many tags at once as you want.
I have no idea why I always thought there's a limit on the tags you can search by ... maybe there was no result for the set of tags I randomly tried. Thanks for all the examples above, they'll help a lot for setting the workaround for my app.
I currently understand the purpose of limiting paging navigation to 1000 (I believe it's a standard in favor of SEO or something?). However, can anyone advise about the purpose of the limitation via the API?
The purpose of going for an API was solely to allow browsing over this limit, i.e say tag pokemon, even if, filtered by two tags, may result in an amount of images crossing the 1000 page limit. I tried browsing past over 1000 without any tags, it lets me reach up to 1212 so far, but if I type 1500 I have an error "Too deep! Pull it back some. Holy fuck.". Is it because of the performance/cost over the database? Are there any means to work around as in, perform such kind of query without being consuming on the database/server?
In my experience, I've observed other APIs having such limitations, however, I've worked on laravel and notice there's no such limitation and the paging seems to work fine even on a very huge list.
I tried in Hatsune_Miku, error if you try to go to the end.
Jerl
- Group: The Real Administrator - Total Posts: 6706