12/18/16 09:11AM
API Question
I'm using the API and was wondering about pid.
pid doesn't seem to correlate with page number per se, there may be 67 pages but pid could be 2640.

Is there a way to find the max pid to prevent going out of bounds? I see in the HTML response's Post tag that there is a count and response, however when I put in a number near that count value I get nothing back on the request.

i.e. https://safebooru.org/index.php?page=dapi&s=post&q=index&limit=1&pid=0&tags=brown_hair
gives a count of 334103, but when I set PID to say, 334000 I get nothing.
12/18/16 09:13AM
Hmmm well now it's working. How odd.
12/18/16 07:29PM
Really what was tripping me up was that it's limit * pid that changes the result, so if there's 200 images and you set a limit of 100 and a pid of 3, then you'd be trying to access images 300-400
12/22/16 05:51AM
I'm glad you were able to get it to work. This info will help others and my brain explodes when dealing with tedious decoding. The best I could do was an intro to the world of API and RSS feed.

Reply | Forum Index