Gelbooru

Notice: We are now selling NEW Gelbooru Merch~! Domestic shipping is free on all orders! Do you have an artist tag on Gelbooru? Let us know so we can properly credit you!

Now Viewing: howto:api


Tag type: None

Api Basics Documentation


You should never receive an error unless the server is overloaded or the search dies. In cases of the searcher breaking, you will receive a response success of "false" and a message stating "search down" or similiar.

Authentication


We will occasionally require authentication to access our API and throttle access to our API. This is to mitigate abusive behavior.

&api_key=API_KEY_HERE&user_id=USER_ID_HERE

API_KEY_HERE Your API Key which is accessible within your account options page.
USER_ID_HERE Your user ID, which is accessible on the account options/profile page.

Your requestes will not be limited if you have contributed to the Patreon in the past.

Posts List



Url for API access: /index.php?page=dapi&s=post&q=index

limit How many posts you want to retrieve. There is a default limit of 100 posts per request.
pid The page number.
tags The tags to search for. Any tag combination that works on the web site will work here. This includes all the meta-tags. See cheatsheet for more information.
cid Change ID of the post. This is in Unix time so there are likely others with the same value if updated at the same time.
id The post id.
json Set to 1 for JSON formatted response.


Tag List



Url for API access: /index.php?page=dapi&s=tag&q=index

id The tag's id in the database. This is useful to grab a specific tag if you already know this value.
limit How many tags you want to retrieve. There is a default limit of 100 per request.
after_id Grab tags whose ID is greater than this value.
name Find tag information based on this value.
names Separated by spaces, get multiple results to tags you specify if it exists. (schoolgirl moon cat)
name_pattern A wildcard search for your query using LIKE. (choolgirl would act as *choolgirl* wildcard search.)
json Set to 1 for JSON formatted response.
order Order by field specified (ASC or DESC)
orderby Order by a field.
- date
- count
- name


Comments List



Url for API access: /index.php?page=dapi&s=comment&q=index

post_id The id number of the comment to retrieve.


Deleted Images



Url for API access: /index.php?page=dapi&s=post&q=index&deleted=show

last_id A numerical value. Will return everything above this number.






Other Wiki Information

Last updated: 11/13/18 3:29 PM by lozertuser
This entry is not locked and you can edit it as you see fit.


There are no images associated with this wiki entry.