de Deutsch © MacCK en English © Proger_XP es Español © Camilo Martin Momenti ru Русский © Proger_XP fr Français © macbig273

Поиск по доскам изображений

Anime Search Engine

The Engine API Reference

=== Query variables
 To query use this URL: http://www.i-forge.net/imageboards/?
 language=detect - detect attempts to auto-detect based on Accept-Language header. "en" is the default.
 action=str. Action - desc +supported formats ("js" is always supported):
 * main (the default) - main page. +html
 * search - +*html xml json rss (PicLens/Cooliris-enabled).
 * suggestions - about search phrase. +xml json
 * shoutbox - get its messages. +*html xml json rss.
 * shout - add a message. html redirects to main. naked_html returns an info message. +*html xml json
 * randimage - performs a search and returns a random image from the result set. +*html xml json rss image
 * help - a text page explaining some stuff. +*html
 format=html (default)|naked_html|xml|json|js|rss
        |image:
 * naked_html - only page's contents, no <html>, <body> and invariable elements such as menu and footer.
 * js - a data (see js_data var) passed to a callback function. Is a valid JS code meant to be eval()'ed. Func name can be specified using a var. Note that if an error occures the callback func will still be called but without any arguments or an empty string. You can see what's wrong by re-querying that js_data format directly without "js" wrapper.
 * image - only supported by special actions.

==== Action-specific vars
  The following vars are always set inside an array, e.g., if we request action=search we need to pass a phrase like this: search[phrase]=str.
For action=randimage this will be randimage[phrase]=str, and so on.

  For a kick-start, here's a sample query URL:
http://www.i-forge.net/imageboards/?action=search&search[phrase]=site:gelbooru+loli&format=js&js[data]=json
It asks the server to search for phrase "site:gelbooru loli", format the results into a JSON object and return it as JavaScript call.

search, suggestions, randimage:
 * phrase=str. empty str - output all images. All filtering can only be done using this var. Its syntax is described below.
 * rating=r - an alias to "rating=r" of search phrase. If present as var and in phrase, var overrides phrase's.
 * (search only) page=0, count=25 - max value for count is 100, min - 1.

When displaying search in html format you can set "thumbpicbox" var to 0 or empty string to disable opening picture box when a user clicks on a thumbnail, regardless of his setting.
Note: "thumbpicbox" is passed without "search[...]" because it only affects the page's JavaScript; e.g.: /?action=search&thumbpicbox=0

shoutbox:
 * box=shoutbox (default)|news|todo
  - shoutbox - the main posting board.
  - todo - a list of pending IbSearch site improvements.
  - news - the site news.
 * depth=4 - how tall the tree (parent post->child->that child's child->etc.) will be. Min 1, max 15.
 * counts[depth]=num - how many child posts to show at this branch (note it's plural: countS). The root has index 0 and defaults to show 15 messages max. If count is omitted to a depth it is set to the previous depth divided by 2 (floor'ed). Min count is 0, max is 100. E.g.: count[0]=9&count[2]=1 - count[1] will be auto-set to 4.
 * parent=no|ID - build tree of messages originating from a post with this ID.
 * page=0.

When displaying a shoutbox in naked_html or html formats there's also this var:
 * naked_html[headlines]=0 (default)|1 - if set, no post messages will be shown, only their titles, unless they don't have it - then show the message itself.

shout:
 * box - see the shoutbox action's var.
 * message=str - the only required var. Max length is 1000 chars. Can contain some simple wiki-style formatting.
 * image=url - to attach.
  - attaching by uploading is done thru a var "shout_image_file" ($_FILES['shout_image_file']).
 * author=someone.
 * parent=no - in response to this post.
 * language=en - author's.
 * antispam - always set this to 'A'.

You can pre-set URL of an image to attach in the posting form by using this var: naked_html[form][image]=http://gelbooru.com/....jpg

You can post a feature request by "shout"ing in the box=todo.

help:
 * section=api|search - required.

==== Format-specific vars
The same rules apply as for action vars.

js:
 * data=naked_html|*. Any *valid* "format" var's value is ok, except for "image" (if a page doesn't support this format you can't pass it to format=js either).
 * callback=GotIbSearch (the default) - used for format=js.

image:
 * size=full (default)|preview - preview won't exceed 150x150 px rectangle.

Note that Firefox's NoScript might trigger false XSS alarm on some systems. In this case you can address image's vars as: _image[size] - with a preceding "_".

===== Shoutbox format
Fields: id, parent, all_parents, time, time_children, author, image, image_50 (50x50 px thumb), title, message, message_html, useragent, classes, language, final (no answers to this post allowed), hidden, sticky.

Possible classes:
 * reflecting poster's language: lang-en, etc..
 * reflecting user-agent: ff, ie, opera, safari, chrome.
 * "admin" class means that I posted it, "anon" that anybody else.
 * reflecting message state: imageless (no attached image), final, hidden, sticky.
 * action-specific classes:
  - todo: low, normal, high, urgent, done.
  - news: feature, bugfix.

Multiple classes are separated with ' ' and are intended for use in CSS.

==== Return format & codes for XML & JSON
XML is always of the form:
<IbSearch home="http://www.i-forge.net/imageboards"
         version="N" status="N"> ... </...>

JSON form is similar:
{source: "IbSearch", home="http://www.i-forge.net/imageboards",
 version: N, status: N, response: {...}}

There may be more fields. These are the basic ones:
 * source, home - consts,
 * version is the engine SVN revision number.
 * status is one of the codes, alike to HTTP responses: 0 - ok, others - something has gone wrong, in this case a message field might be set.

Exact response for a page is better found out by requesting it manually.

=== Phrase syntax
[modifier]word - word is either a tag to search for or something else depending on the modifier.

==== Modifiers
* + - an image MUST be tagged with this tag to be included in the output;
* - - must NOT;
* (no modifier) - acts as an "OR this tag" condition. E.g. "loli jigglygirls" will return images which have either "loli" or "jigglygirl" tag, or both. Don't mix with "+tag" construct - only tags with "+" will be used, disregarding plain "tag". You can, however, mix it with "-notag".
* you can match a part of tag using '*', e.g. "blonde*" will match "blonde", "blonde_hair", etc. You can also use it with either tag mod, '+' or '-': "+pokemon* +hikari -naked* -nude*" - match only pictures which both have a tag starting with "pokemon" & a full tag "hikari", plus it shouldn't have a tag starting with "naked" or "nude".
* width<0, height<0.
* score<0 - N can be negative: score>=-5.
* rating=s,q,e,0 (0 - not rated) - or ratings (no difference).
* site=gelbooru,danbooru - or sites. Includes ONLY the listed sites in the result. You can use site name shortcuts. Also note that for sites which names include spaces you must use their shortcuts (Moe Imouto => moe, etc., see the list below).
* -site[s]=... - don't combine with the "site" mod, this makes no sence. Excludes listed sites from results.
* md5=str - shows images with this hash only. Multiple md5 mods are treated in OR fashion, eg: "md5=abc md5=zyx" will show images having either of these hashes.
* board_id<0 - selects images (posts) which IDs on an imageboard site equals to this.
* #0 - display page N (like page query var).
* limit=25 - or count=25.
* view=list (default)|table.
* sort=no|random|width|height|url|score|rating|
       board_id|index_id|md5|source|site
 - can be followed by asc (the default)|desc to sort in this order, eg.: sort=site, desc or sort=md5,asc.
 - url means the picture's page URL, e.g.
   http://www.gelbooru.com/index.php?page=post&s=view&id=551873
 - board_id is the pic ID that it has on the parent site; index_id is its index in the search database of the Engine.
* sim=N or similarity=N - display similar images whose relevance to the given tags is at least N points. On how to calculate those points see the section below.
* dup=X or duplicates=X, where X=yes|no|0|1 - remove identical images from the result. Default is 0 (= hide duplicates); if there's an MD5 filter duplicates are always set to 1.

==== Some general rules about the mods
* char case doesn't matter for the phrase at all (site= and SiTe=, Gel and gel are the same thing).
* for key-value pairs you can use ':' instead of '=' and have an optional space after a delimiter (but not before): count: 5.
* for enums you can also use ';' to separate items, as well as include spaces after a delimiter (but not before). Eg. this is a valid enum: "gel; dan,neko".
* query vars always override phrase mods (eg. phrase, limit).
* later occurences of the same mod usually overrides previous.
* possible arithmetic comparison operators are: < <= = != (not equal) >= >. Note that you shouldn't include any spaces in an artithmetic mod. Eg., this is invalid (and is treated as 3 different tags to filter on): score > 5

=== Similarity relevance calculation
Using "sim" modifier you can specify the necessary relevance to search for. It's specified as a number.
In a nutshell, each image returned will have at least N tags from the list of tags you specified in the search phrase.

That number is exactly how many tags should exist in the picture to be included in results.
* 0 points will give you no results.
* 1 point is the same as not specifying the "sim" mod at all - since each image needs to be tagged with one tag from the given list and it's the default behaviour anyway.

Now let's suppose we want to find similar images to "may swimsuit gogocherry hitec". These are 4 tags, so the max relevance we can get is also 4. Thus, in continuation of the previous list:
* sim=2 & sim=3 will give you images tagged with, respectively, 2 & 3 tags from that list.
* 4 points is essentially the same as searching for "+may +swimsuit +gogocherry +hitec" - all ANDs. It will only return images tagged with all four given tags.
* any number above 4 will give you an empty result because you only specified 4 tags and, obviously, we can't match more tags that you've specified.

=== Site name (imageboard) shortcuts
Gelbooru=gel		Danbooru=dan		Nekobooru=neko
Moe Imouto=moe		Konachan=kona		Sankaku Complex=sank
Wakku Wakku=wakku	Wild Critters=wild	Safebooru=safe
Tag Gallery=tag		Ichigo Channel=ichi	Akyu Genso=genso
Lolibooru=loli		Anime Galleries=anigal	Angel HQ=ahq
Anime Mahou=mahou	Rule 34=r34		One Yukkuri Place=yukkuri
e Shuu Shuu=shuu  	Ecchion=ecchion		e621=e621
The Chan Top List Rambler's Top100

Хотите купить Lavilin в Санкт-Петербурге? Посетите Интернет-магазин Лавилин-Аптека.ру с доставкой по Петербургу.

Либо зайдите на сайт Петербургской фирмы ООО ТД Квадро..

Vistual Novel text replacement/translation tools - lets you extract and re-insert texts in many Japanese games. For example: Sono Hanabira ni Kuchisuke wo (MSD); Katahane (MajiroArc); Yosuga no Sora (Cotopha/CSX); Akatsuki no Goei (MajiroArc), etc.