Notice: My personal stance on AI generated artwork. Retweet and share if you agree. Let us discuss, and not immediately scream bloody murder.

Now Viewing: Yukkuri Shiteitte ne! :<
Keep it civil, do not flame or bait other users. If you notice anything illegal or inappropriate being discussed, contact an administrator or moderator.

shionsan - Group: Member - Total Posts: 35
user_avatar
Yukkuri Shiteitte ne! :<
Posted on: 03/08/19 12:32PM

What is the maximum number of daily API queries? When does it reset? Looks like they are bound to cookies/accounts, so they seem to be avoidable. Is there a point to this?
I had a bunch of files I want to get info about (the reason I hit the limit), some of them are now gone as I had not anticipated the error message.
Limit message is in XML format even with json=1 specified. Is there a documentation somewhere? The one here is insufficient.
Is there a way to get multiple results for multiple MD5 in one query? Like "md5:#+or+md5:#+or+md5:#")



jedi1357 - Group: Moderator - Total Posts: 5772
user_avatar
Posted on: 03/08/19 12:43PM

There are 2 limits.
The first limits you to 100 posts per inquiry. This is default but apparently adjustable.
The second limit is 1 query every 10 seconds. (I think it's 10 seconds) This is hard coded and not adjustable. If I'm right that will limit you to no more than 8640 queries/day.

Edit: This is all the documentation we have: gelbooru.com/index.php?page=wiki&s=view&id=18780



shionsan - Group: Member - Total Posts: 35
user_avatar
Posted on: 03/08/19 01:02PM

jedi1357 said:
The first limits you to 100 posts per inquiry. This is default but apparently adjustable.

Query with limit=250 took about 5 seconds this evening. Are servers under heavy load or is this a "come to patreon" campaign?

jedi1357 said:
The second limit is 1 query every 10 seconds. (I think it's 10 seconds) This is hard coded and not adjustable. If I'm right that will limit you to no more than 8640 queries/day.

And when would it reset? 86400 seconds from the last failed query or after server hits midnight or something?

jedi1357 said:
This is all the documentation we have: gelbooru.com/index.php?page=wiki&s=view&id=18780

Too bad it doesn't answer any of my questions and even adds one more: Where do I get API_KEY? Is it a pass_hash from cookies? Cookies seem to work too. Does it matter which one I use?



lozertuser - Group: The Fake Administrator - Total Posts: 2230
user_avatar
Posted on: 03/08/19 01:52PM

My Account => options has your api key information. There is no request limit. Query result limit I believe is 1k, but I haven't looked at that maximum in a long while. Servers are under heavy load at night for North America users.



jedi1357 - Group: Moderator - Total Posts: 5772
user_avatar
Posted on: 03/08/19 02:01PM

"And when would it reset? 86400 seconds from the last failed query or after server hits midnight or something?"

No. The limit is 1 and it resets 10 seconds after use.



shionsan - Group: Member - Total Posts: 35
user_avatar
Posted on: 03/08/19 02:52PM

lozertuser said:
- There is no request limit.

jedi1357 said:
- The limit is 1 and it resets 10 seconds after use.

Both seems to be only partially true. Right now, when I'm logged in and trying to get [ gelbooru.com/index.php?page=dapi&s=post&q=index ] I see "Search error: Exceeded maximum queries per day. Yukkuri Shiteitte ne! :<" message. Obviously the same thing happens when I use CURL with my [user_id=187882] and [pass_hash]. So it seems I've hit the ban (sorry for that, would be awesome to have multi-hash queries), and since it is still here after more than 10 seconds, I'm interested if it will ever be lifted. API seems to work without cookies (with no regard to api_key), but having that ban is kinda heavy on conscience.



lozertuser - Group: The Fake Administrator - Total Posts: 2230
user_avatar
Posted on: 03/08/19 05:57PM

I forgot about that limitation I had to implement due to API abuse. It's a high number, more than enough for a single user to use, without any issue. Scrapers or bots just flooding the server will reach the limit quite fast. It resets daily.



jedi1357 - Group: Moderator - Total Posts: 5772
user_avatar
Posted on: 03/08/19 11:19PM

Update: Apparently I was mistaken about the 10 second wait between API uses. It applies to tag edits but not the API.



add_replyAdd Reply


1