Revision history for API Docs

UserDateBody
Pup
1 <p>Furbooru provides a JSON API for major site functionality, which can be freely used by anyone wanting to produce tools for the site or other web applications that use the data provided within Furbooru.</p>
1 <p>CubFur provides a JSON API for major site functionality, which can be freely used by anyone wanting to produce tools for the site or other web applications that use the data provided within CubFur.</p>
22 <h2 id="licensing">Licensing</h2>
33 <p>Anyone may use the API. Users making abusively high numbers of requests or excessively expensive requests will be asked to stop, and banned if they do not. Your application must properly cache, and respect server-side cache expiry times. Your client must gracefully back off if requests fail, preferably exponentially or fatally.</p>
4 <p>If images are used, the artist must always be credited (if provided) and the original source URL must be displayed alongside the image, either in textual form or as a link. A link to the Furbooru page is optional but recommended; we recommend the furbooru.org domain as a canonical domain. The <code>https:</code> protocol must be specified on all URLs.</p>
4 <p>If images are used, the artist must always be credited (if provided) and the original source URL must be displayed alongside the image, either in textual form or as a link. A link to the CubFur page is optional but recommended; we recommend the cubfur.gay domain as a canonical domain. The <code>https:</code> protocol must be specified on all URLs.</p>
55 <h2 id="parameters">Parameters</h2>
66 <p>This is a list of general parameters that are useful when working with the API. Not all parameters may be used in every request.</p>
77 <table class="table">
35 unchanged lines
4343 </tbody>
4444 </table>
4545 <h2 id="routes">Routes</h2>
46 <p>The interested reader may find the implementations of these endpoints <a href="https://github.com/furbooru/philomena/tree/master/lib/philomena_web/controllers/api">here</a>. For the purposes of this document, a brief overview is given.</p>
46 <p>The interested reader may find the implementations of these endpoints <a href="https://github.com/CubFur/philomena/tree/master/lib/philomena_web/controllers/api">here</a>. For the purposes of this document, a brief overview is given.</p>
4747 <table class="table">
4848 <thead>
4949 <tr>
979 unchanged lines
10291029 <tr>
10301030 <td><code>provider_url</code></td>
10311031 <td>String</td>
1032 <td>Always <code>"https://furbooru.org"</code>.</td>
1032 <td>Always <code>"https://cubfur.gay"</code>.</td>
10331033 </tr>
10341034 <tr>
10351035 <td><code>title</code></td>
15 unchanged lines
Pup
1 <div class="walloftext">
2 <p>Furbooru provides a JSON API for major site
3 functionality, which can be freely used by anyone wanting
4 to produce tools for the site or other web applications
5 that use the data provided within Furbooru.</p>
6 <h2 id="licensing">Licensing</h2>
7 <p>Anyone may use the API. Users making abusively high
8 numbers of requests or excessively expensive requests will
9 be asked to stop, and banned if they do not. Your
10 application must properly cache, and respect server-side
11 cache expiry times. Your client must gracefully back off if
12 requests fail, preferably exponentially or fatally.</p>
13 <p>If images are used, the artist must always be credited
14 (if provided) and the original source URL must be displayed
15 alongside the image, either in textual form or as a link. A
16 link to the Furbooru page is optional but recommended; we
17 recommend the furbooru.org domain as a canonical domain.
18 The <code>https:</code> protocol must be specified on all
19 URLs.</p>
20 <h2 id="parameters">Parameters</h2>
21 <p>This is a list of general parameters that are useful
22 when working with the API. Not all parameters may be used
23 in every request.</p>
24 <table class="table">
25 <thead>
26 <tr>
27 <th>Name</th>
28 <th>Description</th>
29 </tr>
30 </thead>
31 <tbody>
32 <tr>
33 <td><code>filter_id</code></td>
34 <td>Assuming the user can access the filter ID given
35 by the parameter, overrides the current filter for
36 this request. This is primarily useful for
37 unauthenticated API access.</td>
38 </tr>
39 <tr>
40 <td><code>key</code></td>
41 <td>
42 An optional authentication token. If omitted, no
43 user will be authenticated.<br>
44 <br>
45 You can find your authentication token in your
46 <a href="/registration/edit">account settings</a>.
47 </td>
48 </tr>
49 <tr>
50 <td><code>page</code></td>
51 <td>Controls the current page of the response, if the
52 response is paginated. Empty values default to the
53 first page.</td>
54 </tr>
55 <tr>
56 <td><code>per_page</code></td>
57 <td>Controls the number of results per page, up to a
58 limit of 50, if the response is paginated. The
59 default is 25.</td>
60 </tr>
61 <tr>
62 <td><code>q</code></td>
63 <td>The current search query, if the request is a
64 search request.</td>
65 </tr>
66 <tr>
67 <td><code>sd</code></td>
68 <td>The current sort direction, if the request is a
69 search request.</td>
70 </tr>
71 <tr>
72 <td><code>sf</code></td>
73 <td>The current sort field, if the request is a
74 search request.</td>
75 </tr>
76 </tbody>
77 </table>
78 <h2 id="routes">Routes</h2>
79 <p>The interested reader may find the implementations of
80 these endpoints <a href=
81 "https://github.com/furbooru/philomena/tree/master/lib/philomena_web/controllers/api">
82 here</a>. For the purposes of this document, a brief
83 overview is given.</p>
84 <table class="table">
85 <thead>
86 <tr>
87 <th>Method</th>
88 <th>Path</th>
89 <th>Allowed Query Parameters</th>
90 <th>Description</th>
91 <th>Response Format</th>
92 <th>Example</th>
93 </tr>
94 </thead>
95 <tbody>
96 <tr>
97 <td><code>GET</code></td>
98 <td>
99 <code>/api/v1/json/comments/:comment_id</code></td>
100 <td></td>
101 <td>Fetches a <em>comment response</em> for the
102 comment ID referenced by the <code>comment_id</code>
103 URL parameter.</td>
104 <td><code>{"comment":<a href=
105 "#comment-response">comment-response</a>}</code></td>
106 <td>
107 <a href=
108 "/api/v1/json/comments/1000"><code>/api/v1/json/comments/1000</code></a>
109 </td>
110 </tr>
111 <tr>
112 <td><code>GET</code></td>
113 <td><code>/api/v1/json/images/:image_id</code></td>
114 <td><code>key, filter_id</code></td>
115 <td>Fetches an <em>image response</em> for the image
116 ID referenced by the <code>image_id</code> URL
117 parameter.</td>
118 <td><code>{"image":<a href=
119 "#image-response">image-response</a>}</code></td>
120 <td>
121 <a href=
122 "/api/v1/json/images/1"><code>/api/v1/json/images/1</code></a>
123 </td>
124 </tr>
125 <tr>
126 <td><code>GET</code></td>
127 <td><code>/api/v1/json/images/featured</code></td>
128 <td></td>
129 <td>Fetches an <em>image response</em> for the for
130 the current featured image.</td>
131 <td><code>{"image":<a href=
132 "#image-response">image-response</a>}</code></td>
133 <td>
134 <a href=
135 "/api/v1/json/images/featured"><code>/api/v1/json/images/featured</code></a>
136 </td>
137 </tr>
138 <tr>
139 <td><code>GET</code></td>
140 <td><code>/api/v1/json/tags/:tag_id</code></td>
141 <td></td>
142 <td>Fetches a <em>tag response</em> for the <em>tag
143 slug</em> given by the <code>tag_id</code> URL
144 parameter. The tag's ID is <em>not</em> used.</td>
145 <td><code>{"tag":<a href=
146 "#tag-response">tag-response</a>}</code></td>
147 <td>
148 <a href=
149 "/api/v1/json/tags/artist-colon-atryl"><code>/api/v1/json/tags/artist-colon-atryl</code></a>
150 </td>
151 </tr>
152 <tr>
153 <td><code>GET</code></td>
154 <td><code>/api/v1/json/posts/:post_id</code></td>
155 <td></td>
156 <td>Fetches a <em>post response</em> for the post ID
157 given by the <code>post_id</code> URL parameter.</td>
158 <td><code>{"post":<a href=
159 "#post-response">post-response</a>}</code></td>
160 <td>
161 <a href=
162 "/api/v1/json/posts/2730144"><code>/api/v1/json/posts/2730144</code></a>
163 </td>
164 </tr>
165 <tr>
166 <td><code>GET</code></td>
167 <td><code>/api/v1/json/profiles/:user_id</code></td>
168 <td></td>
169 <td>Fetches a <em>profile response</em> for the user
170 ID given by the <code>user_id</code> URL
171 parameter.</td>
172 <td><code>{"user":<a href=
173 "#user-response">user-response</a>}</code></td>
174 <td>
175 <a href=
176 "/api/v1/json/profiles/216494"><code>/api/v1/json/profiles/216494</code></a>
177 </td>
178 </tr>
179 <tr>
180 <td><code>GET</code></td>
181 <td><code>/api/v1/json/filters/:filter_id</code></td>
182 <td><code>key</code></td>
183 <td>Fetches a <em>filter response</em> for the filter
184 ID given by the <code>filter_id</code> URL
185 parameter.</td>
186 <td><code>{"filter":<a href=
187 "#filter-response">filter-response</a>}</code></td>
188 <td>
189 <a href=
190 "/api/v1/json/filters/56027"><code>/api/v1/json/filters/56027</code></a>
191 </td>
192 </tr>
193 <tr>
194 <td><code>GET</code></td>
195 <td><code>/api/v1/json/filters/system</code></td>
196 <td><code>page</code></td>
197 <td>Fetches a list of <em>filter responses</em> that
198 are flagged as being <em>system</em> filters (and
199 thus usable by anyone).</td>
200 <td><code>{"filters":[<a href=
201 "#filter-response">filter-response</a>]}</code></td>
202 <td>
203 <a href=
204 "/api/v1/json/filters/system"><code>/api/v1/json/filters/system</code></a>
205 </td>
206 </tr>
207 <tr>
208 <td><code>GET</code></td>
209 <td><code>/api/v1/json/filters/user</code></td>
210 <td><code>key, page</code></td>
211 <td>Fetches a list of <em>filter responses</em> that
212 belong to the user given by <em>key</em>. If no
213 <em>key</em> is given or it is invalid, will return a
214 <em>403 Forbidden</em> error.</td>
215 <td><code>{"filters":[<a href=
216 "#filter-response">filter-response</a>]}</code></td>
217 <td>
218 <a href=
219 "/api/v1/json/filters/user"><code>/api/v1/json/filters/user</code></a>
220 </td>
221 </tr>
222 <tr>
223 <td><code>GET</code></td>
224 <td><code>/api/v1/json/oembed</code></td>
225 <td><code>url</code></td>
226 <td>Fetches an <em>oEmbed response</em> for the given
227 app link or CDN URL.</td>
228 <td><code><a href=
229 "#oembed-response">oembed-response</a></code></td>
230 <td>
231 <a href=
232 "/api/v1/json/oembed?url=https://derpicdn.net/img/2012/1/2/3/full.png">
233 <code>/api/v1/json/oembed?url=https://derpicdn.net/img/2012/1/2/3/full.png</code></a>
234 </td>
235 </tr>
236 <tr>
237 <td><code>GET</code></td>
238 <td><code>/api/v1/json/search/comments</code></td>
239 <td><code>key, page</code></td>
240 <td>Executes the search given by the <code>q</code>
241 query parameter, and returns <em>comment
242 responses</em> sorted by descending creation
243 time.</td>
244 <td><code>{"comments":[<a href=
245 "#comment-response">comment-response</a>]}</code></td>
246 <td>
247 <a href=
248 "/api/v1/json/search/comments?q=image_id:1000000"><code>
249 /api/v1/json/search/comments?q=image_id:1000000</code></a>
250 </td>
251 </tr>
252 <tr>
253 <td><code>GET</code></td>
254 <td><code>/api/v1/json/search/galleries</code></td>
255 <td><code>key, page</code></td>
256 <td>Executes the search given by the <code>q</code>
257 query parameter, and returns <em>gallery
258 responses</em> sorted by descending creation
259 time.</td>
260 <td><code>{"galleries":[<a href=
261 "#gallery-response">gallery-response</a>]}</code></td>
262 <td>
263 <a href=
264 "/api/v1/json/search/galleries?q=title:mean*"><code>
265 /api/v1/json/search/galleries?q=title:mean*</code></a>
266 </td>
267 </tr>
268 <tr>
269 <td><code>GET</code></td>
270 <td><code>/api/v1/json/search/posts</code></td>
271 <td><code>key, page</code></td>
272 <td>Executes the search given by the <code>q</code>
273 query parameter, and returns <em>post responses</em>
274 sorted by descending creation time.</td>
275 <td><code>{"posts":[<a href=
276 "#post-response">post-response</a>]}</code></td>
277 <td>
278 <a href=
279 "/api/v1/json/search/posts?q=subject:time%20wasting%20thread">
280 <code>/api/v1/json/search/posts?q=subject:time
281 wasting thread</code></a>
282 </td>
283 </tr>
284 <tr>
285 <td><code>GET</code></td>
286 <td><code>/api/v1/json/search/images</code></td>
287 <td><code>key, filter_id, page, per_page, q, sd,
288 sf</code></td>
289 <td>Executes the search given by the <code>q</code>
290 query parameter, and returns <em>image
291 responses</em>.</td>
292 <td><code>{"images":[<a href=
293 "#image-response">image-response</a>]}</code></td>
294 <td>
295 <a href=
296 "/api/v1/json/search/images?q=safe"><code>/api/v1/json/search/images?q=safe</code></a>
297 </td>
298 </tr>
299 <tr>
300 <td><code>GET</code></td>
301 <td><code>/api/v1/json/search/tags</code></td>
302 <td><code>page</code></td>
303 <td>Executes the search given by the <code>q</code>
304 query parameter, and returns <em>tag responses</em>
305 sorted by descending image count.</td>
306 <td><code>{"tags":[<a href=
307 "#tag-response">tag-response</a>]}</code></td>
308 <td>
309 <a href=
310 "/api/v1/json/search/tags?q=analyzed_name:wing"><code>
311 /api/v1/json/search/tags?q=analyzed_name:wing</code></a>
312 </td>
313 </tr>
314 <tr>
315 <td><code>POST</code></td>
316 <td><code>/api/v1/json/search/reverse</code></td>
317 <td><code>key, url, distance</code></td>
318 <td>Returns <em>image responses</em> based on the
319 results of reverse-searching the image given by the
320 <code>url</code> query parameter.</td>
321 <td><code>{"images":[<a href=
322 "#image-response">image-response</a>]}</code></td>
323 <td>
324 <a href=
325 "/api/v1/json/search/reverse?url=https://derpicdn.net/img/2019/12/24/2228439/full.jpg"
326 data-method=
327 "post"><code>/api/v1/json/search/reverse?url=https://derpicdn.net/img/2019/12/24/2228439/full.jpg</code></a>
328 </td>
329 </tr>
330 <tr>
331 <td><code>GET</code></td>
332 <td><code>/api/v1/json/forums</code></td>
333 <td></td>
334 <td>Fetches a list of <em>forum responses</em>.</td>
335 <td><code>{"forums":<a href=
336 "#forum-response">forum-response</a>}</code></td>
337 <td>
338 <a href=
339 "/api/v1/json/forums"><code>/api/v1/json/forums</code></a>
340 </td>
341 </tr>
342 <tr>
343 <td><code>GET</code></td>
344 <td><code>/api/v1/json/forums/:short_name</code></td>
345 <td></td>
346 <td>Fetches a <em>forum response</em> for the
347 abbreviated name given by the <code>short_name</code>
348 URL parameter.</td>
349 <td><code>{"forum":<a href=
350 "#forum-response">forum-response</a>}</code></td>
351 <td>
352 <a href=
353 "/api/v1/json/forums/dis"><code>/api/v1/json/forums/dis</code></a>
354 </td>
355 </tr>
356 <tr>
357 <td><code>GET</code></td>
358 <td>
359 <code>/api/v1/json/forums/:short_name/topics</code></td>
360 <td><code>page</code></td>
361 <td>Fetches a list of <em>topic responses</em> for
362 the abbreviated forum name given by the
363 <code>short_name</code> URL parameter.</td>
364 <td><code>{"topics":<a href=
365 "#topic-response">topic-response</a>}</code></td>
366 <td>
367 <a href=
368 "/api/v1/json/forums/dis/topics"><code>/api/v1/json/forums/dis/topics</code></a>
369 </td>
370 </tr>
371 <tr>
372 <td><code>GET</code></td>
373 <td>
374 <code>/api/v1/json/forums/:short_name/topics/:topic_slug</code></td>
375 <td></td>
376 <td>Fetches a <em>topic response</em> for the
377 abbreviated forum name given by the
378 <code>short_name</code> and topic given by
379 <code>topic_slug</code> URL parameters.</td>
380 <td><code>{"topic":<a href=
381 "#topic-response">topic-response</a>}</code></td>
382 <td>
383 <a href=
384 "/api/v1/json/forums/dis/topics/ask-the-mods-anything">
385 <code>/api/v1/json/forums/dis/topics/ask-the-mods-anything</code></a>
386 </td>
387 </tr>
388 <tr>
389 <td><code>GET</code></td>
390 <td>
391 <code>/api/v1/json/forums/:short_name/topics/:topic_slug/posts</code></td>
392 <td><code>page</code></td>
393 <td>Fetches a list of <em>post responses</em> for the
394 abbreviated forum name given by the
395 <code>short_name</code> and topic given by
396 <code>topic_slug</code> URL parameters.</td>
397 <td><code>{"posts":<a href=
398 "#post-response">post-response</a>}</code></td>
399 <td>
400 <a href=
401 "/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts">
402 <code>/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts</code></a>
403 </td>
404 </tr>
405 <tr>
406 <td><code>GET</code></td>
407 <td>
408 <code>/api/v1/json/forums/:short_name/topics/:topic_slug/posts/:post_id</code></td>
409 <td></td>
410 <td>Fetches a <em>post response</em> for the
411 abbreviated forum name given by the
412 <code>short_name</code>, topic given by
413 <code>topic_slug</code> and post given by
414 <code>post_id</code> URL parameters.</td>
415 <td><code>{"post":<a href=
416 "#post-response">post-response</a>}</code></td>
417 <td>
418 <a href=
419 "/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts/2761095">
420 <code>/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts/2761095</code></a>
421 </td>
422 </tr>
423 </tbody>
424 </table>
425 <h2 id="image-response">Image Responses</h2>
426 <table class="table">
427 <thead>
428 <tr>
429 <th>Field</th>
430 <th>Type</th>
431 <th>Description</th>
432 </tr>
433 </thead>
434 <tbody>
435 <tr>
436 <td><code>aspect_ratio</code></td>
437 <td>Float</td>
438 <td>The image's width divided by its height.</td>
439 </tr>
440 <tr>
441 <td><code>comment_count</code></td>
442 <td>Integer</td>
443 <td>The number of comments made on the image.</td>
444 </tr>
445 <tr>
446 <td><code>created_at</code></td>
447 <td>RFC3339 datetime</td>
448 <td>The creation time, in UTC, of the image.</td>
449 </tr>
450 <tr>
451 <td><code>deletion_reason</code></td>
452 <td>String</td>
453 <td>The hide reason for the image, or
454 <code>null</code> if none provided. This will only
455 have a value on images which are deleted for a rule
456 violation.</td>
457 </tr>
458 <tr>
459 <td><code>description</code></td>
460 <td>String</td>
461 <td>The image's description.</td>
462 </tr>
463 <tr>
464 <td><code>downvotes</code></td>
465 <td>Integer</td>
466 <td>The number of downvotes the image has.</td>
467 </tr>
468 <tr>
469 <td><code>duplicate_of</code></td>
470 <td>Integer</td>
471 <td>The ID of the target image, or <code>null</code>
472 if none provided. This will only have a value on
473 images which are merged into another image.</td>
474 </tr>
475 <tr>
476 <td><code>faves</code></td>
477 <td>Integer</td>
478 <td>The number of faves the image has.</td>
479 </tr>
480 <tr>
481 <td><code>first_seen_at</code></td>
482 <td>RFC3339 datetime</td>
483 <td>The time, in UTC, this image was first seen
484 (before any duplicate merging).</td>
485 </tr>
486 <tr>
487 <td><code>format</code></td>
488 <td>String</td>
489 <td>The file extension of this image. One of
490 <code>"gif", "jpg", "jpeg", "png", "svg",
491 "webm"</code>.</td>
492 </tr>
493 <tr>
494 <td><code>height</code></td>
495 <td>Integer</td>
496 <td>The image's height, in pixels.</td>
497 </tr>
498 <tr>
499 <td><code>hidden_from_users</code></td>
500 <td>Boolean</td>
501 <td>Whether this image is hidden. An image is hidden
502 if it is merged or deleted for a rule violation.</td>
503 </tr>
504 <tr>
505 <td><code>id</code></td>
506 <td>Integer</td>
507 <td>The image's ID.</td>
508 </tr>
509 <tr>
510 <td><code>intensities</code></td>
511 <td>Object</td>
512 <td>
513 Optional object of <a href=
514 "https://github.com/derpibooru/cli_intensities">internal
515 image intensity data</a> for deduplication
516 purposes. May be <code>null</code> if intensities
517 have not yet been generated.
518 </td>
519 </tr>
520 <tr>
521 <td><code>mime_type</code></td>
522 <td>String</td>
523 <td>The MIME type of this image. One of
524 <code>"image/gif", "image/jpeg", "image/png",
525 "image/svg+xml", "video/webm"</code>.</td>
526 </tr>
527 <tr>
528 <td><code>name</code></td>
529 <td>String</td>
530 <td>The filename that this image was uploaded
531 with.</td>
532 </tr>
533 <tr>
534 <td><code>orig_sha512_hash</code></td>
535 <td>String</td>
536 <td>The SHA512 hash of this image as it was
537 originally uploaded.</td>
538 </tr>
539 <tr>
540 <td><code>processed</code></td>
541 <td>Boolean</td>
542 <td>Whether the image has finished optimization.</td>
543 </tr>
544 <tr>
545 <td><code>representations</code></td>
546 <td>Object</td>
547 <td>A mapping of representation names to their
548 respective URLs. Contains the keys <code>"full",
549 "large", "medium", "small", "tall", "thumb",
550 "thumb_small", "thumb_tiny"</code>.</td>
551 </tr>
552 <tr>
553 <td><code>score</code></td>
554 <td>Integer</td>
555 <td>The image's number of upvotes minus the image's
556 number of downvotes.</td>
557 </tr>
558 <tr>
559 <td><code>sha512_hash</code></td>
560 <td>String</td>
561 <td>The SHA512 hash of this image after it has been
562 processed.</td>
563 </tr>
564 <tr>
565 <td><code>source_url</code></td>
566 <td>String</td>
567 <td>The current source URL of the image.</td>
568 </tr>
569 <tr>
570 <td><code>spoilered</code></td>
571 <td>Boolean</td>
572 <td>Whether this image is hit by the current
573 filter.</td>
574 </tr>
575 <tr>
576 <td><code>tag_count</code></td>
577 <td>Integer</td>
578 <td>The number of tags present on this image.</td>
579 </tr>
580 <tr>
581 <td><code>tag_ids</code></td>
582 <td>Array</td>
583 <td>A list of tag IDs this image contains.</td>
584 </tr>
585 <tr>
586 <td><code>tags</code></td>
587 <td>Array</td>
588 <td>A list of tag names this image contains.</td>
589 </tr>
590 <tr>
591 <td><code>thumbnails_generated</code></td>
592 <td>Boolean</td>
593 <td>Whether this image has finished thumbnail
594 generation. Do not attempt to load images from
595 <code>view_url</code> or <code>representations</code>
596 if this is false.</td>
597 </tr>
598 <tr>
599 <td><code>updated_at</code></td>
600 <td>RFC3339 datetime</td>
601 <td>The time, in UTC, the image was last
602 updated.</td>
603 </tr>
604 <tr>
605 <td><code>uploader</code></td>
606 <td>String</td>
607 <td>The image's uploader.</td>
608 </tr>
609 <tr>
610 <td><code>uploader_id</code></td>
611 <td>Integer</td>
612 <td>The ID of the image's uploader.</td>
613 </tr>
614 <tr>
615 <td><code>upvotes</code></td>
616 <td>Integer</td>
617 <td>The image's number of upvotes.</td>
618 </tr>
619 <tr>
620 <td><code>view_url</code></td>
621 <td>String</td>
622 <td>The image's view URL, including tags.</td>
623 </tr>
624 <tr>
625 <td><code>width</code></td>
626 <td>Integer</td>
627 <td>The image's width, in pixels.</td>
628 </tr>
629 <tr>
630 <td><code>wilson_score</code></td>
631 <td>Float</td>
632 <td>
633 The lower bound of the <a href=
634 "https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval">
635 Wilson score interval</a> for the image, based on
636 its upvotes and downvotes, given a z-score
637 corresponding to a confidence of 99.5%.
638 </td>
639 </tr>
640 </tbody>
641 </table>
642 <h2 id="comment-response">Comment Responses</h2>
643 <table class="table">
644 <thead>
645 <tr>
646 <th>Field</th>
647 <th>Type</th>
648 <th>Description</th>
649 </tr>
650 </thead>
651 <tbody>
652 <tr>
653 <td><code>author</code></td>
654 <td>String</td>
655 <td>The comment's author.</td>
656 </tr>
657 <tr>
658 <td><code>avatar</code></td>
659 <td>String</td>
660 <td>The URL of the author's avatar. May be a link to
661 the CDN path, or a <code>data:</code> URI.</td>
662 </tr>
663 <tr>
664 <td><code>body</code></td>
665 <td>String</td>
666 <td>The comment text.</td>
667 </tr>
668 <tr>
669 <td><code>created_at</code></td>
670 <td>RFC3339 datetime</td>
671 <td>The creation time, in UTC, of the comment.</td>
672 </tr>
673 <tr>
674 <td><code>edit_reason</code></td>
675 <td>String</td>
676 <td>The edit reason for this comment, or
677 <code>null</code> if none provided.</td>
678 </tr>
679 <tr>
680 <td><code>edited_at</code></td>
681 <td>RFC3339 datetime</td>
682 <td>The time, in UTC, this comment was last edited
683 at, or <code>null</code> if it was not edited.</td>
684 </tr>
685 <tr>
686 <td><code>id</code></td>
687 <td>Integer</td>
688 <td>The comment's ID.</td>
689 </tr>
690 <tr>
691 <td><code>image_id</code></td>
692 <td>Integer</td>
693 <td>The ID of the image the comment belongs to.</td>
694 </tr>
695 <tr>
696 <td><code>updated_at</code></td>
697 <td>RFC3339 dateime</td>
698 <td>The time, in UTC, the comment was last updated
699 at.</td>
700 </tr>
701 <tr>
702 <td><code>user_id</code></td>
703 <td>Integer</td>
704 <td>The ID of the user the comment belongs to, if
705 any.</td>
706 </tr>
707 </tbody>
708 </table>
709 <h2 id="forum-response">Forum Responses</h2>
710 <table class="table">
711 <thead>
712 <tr>
713 <th>Field</th>
714 <th>Type</th>
715 <th>Description</th>
716 </tr>
717 </thead>
718 <tbody>
719 <tr>
720 <td><code>name</code></td>
721 <td>String</td>
722 <td>The forum's name.</td>
723 </tr>
724 <tr>
725 <td><code>short_name</code></td>
726 <td>String</td>
727 <td>The forum's short name (used to identify
728 it).</td>
729 </tr>
730 <tr>
731 <td><code>description</code></td>
732 <td>String</td>
733 <td>The forum's description.</td>
734 </tr>
735 <tr>
736 <td><code>topic_count</code></td>
737 <td>Integer</td>
738 <td>The amount of topics in the forum.</td>
739 </tr>
740 <tr>
741 <td><code>post_count</code></td>
742 <td>Integer</td>
743 <td>The amount of posts in the forum.</td>
744 </tr>
745 </tbody>
746 </table>
747 <h2 id="topic-response">Topic Responses</h2>
748 <table class="table">
749 <thead>
750 <tr>
751 <th>Field</th>
752 <th>Type</th>
753 <th>Description</th>
754 </tr>
755 </thead>
756 <tbody>
757 <tr>
758 <td><code>slug</code></td>
759 <td>String</td>
760 <td>The topic's slug (used to identify it).</td>
761 </tr>
762 <tr>
763 <td><code>title</code></td>
764 <td>String</td>
765 <td>The topic's title.</td>
766 </tr>
767 <tr>
768 <td><code>post_count</code></td>
769 <td>Integer</td>
770 <td>The amount of posts in the topic.</td>
771 </tr>
772 <tr>
773 <td><code>view_count</code></td>
774 <td>Integer</td>
775 <td>The amount of views the topic has received.</td>
776 </tr>
777 <tr>
778 <td><code>sticky</code></td>
779 <td>Boolean</td>
780 <td>Whether the topic is sticky.</td>
781 </tr>
782 <tr>
783 <td><code>last_replied_to_at</code></td>
784 <td>RFC3339 datetime</td>
785 <td>The time, in UTC, when the last reply was
786 made.</td>
787 </tr>
788 <tr>
789 <td><code>locked</code></td>
790 <td>Boolean</td>
791 <td>Whether the topic is locked.</td>
792 </tr>
793 <tr>
794 <td><code>user_id</code></td>
795 <td>Integer</td>
796 <td>The ID of the user who made the topic.
797 <code>Null</code> if posted anonymously.</td>
798 </tr>
799 <tr>
800 <td><code>author</code></td>
801 <td>String</td>
802 <td>The name of the user who made the topic.</td>
803 </tr>
804 </tbody>
805 </table>
806 <h2 id="post-response">Post Responses</h2>
807 <table class="table">
808 <thead>
809 <tr>
810 <th>Field</th>
811 <th>Type</th>
812 <th>Description</th>
813 </tr>
814 </thead>
815 <tbody>
816 <tr>
817 <td><code>author</code></td>
818 <td>String</td>
819 <td>The post's author.</td>
820 </tr>
821 <tr>
822 <td><code>avatar</code></td>
823 <td>String</td>
824 <td>The URL of the author's avatar. May be a link to
825 the CDN path, or a <code>data:</code> URI.</td>
826 </tr>
827 <tr>
828 <td><code>body</code></td>
829 <td>String</td>
830 <td>The post text.</td>
831 </tr>
832 <tr>
833 <td><code>created_at</code></td>
834 <td>RFC3339 datetime</td>
835 <td>The creation time, in UTC, of the post.</td>
836 </tr>
837 <tr>
838 <td><code>edit_reason</code></td>
839 <td>String</td>
840 <td>The edit reason for this post.</td>
841 </tr>
842 <tr>
843 <td><code>edited_at</code></td>
844 <td>RFC3339 datetime</td>
845 <td>The time, in UTC, this post was last edited at,
846 or <code>null</code> if it was not edited.</td>
847 </tr>
848 <tr>
849 <td><code>id</code></td>
850 <td>Integer</td>
851 <td>The post's ID (used to identify it).</td>
852 </tr>
853 <tr>
854 <td><code>updated_at</code></td>
855 <td>RFC3339 dateime</td>
856 <td>The time, in UTC, the post was last updated
857 at.</td>
858 </tr>
859 <tr>
860 <td><code>user_id</code></td>
861 <td>Integer</td>
862 <td>The ID of the user the post belongs to, if
863 any.</td>
864 </tr>
865 </tbody>
866 </table>
867 <h2 id="tag-response">Tag Responses</h2>
868 <table class="table">
869 <thead>
870 <tr>
871 <th>Field</th>
872 <th>Type</th>
873 <th>Description</th>
874 </tr>
875 </thead>
876 <tbody>
877 <tr>
878 <td><code>aliased_tag</code></td>
879 <td>String</td>
880 <td>The slug of the tag this tag is aliased to, if
881 any.</td>
882 </tr>
883 <tr>
884 <td><code>aliases</code></td>
885 <td>Array</td>
886 <td>The slugs of the tags aliased to this tag.</td>
887 </tr>
888 <tr>
889 <td><code>category</code></td>
890 <td>String</td>
891 <td>The category class of this tag. One of
892 <code>"character", "content-fanmade",
893 "content-official", "error", "oc", "origin",
894 "rating", "species", "spoiler"</code>.</td>
895 </tr>
896 <tr>
897 <td><code>description</code></td>
898 <td>String</td>
899 <td>The long description for the tag.</td>
900 </tr>
901 <tr>
902 <td><code>dnp_entries</code></td>
903 <td>Array</td>
904 <td>An array of objects containing DNP entries
905 claimed on the tag.</td>
906 </tr>
907 <tr>
908 <td><code>id</code></td>
909 <td>Integer</td>
910 <td>The tag's ID.</td>
911 </tr>
912 <tr>
913 <td><code>images</code></td>
914 <td>Integer</td>
915 <td>The image count of the tag.</td>
916 </tr>
917 <tr>
918 <td><code>implied_by_tags</code></td>
919 <td>Array</td>
920 <td>The slugs of the tags this tag is implied
921 by.</td>
922 </tr>
923 <tr>
924 <td><code>implied_tags</code></td>
925 <td>Array</td>
926 <td>The slugs of the tags this tag implies.</td>
927 </tr>
928 <tr>
929 <td><code>name</code></td>
930 <td>String</td>
931 <td>The name of the tag.</td>
932 </tr>
933 <tr>
934 <td><code>name_in_namespace</code></td>
935 <td>String</td>
936 <td>The name of the tag in its namespace.</td>
937 </tr>
938 <tr>
939 <td><code>namespace</code></td>
940 <td>String</td>
941 <td>The namespace of the tag.</td>
942 </tr>
943 <tr>
944 <td><code>short_description</code></td>
945 <td>String</td>
946 <td>The short description for the tag.</td>
947 </tr>
948 <tr>
949 <td><code>slug</code></td>
950 <td>String</td>
951 <td>The slug for the tag.</td>
952 </tr>
953 <tr>
954 <td><code>spoiler_image</code></td>
955 <td>String</td>
956 <td>The spoiler image URL for the tag.</td>
957 </tr>
958 </tbody>
959 </table>
960 <h2 id="user-response">User Responses</h2>
961 <table class="table">
962 <thead>
963 <tr>
964 <th>Field</th>
965 <th>Type</th>
966 <th>Description</th>
967 </tr>
968 </thead>
969 <tbody>
970 <tr>
971 <td><code>id</code></td>
972 <td>Integer</td>
973 <td>The ID of the user.</td>
974 </tr>
975 <tr>
976 <td><code>name</code></td>
977 <td>String</td>
978 <td>The name of the user.</td>
979 </tr>
980 <tr>
981 <td><code>slug</code></td>
982 <td>String</td>
983 <td>The slug of the user.</td>
984 </tr>
985 <tr>
986 <td><code>role</code></td>
987 <td>String</td>
988 <td>The role of the user.</td>
989 </tr>
990 <tr>
991 <td><code>description</code></td>
992 <td>String</td>
993 <td>The description (bio) of the user.</td>
994 </tr>
995 <tr>
996 <td><code>avatar_url</code></td>
997 <td>String</td>
998 <td>The URL of the user's thumbnail.
999 <code>Null</code> if they haven't set one.</td>
1000 </tr>
1001 <tr>
1002 <td><code>created_at</code></td>
1003 <td>RFC3339 datetime</td>
1004 <td>The creation time, in UTC, of the user.</td>
1005 </tr>
1006 <tr>
1007 <td><code>comments_count</code></td>
1008 <td>Integer</td>
1009 <td>The comment count of the user.</td>
1010 </tr>
1011 <tr>
1012 <td><code>uploads_count</code></td>
1013 <td>Integer</td>
1014 <td>The upload count of the user.</td>
1015 </tr>
1016 <tr>
1017 <td><code>posts_count</code></td>
1018 <td>Integer</td>
1019 <td>The forum posts count of the user.</td>
1020 </tr>
1021 <tr>
1022 <td><code>topics_count</code></td>
1023 <td>Integer</td>
1024 <td>The forum topics count of the user.</td>
1025 </tr>
1026 <tr>
1027 <td><code>links</code></td>
1028 <td>Object</td>
1029 <td>
1030 The links the user has registered. See <a href=
1031 "#links-response">links-response</a>.
1032 </td>
1033 </tr>
1034 <tr>
1035 <td><code>awards</code></td>
1036 <td>Object</td>
1037 <td>
1038 The awards/badges of the user. See <a href=
1039 "#awards-response">awards-response</a>.
1040 </td>
1041 </tr>
1042 </tbody>
1043 </table>
1044 <h2 id="filter-response">Filter Responses</h2>
1045 <table class="table">
1046 <thead>
1047 <tr>
1048 <th>Field</th>
1049 <th>Type</th>
1050 <th>Description</th>
1051 </tr>
1052 </thead>
1053 <tbody>
1054 <tr>
1055 <td><code>id</code></td>
1056 <td>Integer</td>
1057 <td>The id of the filter.</td>
1058 </tr>
1059 <tr>
1060 <td><code>name</code></td>
1061 <td>String</td>
1062 <td>The name of the filter.</td>
1063 </tr>
1064 <tr>
1065 <td><code>description</code></td>
1066 <td>String</td>
1067 <td>The description of the filter.</td>
1068 </tr>
1069 <tr>
1070 <td><code>user_id</code></td>
1071 <td>Integer</td>
1072 <td>The id of the user the filter belongs to.
1073 <code>Null</code> if it isn't assigned to a user
1074 (usually <code>system</code> filters only).</td>
1075 </tr>
1076 <tr>
1077 <td><code>user_count</code></td>
1078 <td>Integer</td>
1079 <td>The amount of users employing this filter.</td>
1080 </tr>
1081 <tr>
1082 <td><code>system</code></td>
1083 <td>Boolean</td>
1084 <td>If <code>true</code>, is a system filter. System
1085 filters are usable by anyone and don't have a
1086 <code>user_id</code> set.</td>
1087 </tr>
1088 <tr>
1089 <td><code>public</code></td>
1090 <td>Boolean</td>
1091 <td>If <code>true</code>, is a public filter. Public
1092 filters are usable by anyone.</td>
1093 </tr>
1094 <tr>
1095 <td><code>spoilered_tag_ids</code></td>
1096 <td>Array</td>
1097 <td>A list of tag IDs (as integers) that this filter
1098 will spoil.</td>
1099 </tr>
1100 <tr>
1101 <td><code>spoilered_complex</code></td>
1102 <td>String</td>
1103 <td>The complex spoiled filter.</td>
1104 </tr>
1105 <tr>
1106 <td><code>hidden_tag_ids</code></td>
1107 <td>Array</td>
1108 <td>A list of tag IDs (as integers) that this filter
1109 will hide.</td>
1110 </tr>
1111 <tr>
1112 <td><code>hidden_complex</code></td>
1113 <td>String</td>
1114 <td>The complex hidden filter.</td>
1115 </tr>
1116 </tbody>
1117 </table>
1118 <h2 id="links-response">Links Responses</h2>
1119 <table class="table">
1120 <thead>
1121 <tr>
1122 <th>Field</th>
1123 <th>Type</th>
1124 <th>Description</th>
1125 </tr>
1126 </thead>
1127 <tbody>
1128 <tr>
1129 <td><code>user_id</code></td>
1130 <td>Integer</td>
1131 <td>The ID of the user who owns this link.</td>
1132 </tr>
1133 <tr>
1134 <td><code>created_at</code></td>
1135 <td>RFC3339 datetime</td>
1136 <td>The creation time, in UTC, of this link.</td>
1137 </tr>
1138 <tr>
1139 <td><code>state</code></td>
1140 <td>String</td>
1141 <td>The state of this link.</td>
1142 </tr>
1143 <tr>
1144 <td><code>tag_id</code></td>
1145 <td>Integer</td>
1146 <td>The ID of an associated tag for this link.
1147 <code>Null</code> if no tag linked.</td>
1148 </tr>
1149 </tbody>
1150 </table>
1151 <h2 id="awards-response">Awards Responses</h2>
1152 <table class="table">
1153 <thead>
1154 <tr>
1155 <th>Field</th>
1156 <th>Type</th>
1157 <th>Description</th>
1158 </tr>
1159 </thead>
1160 <tbody>
1161 <tr>
1162 <td><code>image_url</code></td>
1163 <td>String</td>
1164 <td>The URL of this award.</td>
1165 </tr>
1166 <tr>
1167 <td><code>title</code></td>
1168 <td>String</td>
1169 <td>The title of this award.</td>
1170 </tr>
1171 <tr>
1172 <td><code>id</code></td>
1173 <td>Integer</td>
1174 <td>The ID of the badge this award is derived
1175 from.</td>
1176 </tr>
1177 <tr>
1178 <td><code>label</code></td>
1179 <td>String</td>
1180 <td>The label of this award.</td>
1181 </tr>
1182 <tr>
1183 <td><code>awarded_on</code></td>
1184 <td>RFC3339 datetime</td>
1185 <td>The time, in UTC, when this award was given.</td>
1186 </tr>
1187 </tbody>
1188 </table>
1189 <h2 id="gallery-response">Gallery Responses</h2>
1190 <table class="table">
1191 <thead>
1192 <tr>
1193 <th>Field</th>
1194 <th>Type</th>
1195 <th>Description</th>
1196 </tr>
1197 </thead>
1198 <tbody>
1199 <tr>
1200 <td><code>description</code></td>
1201 <td>String</td>
1202 <td>The gallery's description.</td>
1203 </tr>
1204 <tr>
1205 <td><code>id</code></td>
1206 <td>Integer</td>
1207 <td>The gallery's ID.</td>
1208 </tr>
1209 <tr>
1210 <td><code>spoiler_warning</code></td>
1211 <td>String</td>
1212 <td>The gallery's spoiler warning.</td>
1213 </tr>
1214 <tr>
1215 <td><code>thumbnail_id</code></td>
1216 <td>Integer</td>
1217 <td>The ID of the cover image for the gallery.</td>
1218 </tr>
1219 <tr>
1220 <td><code>title</code></td>
1221 <td>String</td>
1222 <td>The gallery's title.</td>
1223 </tr>
1224 <tr>
1225 <td><code>user</code></td>
1226 <td>String</td>
1227 <td>The name of the gallery's creator.</td>
1228 </tr>
1229 <tr>
1230 <td><code>user_id</code></td>
1231 <td>Integer</td>
1232 <td>The ID of the gallery's creator.</td>
1233 </tr>
1234 </tbody>
1235 </table>
1236 <h2 id="oembed-response">Oembed Responses</h2>
1237 <table class="table">
1238 <thead>
1239 <tr>
1240 <th>Field</th>
1241 <th>Type</th>
1242 <th>Description</th>
1243 </tr>
1244 </thead>
1245 <tbody>
1246 <tr>
1247 <td><code>author_name</code></td>
1248 <td>String</td>
1249 <td>The comma-delimited names of the image
1250 authors.</td>
1251 </tr>
1252 <tr>
1253 <td><code>author_url</code></td>
1254 <td>String</td>
1255 <td>The source URL of the image.</td>
1256 </tr>
1257 <tr>
1258 <td><code>cache_age</code></td>
1259 <td>Integer</td>
1260 <td>Always <code>7200</code>.</td>
1261 </tr>
1262 <tr>
1263 <td><code>derpibooru_comments</code></td>
1264 <td>Integer</td>
1265 <td>The number of comments made on the image.</td>
1266 </tr>
1267 <tr>
1268 <td><code>derpibooru_id</code></td>
1269 <td>Integer</td>
1270 <td>The image's ID.</td>
1271 </tr>
1272 <tr>
1273 <td><code>derpibooru_score</code></td>
1274 <td>Integer</td>
1275 <td>The image's number of upvotes minus the image's
1276 number of downvotes.</td>
1277 </tr>
1278 <tr>
1279 <td><code>derpibooru_tags</code></td>
1280 <td>Array</td>
1281 <td>The names of the image's tags.</td>
1282 </tr>
1283 <tr>
1284 <td><code>provider_name</code></td>
1285 <td>String</td>
1286 <td>Always <code>"Derpibooru"</code>.</td>
1287 </tr>
1288 <tr>
1289 <td><code>provider_url</code></td>
1290 <td>String</td>
1291 <td>Always <code>"https://furbooru.org"</code>.</td>
1292 </tr>
1293 <tr>
1294 <td><code>title</code></td>
1295 <td>String</td>
1296 <td>The image's ID and associated tags, as would be
1297 given on the title of the image page.</td>
1298 </tr>
1299 <tr>
1300 <td><code>type</code></td>
1301 <td>String</td>
1302 <td>Always <code>"photo"</code>.</td>
1303 </tr>
1304 <tr>
1305 <td><code>version</code></td>
1306 <td>String</td>
1307 <td>Always <code>"1.0"</code>.</td>
1308 </tr>
1309 </tbody>
1310 </table>
1311 </div>
1 <p>Furbooru provides a JSON API for major site functionality, which can be freely used by anyone wanting to produce tools for the site or other web applications that use the data provided within Furbooru.</p>
2 <h2 id="licensing">Licensing</h2>
3 <p>Anyone may use the API. Users making abusively high numbers of requests or excessively expensive requests will be asked to stop, and banned if they do not. Your application must properly cache, and respect server-side cache expiry times. Your client must gracefully back off if requests fail, preferably exponentially or fatally.</p>
4 <p>If images are used, the artist must always be credited (if provided) and the original source URL must be displayed alongside the image, either in textual form or as a link. A link to the Furbooru page is optional but recommended; we recommend the furbooru.org domain as a canonical domain. The <code>https:</code> protocol must be specified on all URLs.</p>
5 <h2 id="parameters">Parameters</h2>
6 <p>This is a list of general parameters that are useful when working with the API. Not all parameters may be used in every request.</p>
7 <table class="table">
8 <thead>
9 <tr>
10 <th>Name</th>
11 <th>Description</th>
12 </tr>
13 </thead>
14 <tbody>
15 <tr>
16 <td><code>filter_id</code></td>
17 <td>Assuming the user can access the filter ID given by the parameter, overrides the current filter for this request. This is primarily useful for unauthenticated API access.</td>
18 </tr>
19 <tr>
20 <td><code>key</code></td>
21 <td>An optional authentication token. If omitted, no user will be authenticated.<br/><br/>You can find your authentication token in your <a href="/registration/edit">account settings</a>.</td>
22 </tr>
23 <tr>
24 <td><code>page</code></td>
25 <td>Controls the current page of the response, if the response is paginated. Empty values default to the first page.</td>
26 </tr>
27 <tr>
28 <td><code>per_page</code></td>
29 <td>Controls the number of results per page, up to a limit of 50, if the response is paginated. The default is 25.</td>
30 </tr>
31 <tr>
32 <td><code>q</code></td>
33 <td>The current search query, if the request is a search request.</td>
34 </tr>
35 <tr>
36 <td><code>sd</code></td>
37 <td>The current sort direction, if the request is a search request.</td>
38 </tr>
39 <tr>
40 <td><code>sf</code></td>
41 <td>The current sort field, if the request is a search request.</td>
42 </tr>
43 </tbody>
44 </table>
45 <h2 id="routes">Routes</h2>
46 <p>The interested reader may find the implementations of these endpoints <a href="https://github.com/furbooru/philomena/tree/master/lib/philomena_web/controllers/api">here</a>. For the purposes of this document, a brief overview is given.</p>
47 <table class="table">
48 <thead>
49 <tr>
50 <th>Method</th>
51 <th>Path</th>
52 <th>Allowed Query Parameters</th>
53 <th>Description</th>
54 <th>Response Format</th>
55 <th>Example</th>
56 </tr>
57 </thead>
58 <tbody>
59 <tr>
60 <td><code>GET</code></td>
61 <td><code>/api/v1/json/comments/:comment_id</code></td>
62 <td></td>
63 <td>Fetches a <em>comment response</em> for the comment ID referenced by the <code>comment_id</code> URL parameter.</td>
64 <td><code>{"comment":<a href="#comment-response">comment-response</a>}</code></td>
65 <td><a href="/api/v1/json/comments/1000"><code>/api/v1/json/comments/1000</code></a></td>
66 </tr>
67 <tr>
68 <td><code>GET</code></td>
69 <td><code>/api/v1/json/images/:image_id</code></td>
70 <td><code>key, filter_id</code></td>
71 <td>Fetches an <em>image response</em> for the image ID referenced by the <code>image_id</code> URL parameter.</td>
72 <td><code>{"image":<a href="#image-response">image-response</a>}</code></td>
73 <td><a href="/api/v1/json/images/1"><code>/api/v1/json/images/1</code></a></td>
74 </tr>
75 <tr>
76 <td><code>GET</code></td>
77 <td><code>/api/v1/json/images/featured</code></td>
78 <td><code></code></td>
79 <td>Fetches an <em>image response</em> for the for the current featured image.</td>
80 <td><code>{"image":<a href="#image-response">image-response</a>}</code></td>
81 <td><a href="/api/v1/json/images/featured"><code>/api/v1/json/images/featured</code></a></td>
82 </tr>
83 <tr>
84 <td><code>GET</code></td>
85 <td><code>/api/v1/json/tags/:tag_id</code></td>
86 <td><code></code></td>
87 <td>Fetches a <em>tag response</em> for the <em>tag slug</em> given by the <code>tag_id</code> URL parameter. The tag's ID is <em>not</em> used.</td>
88 <td><code>{"tag":<a href="#tag-response">tag-response</a>}</code></td>
89 <td><a href="/api/v1/json/tags/artist-colon-atryl"><code>/api/v1/json/tags/artist-colon-atryl</code></a></td>
90 </tr>
91 <tr>
92 <td><code>GET</code></td>
93 <td><code>/api/v1/json/posts/:post_id</code></td>
94 <td><code></code></td>
95 <td>Fetches a <em>post response</em> for the post ID given by the <code>post_id</code> URL parameter.</td>
96 <td><code>{"post":<a href="#post-response">post-response</a>}</code></td>
97 <td><a href="/api/v1/json/posts/2730144"><code>/api/v1/json/posts/2730144</code></a></td>
98 </tr>
99 <tr>
100 <td><code>GET</code></td>
101 <td><code>/api/v1/json/profiles/:user_id</code></td>
102 <td><code></code></td>
103 <td>Fetches a <em>profile response</em> for the user ID given by the <code>user_id</code> URL parameter.</td>
104 <td><code>{"user":<a href="#user-response">user-response</a>}</code></td>
105 <td><a href="/api/v1/json/profiles/216494"><code>/api/v1/json/profiles/216494</code></a></td>
106 </tr>
107 <tr>
108 <td><code>GET</code></td>
109 <td><code>/api/v1/json/filters/:filter_id</code></td>
110 <td><code>key</code></td>
111 <td>Fetches a <em>filter response</em> for the filter ID given by the <code>filter_id</code> URL parameter.</td>
112 <td><code>{"filter":<a href="#filter-response">filter-response</a>}</code></td>
113 <td><a href="/api/v1/json/filters/56027"><code>/api/v1/json/filters/56027</code></a></td>
114 </tr>
115 <tr>
116 <td><code>GET</code></td>
117 <td><code>/api/v1/json/filters/system</code></td>
118 <td><code>page</code></td>
119 <td>Fetches a list of <em>filter responses</em> that are flagged as being <em>system</em> filters (and thus usable by anyone).</td>
120 <td><code>{"filters":[<a href="#filter-response">filter-response</a>]}</code></td>
121 <td><a href="/api/v1/json/filters/system"><code>/api/v1/json/filters/system</code></a></td>
122 </tr>
123 <tr>
124 <td><code>GET</code></td>
125 <td><code>/api/v1/json/filters/user</code></td>
126 <td><code>key, page</code></td>
127 <td>Fetches a list of <em>filter responses</em> that belong to the user given by <em>key</em>. If no <em>key</em> is given or it is invalid, will return a <em>403 Forbidden</em> error.</td>
128 <td><code>{"filters":[<a href="#filter-response">filter-response</a>]}</code></td>
129 <td><a href="/api/v1/json/filters/user"><code>/api/v1/json/filters/user</code></a></td>
130 </tr>
131 <tr>
132 <td><code>GET</code></td>
133 <td><code>/api/v1/json/oembed</code></td>
134 <td><code>url</code></td>
135 <td>Fetches an <em>oEmbed response</em> for the given app link or CDN URL.</td>
136 <td><code><a href="#oembed-response">oembed-response</a></code></td>
137 <td><a href="/api/v1/json/oembed?url=https://derpicdn.net/img/2012/1/2/3/full.png"><code>/api/v1/json/oembed?url=https://derpicdn.net/img/2012/1/2/3/full.png</code></a></td>
138 </tr>
139 <tr>
140 <td><code>GET</code></td>
141 <td><code>/api/v1/json/search/comments</code></td>
142 <td><code>key, page</code></td>
143 <td>Executes the search given by the <code>q</code> query parameter, and returns <em>comment responses</em> sorted by descending creation time.</td>
144 <td><code>{"comments":[<a href="#comment-response">comment-response</a>]}</code></td>
145 <td><a href="/api/v1/json/search/comments?q=image_id:1000000"><code>/api/v1/json/search/comments?q=image_id:1000000</code></a></td>
146 </tr>
147 <tr>
148 <td><code>GET</code></td>
149 <td><code>/api/v1/json/search/galleries</code></td>
150 <td><code>key, page</code></td>
151 <td>Executes the search given by the <code>q</code> query parameter, and returns <em>gallery responses</em> sorted by descending creation time.</td>
152 <td><code>{"galleries":[<a href="#gallery-response">gallery-response</a>]}</code></td>
153 <td><a href="/api/v1/json/search/galleries?q=title:mean*"><code>/api/v1/json/search/galleries?q=title:mean*</code></a></td>
154 </tr>
155 <tr>
156 <td><code>GET</code></td>
157 <td><code>/api/v1/json/search/posts</code></td>
158 <td><code>key, page</code></td>
159 <td>Executes the search given by the <code>q</code> query parameter, and returns <em>post responses</em> sorted by descending creation time.</td>
160 <td><code>{"posts":[<a href="#post-response">post-response</a>]}</code></td>
161 <td><a href="/api/v1/json/search/posts?q=subject:time wasting thread"><code>/api/v1/json/search/posts?q=subject:time wasting thread</code></a></td>
162 </tr>
163 <tr>
164 <td><code>GET</code></td>
165 <td><code>/api/v1/json/search/images</code></td>
166 <td><code>key, filter_id, page, per_page, q, sd, sf</code></td>
167 <td>Executes the search given by the <code>q</code> query parameter, and returns <em>image responses</em>.</td>
168 <td><code>{"images":[<a href="#image-response">image-response</a>]}</code></td>
169 <td><a href="/api/v1/json/search/images?q=safe"><code>/api/v1/json/search/images?q=safe</code></a></td>
170 </tr>
171 <tr>
172 <td><code>GET</code></td>
173 <td><code>/api/v1/json/search/tags</code></td>
174 <td><code>page</code></td>
175 <td>Executes the search given by the <code>q</code> query parameter, and returns <em>tag responses</em> sorted by descending image count.</td>
176 <td><code>{"tags":[<a href="#tag-response">tag-response</a>]}</code></td>
177 <td><a href="/api/v1/json/search/tags?q=analyzed_name:wing"><code>/api/v1/json/search/tags?q=analyzed_name:wing</code></a></td>
178 </tr>
179 <tr>
180 <td><code>POST</code></td>
181 <td><code>/api/v1/json/search/reverse</code></td>
182 <td><code>key, url, distance</code></td>
183 <td>Returns <em>image responses</em> based on the results of reverse-searching the image given by the <code>url</code> query parameter.</td>
184 <td><code>{"images":[<a href="#image-response">image-response</a>]}</code></td>
185 <td><a href="/api/v1/json/search/reverse?url=https://derpicdn.net/img/2019/12/24/2228439/full.jpg" data-method="post"><code>/api/v1/json/search/reverse?url=https://derpicdn.net/img/2019/12/24/2228439/full.jpg</code></a></td>
186 </tr>
187 <tr>
188 <td><code>GET</code></td>
189 <td><code>/api/v1/json/forums</code></td>
190 <td></td>
191 <td>Fetches a list of <em>forum responses</em>.</td>
192 <td><code>{"forums":<a href="#forum-response">forum-response</a>}</code></td>
193 <td><a href="/api/v1/json/forums"><code>/api/v1/json/forums</code></a></td>
194 </tr>
195 <tr>
196 <td><code>GET</code></td>
197 <td><code>/api/v1/json/forums/:short_name</code></td>
198 <td></td>
199 <td>Fetches a <em>forum response</em> for the abbreviated name given by the <code>short_name</code> URL parameter.</td>
200 <td><code>{"forum":<a href="#forum-response">forum-response</a>}</code></td>
201 <td><a href="/api/v1/json/forums/dis"><code>/api/v1/json/forums/dis</code></a></td>
202 </tr>
203 <tr>
204 <td><code>GET</code></td>
205 <td><code>/api/v1/json/forums/:short_name/topics</code></td>
206 <td><code>page</code></td>
207 <td>Fetches a list of <em>topic responses</em> for the abbreviated forum name given by the <code>short_name</code> URL parameter.</td>
208 <td><code>{"topics":<a href="#topic-response">topic-response</a>}</code></td>
209 <td><a href="/api/v1/json/forums/dis/topics"><code>/api/v1/json/forums/dis/topics</code></a></td>
210 </tr>
211 <tr>
212 <td><code>GET</code></td>
213 <td><code>/api/v1/json/forums/:short_name/topics/:topic_slug</code></td>
214 <td></td>
215 <td>Fetches a <em>topic response</em> for the abbreviated forum name given by the <code>short_name</code> and topic given by <code>topic_slug</code> URL parameters.</td>
216 <td><code>{"topic":<a href="#topic-response">topic-response</a>}</code></td>
217 <td><a href="/api/v1/json/forums/dis/topics/ask-the-mods-anything"><code>/api/v1/json/forums/dis/topics/ask-the-mods-anything</code></a></td>
218 </tr>
219 <tr>
220 <td><code>GET</code></td>
221 <td><code>/api/v1/json/forums/:short_name/topics/:topic_slug/posts</code></td>
222 <td><code>page</code></td>
223 <td>Fetches a list of <em>post responses</em> for the abbreviated forum name given by the <code>short_name</code> and topic given by <code>topic_slug</code> URL parameters.</td>
224 <td><code>{"posts":<a href="#post-response">post-response</a>}</code></td>
225 <td><a href="/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts"><code>/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts</code></a></td>
226 </tr>
227 <tr>
228 <td><code>GET</code></td>
229 <td><code>/api/v1/json/forums/:short_name/topics/:topic_slug/posts/:post_id</code></td>
230 <td></td>
231 <td>Fetches a <em>post response</em> for the abbreviated forum name given by the <code>short_name</code>, topic given by <code>topic_slug</code> and post given by <code>post_id</code> URL parameters.</td>
232 <td><code>{"post":<a href="#post-response">post-response</a>}</code></td>
233 <td><a href="/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts/2761095"><code>/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts/2761095</code></a></td>
234 </tr>
235 </tbody>
236 </table>
237 <h2 id="image-response">Image Responses</h2>
238 <table class="table">
239 <thead>
240 <tr>
241 <th>Field</th>
242 <th>Type</th>
243 <th>Description</th>
244 </tr>
245 </thead>
246 <tbody>
247 <tr>
248 <td><code>aspect_ratio</code></td>
249 <td>Float</td>
250 <td>The image's width divided by its height.</td>
251 </tr>
252 <tr>
253 <td><code>comment_count</code></td>
254 <td>Integer</td>
255 <td>The number of comments made on the image.</td>
256 </tr>
257 <tr>
258 <td><code>created_at</code></td>
259 <td>RFC3339 datetime</td>
260 <td>The creation time, in UTC, of the image.</td>
261 </tr>
262 <tr>
263 <td><code>deletion_reason</code></td>
264 <td>String</td>
265 <td>The hide reason for the image, or <code>null</code> if none provided. This will only have a value on images which are deleted for a rule violation.</td>
266 </tr>
267 <tr>
268 <td><code>description</code></td>
269 <td>String</td>
270 <td>The image's description.</td>
271 </tr>
272 <tr>
273 <td><code>downvotes</code></td>
274 <td>Integer</td>
275 <td>The number of downvotes the image has.</td>
276 </tr>
277 <tr>
278 <td><code>duplicate_of</code></td>
279 <td>Integer</td>
280 <td>The ID of the target image, or <code>null</code> if none provided. This will only have a value on images which are merged into another image.</td>
281 </tr>
282 <tr>
283 <td><code>faves</code></td>
284 <td>Integer</td>
285 <td>The number of faves the image has.</td>
286 </tr>
287 <tr>
288 <td><code>first_seen_at</code></td>
289 <td>RFC3339 datetime</td>
290 <td>The time, in UTC, this image was first seen (before any duplicate merging).</td>
291 </tr>
292 <tr>
293 <td><code>format</code></td>
294 <td>String</td>
295 <td>The file extension of this image. One of <code>"gif", "jpg", "jpeg", "png", "svg", "webm"</code>.</td>
296 </tr>
297 <tr>
298 <td><code>height</code></td>
299 <td>Integer</td>
300 <td>The image's height, in pixels.</td>
301 </tr>
302 <tr>
303 <td><code>hidden_from_users</code></td>
304 <td>Boolean</td>
305 <td>Whether this image is hidden. An image is hidden if it is merged or deleted for a rule violation.</td>
306 </tr>
307 <tr>
308 <td><code>id</code></td>
309 <td>Integer</td>
310 <td>The image's ID.</td>
311 </tr>
312 <tr>
313 <td><code>intensities</code></td>
314 <td>Object</td>
315 <td>Optional object of <a href="https://github.com/derpibooru/cli_intensities">internal image intensity data</a> for deduplication purposes. May be <code>null</code> if intensities have not yet been generated.</td>
316 </tr>
317 <tr>
318 <td><code>mime_type</code></td>
319 <td>String</td>
320 <td>The MIME type of this image. One of <code>"image/gif", "image/jpeg", "image/png", "image/svg+xml", "video/webm"</code>.</td>
321 </tr>
322 <tr>
323 <td><code>name</code></td>
324 <td>String</td>
325 <td>The filename that this image was uploaded with.</td>
326 </tr>
327 <tr>
328 <td><code>orig_sha512_hash</code></td>
329 <td>String</td>
330 <td>The SHA512 hash of this image as it was originally uploaded.</td>
331 </tr>
332 <tr>
333 <td><code>processed</code></td>
334 <td>Boolean</td>
335 <td>Whether the image has finished optimization.</td>
336 </tr>
337 <tr>
338 <td><code>representations</code></td>
339 <td>Object</td>
340 <td>A mapping of representation names to their respective URLs. Contains the keys <code>"full", "large", "medium", "small", "tall", "thumb", "thumb_small", "thumb_tiny"</code>.</td>
341 </tr>
342 <tr>
343 <td><code>score</code></td>
344 <td>Integer</td>
345 <td>The image's number of upvotes minus the image's number of downvotes.</td>
346 </tr>
347 <tr>
348 <td><code>sha512_hash</code></td>
349 <td>String</td>
350 <td>The SHA512 hash of this image after it has been processed.</td>
351 </tr>
352 <tr>
353 <td><code>source_url</code></td>
354 <td>String</td>
355 <td>The current source URL of the image.</td>
356 </tr>
357 <tr>
358 <td><code>spoilered</code></td>
359 <td>Boolean</td>
360 <td>Whether this image is hit by the current filter.</td>
361 </tr>
362 <tr>
363 <td><code>tag_count</code></td>
364 <td>Integer</td>
365 <td>The number of tags present on this image.</td>
366 </tr>
367 <tr>
368 <td><code>tag_ids</code></td>
369 <td>Array</td>
370 <td>A list of tag IDs this image contains.</td>
371 </tr>
372 <tr>
373 <td><code>tags</code></td>
374 <td>Array</td>
375 <td>A list of tag names this image contains.</td>
376 </tr>
377 <tr>
378 <td><code>thumbnails_generated</code></td>
379 <td>Boolean</td>
380 <td>Whether this image has finished thumbnail generation. Do not attempt to load images from <code>view_url</code> or <code>representations</code> if this is false.</td>
381 </tr>
382 <tr>
383 <td><code>updated_at</code></td>
384 <td>RFC3339 datetime</td>
385 <td>The time, in UTC, the image was last updated.</td>
386 </tr>
387 <tr>
388 <td><code>uploader</code></td>
389 <td>String</td>
390 <td>The image's uploader.</td>
391 </tr>
392 <tr>
393 <td><code>uploader_id</code></td>
394 <td>Integer</td>
395 <td>The ID of the image's uploader.</td>
396 </tr>
397 <tr>
398 <td><code>upvotes</code></td>
399 <td>Integer</td>
400 <td>The image's number of upvotes.</td>
401 </tr>
402 <tr>
403 <td><code>view_url</code></td>
404 <td>String</td>
405 <td>The image's view URL, including tags.</td>
406 </tr>
407 <tr>
408 <td><code>width</code></td>
409 <td>Integer</td>
410 <td>The image's width, in pixels.</td>
411 </tr>
412 <tr>
413 <td><code>wilson_score</code></td>
414 <td>Float</td>
415 <td>The lower bound of the <a href="https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval">Wilson score interval</a> for the image, based on its upvotes and downvotes, given a z-score corresponding to a confidence of 99.5%.</td>
416 </tr>
417 </tbody>
418 </table>
419 <h2 id="comment-response">Comment Responses</h2>
420 <table class="table">
421 <thead>
422 <tr>
423 <th>Field</th>
424 <th>Type</th>
425 <th>Description</th>
426 </tr>
427 </thead>
428 <tbody>
429 <tr>
430 <td><code>author</code></td>
431 <td>String</td>
432 <td>The comment's author.</td>
433 </tr>
434 <tr>
435 <td><code>avatar</code></td>
436 <td>String</td>
437 <td>The URL of the author's avatar. May be a link to the CDN path, or a <code>data:</code> URI.</td>
438 </tr>
439 <tr>
440 <td><code>body</code></td>
441 <td>String</td>
442 <td>The comment text.</td>
443 </tr>
444 <tr>
445 <td><code>created_at</code></td>
446 <td>RFC3339 datetime</td>
447 <td>The creation time, in UTC, of the comment.</td>
448 </tr>
449 <tr>
450 <td><code>edit_reason</code></td>
451 <td>String</td>
452 <td>The edit reason for this comment, or <code>null</code> if none provided.</td>
453 </tr>
454 <tr>
455 <td><code>edited_at</code></td>
456 <td>RFC3339 datetime</td>
457 <td>The time, in UTC, this comment was last edited at, or <code>null</code> if it was not edited.</td>
458 </tr>
459 <tr>
460 <td><code>id</code></td>
461 <td>Integer</td>
462 <td>The comment's ID.</td>
463 </tr>
464 <tr>
465 <td><code>image_id</code></td>
466 <td>Integer</td>
467 <td>The ID of the image the comment belongs to.</td>
468 </tr>
469 <tr>
470 <td><code>updated_at</code></td>
471 <td>RFC3339 dateime</td>
472 <td>The time, in UTC, the comment was last updated at.</td>
473 </tr>
474 <tr>
475 <td><code>user_id</code></td>
476 <td>Integer</td>
477 <td>The ID of the user the comment belongs to, if any.</td>
478 </tr>
479 </tbody>
480 </table>
481 <h2 id="forum-response">Forum Responses</h2>
482 <table class="table">
483 <thead>
484 <tr>
485 <th>Field</th>
486 <th>Type</th>
487 <th>Description</th>
488 </tr>
489 </thead>
490 <tbody>
491 <tr>
492 <td><code>name</code></td>
493 <td>String</td>
494 <td>The forum's name.</td>
495 </tr>
496 <tr>
497 <td><code>short_name</code></td>
498 <td>String</td>
499 <td>The forum's short name (used to identify it).</td>
500 </tr>
501 <tr>
502 <td><code>description</code></td>
503 <td>String</td>
504 <td>The forum's description.</td>
505 </tr>
506 <tr>
507 <td><code>topic_count</code></td>
508 <td>Integer</td>
509 <td>The amount of topics in the forum.</td>
510 </tr>
511 <tr>
512 <td><code>post_count</code></td>
513 <td>Integer</td>
514 <td>The amount of posts in the forum.</td>
515 </tr>
516 </tbody>
517 </table>
518 <h2 id="topic-response">Topic Responses</h2>
519 <table class="table">
520 <thead>
521 <tr>
522 <th>Field</th>
523 <th>Type</th>
524 <th>Description</th>
525 </tr>
526 </thead>
527 <tbody>
528 <tr>
529 <td><code>slug</code></td>
530 <td>String</td>
531 <td>The topic's slug (used to identify it).</td>
532 </tr>
533 <tr>
534 <td><code>title</code></td>
535 <td>String</td>
536 <td>The topic's title.</td>
537 </tr>
538 <tr>
539 <td><code>post_count</code></td>
540 <td>Integer</td>
541 <td>The amount of posts in the topic.</td>
542 </tr>
543 <tr>
544 <td><code>view_count</code></td>
545 <td>Integer</td>
546 <td>The amount of views the topic has received.</td>
547 </tr>
548 <tr>
549 <td><code>sticky</code></td>
550 <td>Boolean</td>
551 <td>Whether the topic is sticky.</td>
552 </tr>
553 <tr>
554 <td><code>last_replied_to_at</code></td>
555 <td>RFC3339 datetime</td>
556 <td>The time, in UTC, when the last reply was made.</td>
557 </tr>
558 <tr>
559 <td><code>locked</code></td>
560 <td>Boolean</td>
561 <td>Whether the topic is locked.</td>
562 </tr>
563 <tr>
564 <td><code>user_id</code></td>
565 <td>Integer</td>
566 <td>The ID of the user who made the topic. <code>Null</code> if posted anonymously.</td>
567 </tr>
568 <tr>
569 <td><code>author</code></td>
570 <td>String</td>
571 <td>The name of the user who made the topic.</td>
572 </tr>
573 </tbody>
574 </table>
575 <h2 id="post-response">Post Responses</h2>
576 <table class="table">
577 <thead>
578 <tr>
579 <th>Field</th>
580 <th>Type</th>
581 <th>Description</th>
582 </tr>
583 </thead>
584 <tbody>
585 <tr>
586 <td><code>author</code></td>
587 <td>String</td>
588 <td>The post's author.</td>
589 </tr>
590 <tr>
591 <td><code>avatar</code></td>
592 <td>String</td>
593 <td>The URL of the author's avatar. May be a link to the CDN path, or a <code>data:</code> URI.</td>
594 </tr>
595 <tr>
596 <td><code>body</code></td>
597 <td>String</td>
598 <td>The post text.</td>
599 </tr>
600 <tr>
601 <td><code>created_at</code></td>
602 <td>RFC3339 datetime</td>
603 <td>The creation time, in UTC, of the post.</td>
604 </tr>
605 <tr>
606 <td><code>edit_reason</code></td>
607 <td>String</td>
608 <td>The edit reason for this post.</td>
609 </tr>
610 <tr>
611 <td><code>edited_at</code></td>
612 <td>RFC3339 datetime</td>
613 <td>The time, in UTC, this post was last edited at, or <code>null</code> if it was not edited.</td>
614 </tr>
615 <tr>
616 <td><code>id</code></td>
617 <td>Integer</td>
618 <td>The post's ID (used to identify it).</td>
619 </tr>
620 <tr>
621 <td><code>updated_at</code></td>
622 <td>RFC3339 dateime</td>
623 <td>The time, in UTC, the post was last updated at.</td>
624 </tr>
625 <tr>
626 <td><code>user_id</code></td>
627 <td>Integer</td>
628 <td>The ID of the user the post belongs to, if any.</td>
629 </tr>
630 </tbody>
631 </table>
632 <h2 id="tag-response">Tag Responses</h2>
633 <table class="table">
634 <thead>
635 <tr>
636 <th>Field</th>
637 <th>Type</th>
638 <th>Description</th>
639 </tr>
640 </thead>
641 <tbody>
642 <tr>
643 <td><code>aliased_tag</code></td>
644 <td>String</td>
645 <td>The slug of the tag this tag is aliased to, if any.</td>
646 </tr>
647 <tr>
648 <td><code>aliases</code></td>
649 <td>Array</td>
650 <td>The slugs of the tags aliased to this tag.</td>
651 </tr>
652 <tr>
653 <td><code>category</code></td>
654 <td>String</td>
655 <td>The category class of this tag. One of <code>"character", "content-fanmade", "content-official", "error", "oc", "origin", "rating", "species", "spoiler"</code>.</td>
656 </tr>
657 <tr>
658 <td><code>description</code></td>
659 <td>String</td>
660 <td>The long description for the tag.</td>
661 </tr>
662 <tr>
663 <td><code>dnp_entries</code></td>
664 <td>Array</td>
665 <td>An array of objects containing DNP entries claimed on the tag.</td>
666 </tr>
667 <tr>
668 <td><code>id</code></td>
669 <td>Integer</td>
670 <td>The tag's ID.</td>
671 </tr>
672 <tr>
673 <td><code>images</code></td>
674 <td>Integer</td>
675 <td>The image count of the tag.</td>
676 </tr>
677 <tr>
678 <td><code>implied_by_tags</code></td>
679 <td>Array</td>
680 <td>The slugs of the tags this tag is implied by.</td>
681 </tr>
682 <tr>
683 <td><code>implied_tags</code></td>
684 <td>Array</td>
685 <td>The slugs of the tags this tag implies.</td>
686 </tr>
687 <tr>
688 <td><code>name</code></td>
689 <td>String</td>
690 <td>The name of the tag.</td>
691 </tr>
692 <tr>
693 <td><code>name_in_namespace</code></td>
694 <td>String</td>
695 <td>The name of the tag in its namespace.</td>
696 </tr>
697 <tr>
698 <td><code>namespace</code></td>
699 <td>String</td>
700 <td>The namespace of the tag.</td>
701 </tr>
702 <tr>
703 <td><code>short_description</code></td>
704 <td>String</td>
705 <td>The short description for the tag.</td>
706 </tr>
707 <tr>
708 <td><code>slug</code></td>
709 <td>String</td>
710 <td>The slug for the tag.</td>
711 </tr>
712 <tr>
713 <td><code>spoiler_image</code></td>
714 <td>String</td>
715 <td>The spoiler image URL for the tag.</td>
716 </tr>
717 </tbody>
718 </table>
719 <h2 id="user-response">User Responses</h2>
720 <table class="table">
721 <thead>
722 <tr>
723 <th>Field</th>
724 <th>Type</th>
725 <th>Description</th>
726 </tr>
727 </thead>
728 <tbody>
729 <tr>
730 <td><code>id</code></td>
731 <td>Integer</td>
732 <td>The ID of the user.</td>
733 </tr>
734 <tr>
735 <td><code>name</code></td>
736 <td>String</td>
737 <td>The name of the user.</td>
738 </tr>
739 <tr>
740 <td><code>slug</code></td>
741 <td>String</td>
742 <td>The slug of the user.</td>
743 </tr>
744 <tr>
745 <td><code>role</code></td>
746 <td>String</td>
747 <td>The role of the user.</td>
748 </tr>
749 <tr>
750 <td><code>description</code></td>
751 <td>String</td>
752 <td>The description (bio) of the user.</td>
753 </tr>
754 <tr>
755 <td><code>avatar_url</code></td>
756 <td>String</td>
757 <td>The URL of the user's thumbnail. <code>Null</code> if they haven't set one.</td>
758 </tr>
759 <tr>
760 <td><code>created_at</code></td>
761 <td>RFC3339 datetime</td>
762 <td>The creation time, in UTC, of the user.</td>
763 </tr>
764 <tr>
765 <td><code>comments_count</code></td>
766 <td>Integer</td>
767 <td>The comment count of the user.</td>
768 </tr>
769 <tr>
770 <td><code>uploads_count</code></td>
771 <td>Integer</td>
772 <td>The upload count of the user.</td>
773 </tr>
774 <tr>
775 <td><code>posts_count</code></td>
776 <td>Integer</td>
777 <td>The forum posts count of the user.</td>
778 </tr>
779 <tr>
780 <td><code>topics_count</code></td>
781 <td>Integer</td>
782 <td>The forum topics count of the user.</td>
783 </tr>
784 <tr>
785 <td><code>links</code></td>
786 <td>Object</td>
787 <td>The links the user has registered. See <a href="#links-response">links-response</a>.</td>
788 </tr>
789 <tr>
790 <td><code>awards</code></td>
791 <td>Object</td>
792 <td>The awards/badges of the user. See <a href="#awards-response">awards-response</a>.</td>
793 </tr>
794 </tbody>
795 </table>
796 <h2 id="filter-response">Filter Responses</h2>
797 <table class="table">
798 <thead>
799 <tr>
800 <th>Field</th>
801 <th>Type</th>
802 <th>Description</th>
803 </tr>
804 </thead>
805 <tbody>
806 <tr>
807 <td><code>id</code></td>
808 <td>Integer</td>
809 <td>The id of the filter.</td>
810 </tr>
811 <tr>
812 <td><code>name</code></td>
813 <td>String</td>
814 <td>The name of the filter.</td>
815 </tr>
816 <tr>
817 <td><code>description</code></td>
818 <td>String</td>
819 <td>The description of the filter.</td>
820 </tr>
821 <tr>
822 <td><code>user_id</code></td>
823 <td>Integer</td>
824 <td>The id of the user the filter belongs to. <code>Null</code> if it isn't assigned to a user (usually <code>system</code> filters only).</td>
825 </tr>
826 <tr>
827 <td><code>user_count</code></td>
828 <td>Integer</td>
829 <td>The amount of users employing this filter.</td>
830 </tr>
831 <tr>
832 <td><code>system</code></td>
833 <td>Boolean</td>
834 <td>If <code>true</code>, is a system filter. System filters are usable by anyone and don't have a <code>user_id</code> set.</td>
835 </tr>
836 <tr>
837 <td><code>public</code></td>
838 <td>Boolean</td>
839 <td>If <code>true</code>, is a public filter. Public filters are usable by anyone.</td>
840 </tr>
841 <tr>
842 <td><code>spoilered_tag_ids</code></td>
843 <td>Array</td>
844 <td>A list of tag IDs (as integers) that this filter will spoil.</td>
845 </tr>
846 <tr>
847 <td><code>spoilered_complex</code></td>
848 <td>String</td>
849 <td>The complex spoiled filter.</td>
850 </tr>
851 <tr>
852 <td><code>hidden_tag_ids</code></td>
853 <td>Array</td>
854 <td>A list of tag IDs (as integers) that this filter will hide.</td>
855 </tr>
856 <tr>
857 <td><code>hidden_complex</code></td>
858 <td>String</td>
859 <td>The complex hidden filter.</td>
860 </tr>
861 </tbody>
862 </table>
863 <h2 id="links-response">Links Responses</h2>
864 <table class="table">
865 <thead>
866 <tr>
867 <th>Field</th>
868 <th>Type</th>
869 <th>Description</th>
870 </tr>
871 </thead>
872 <tbody>
873 <tr>
874 <td><code>user_id</code></td>
875 <td>Integer</td>
876 <td>The ID of the user who owns this link.</td>
877 </tr>
878 <tr>
879 <td><code>created_at</code></td>
880 <td>RFC3339 datetime</td>
881 <td>The creation time, in UTC, of this link.</td>
882 </tr>
883 <tr>
884 <td><code>state</code></td>
885 <td>String</td>
886 <td>The state of this link.</td>
887 </tr>
888 <tr>
889 <td><code>tag_id</code></td>
890 <td>Integer</td>
891 <td>The ID of an associated tag for this link. <code>Null</code> if no tag linked.</td>
892 </tr>
893 </tbody>
894 </table>
895 <h2 id="awards-response">Awards Responses</h2>
896 <table class="table">
897 <thead>
898 <tr>
899 <th>Field</th>
900 <th>Type</th>
901 <th>Description</th>
902 </tr>
903 </thead>
904 <tbody>
905 <tr>
906 <td><code>image_url</code></td>
907 <td>String</td>
908 <td>The URL of this award.</td>
909 </tr>
910 <tr>
911 <td><code>title</code></td>
912 <td>String</td>
913 <td>The title of this award.</td>
914 </tr>
915 <tr>
916 <td><code>id</code></td>
917 <td>Integer</td>
918 <td>The ID of the badge this award is derived from.</td>
919 </tr>
920 <tr>
921 <td><code>label</code></td>
922 <td>String</td>
923 <td>The label of this award.</td>
924 </tr>
925 <tr>
926 <td><code>awarded_on</code></td>
927 <td>RFC3339 datetime</td>
928 <td>The time, in UTC, when this award was given.</td>
929 </tr>
930 </tbody>
931 </table>
932 <h2 id="gallery-response">Gallery Responses</h2>
933 <table class="table">
934 <thead>
935 <tr>
936 <th>Field</th>
937 <th>Type</th>
938 <th>Description</th>
939 </tr>
940 </thead>
941 <tbody>
942 <tr>
943 <td><code>description</code></td>
944 <td>String</td>
945 <td>The gallery's description.</td>
946 </tr>
947 <tr>
948 <td><code>id</code></td>
949 <td>Integer</td>
950 <td>The gallery's ID.</td>
951 </tr>
952 <tr>
953 <td><code>spoiler_warning</code></td>
954 <td>String</td>
955 <td>The gallery's spoiler warning.</td>
956 </tr>
957 <tr>
958 <td><code>thumbnail_id</code></td>
959 <td>Integer</td>
960 <td>The ID of the cover image for the gallery.</td>
961 </tr>
962 <tr>
963 <td><code>title</code></td>
964 <td>String</td>
965 <td>The gallery's title.</td>
966 </tr>
967 <tr>
968 <td><code>user</code></td>
969 <td>String</td>
970 <td>The name of the gallery's creator.</td>
971 </tr>
972 <tr>
973 <td><code>user_id</code></td>
974 <td>Integer</td>
975 <td>The ID of the gallery's creator.</td>
976 </tr>
977 </tbody>
978 </table>
979 <h2 id="oembed-response">Oembed Responses</h2>
980 <table class="table">
981 <thead>
982 <tr>
983 <th>Field</th>
984 <th>Type</th>
985 <th>Description</th>
986 </tr>
987 </thead>
988 <tbody>
989 <tr>
990 <td><code>author_name</code></td>
991 <td>String</td>
992 <td>The comma-delimited names of the image authors.</td>
993 </tr>
994 <tr>
995 <td><code>author_url</code></td>
996 <td>String</td>
997 <td>The source URL of the image.</td>
998 </tr>
999 <tr>
1000 <td><code>cache_age</code></td>
1001 <td>Integer</td>
1002 <td>Always <code>7200</code>.</td>
1003 </tr>
1004 <tr>
1005 <td><code>derpibooru_comments</code></td>
1006 <td>Integer</td>
1007 <td>The number of comments made on the image.</td>
1008 </tr>
1009 <tr>
1010 <td><code>derpibooru_id</code></td>
1011 <td>Integer</td>
1012 <td>The image's ID.</td>
1013 </tr>
1014 <tr>
1015 <td><code>derpibooru_score</code></td>
1016 <td>Integer</td>
1017 <td>The image's number of upvotes minus the image's number of downvotes.</td>
1018 </tr>
1019 <tr>
1020 <td><code>derpibooru_tags</code></td>
1021 <td>Array</td>
1022 <td>The names of the image's tags.</td>
1023 </tr>
1024 <tr>
1025 <td><code>provider_name</code></td>
1026 <td>String</td>
1027 <td>Always <code>"Derpibooru"</code>.</td>
1028 </tr>
1029 <tr>
1030 <td><code>provider_url</code></td>
1031 <td>String</td>
1032 <td>Always <code>"https://furbooru.org"</code>.</td>
1033 </tr>
1034 <tr>
1035 <td><code>title</code></td>
1036 <td>String</td>
1037 <td>The image's ID and associated tags, as would be given on the title of the image page.</td>
1038 </tr>
1039 <tr>
1040 <td><code>type</code></td>
1041 <td>String</td>
1042 <td>Always <code>"photo"</code>.</td>
1043 </tr>
1044 <tr>
1045 <td><code>version</code></td>
1046 <td>String</td>
1047 <td>Always <code>"1.0"</code>.</td>
1048 </tr>
1049 </tbody>
1050 </table>
Pup
1308 unchanged lines
13091309 </tbody>
13101310 </table>
13111311 </div>
1312 </main>
Pup
1 <div class="walloftext">
2 <p>Furbooru provides a JSON API for major site
3 functionality, which can be freely used by anyone wanting
4 to produce tools for the site or other web applications
5 that use the data provided within Furbooru.</p>
6 <h2 id="licensing">Licensing</h2>
7 <p>Anyone may use the API. Users making abusively high
8 numbers of requests or excessively expensive requests will
9 be asked to stop, and banned if they do not. Your
10 application must properly cache, and respect server-side
11 cache expiry times. Your client must gracefully back off if
12 requests fail, preferably exponentially or fatally.</p>
13 <p>If images are used, the artist must always be credited
14 (if provided) and the original source URL must be displayed
15 alongside the image, either in textual form or as a link. A
16 link to the Furbooru page is optional but recommended; we
17 recommend the furbooru.org domain as a canonical domain.
18 The <code>https:</code> protocol must be specified on all
19 URLs.</p>
20 <h2 id="parameters">Parameters</h2>
21 <p>This is a list of general parameters that are useful
22 when working with the API. Not all parameters may be used
23 in every request.</p>
24 <table class="table">
25 <thead>
26 <tr>
27 <th>Name</th>
28 <th>Description</th>
29 </tr>
30 </thead>
31 <tbody>
32 <tr>
33 <td><code>filter_id</code></td>
34 <td>Assuming the user can access the filter ID given
35 by the parameter, overrides the current filter for
36 this request. This is primarily useful for
37 unauthenticated API access.</td>
38 </tr>
39 <tr>
40 <td><code>key</code></td>
41 <td>
42 An optional authentication token. If omitted, no
43 user will be authenticated.<br>
44 <br>
45 You can find your authentication token in your
46 <a href="/registration/edit">account settings</a>.
47 </td>
48 </tr>
49 <tr>
50 <td><code>page</code></td>
51 <td>Controls the current page of the response, if the
52 response is paginated. Empty values default to the
53 first page.</td>
54 </tr>
55 <tr>
56 <td><code>per_page</code></td>
57 <td>Controls the number of results per page, up to a
58 limit of 50, if the response is paginated. The
59 default is 25.</td>
60 </tr>
61 <tr>
62 <td><code>q</code></td>
63 <td>The current search query, if the request is a
64 search request.</td>
65 </tr>
66 <tr>
67 <td><code>sd</code></td>
68 <td>The current sort direction, if the request is a
69 search request.</td>
70 </tr>
71 <tr>
72 <td><code>sf</code></td>
73 <td>The current sort field, if the request is a
74 search request.</td>
75 </tr>
76 </tbody>
77 </table>
78 <h2 id="routes">Routes</h2>
79 <p>The interested reader may find the implementations of
80 these endpoints <a href=
81 "https://github.com/furbooru/philomena/tree/master/lib/philomena_web/controllers/api">
82 here</a>. For the purposes of this document, a brief
83 overview is given.</p>
84 <table class="table">
85 <thead>
86 <tr>
87 <th>Method</th>
88 <th>Path</th>
89 <th>Allowed Query Parameters</th>
90 <th>Description</th>
91 <th>Response Format</th>
92 <th>Example</th>
93 </tr>
94 </thead>
95 <tbody>
96 <tr>
97 <td><code>GET</code></td>
98 <td>
99 <code>/api/v1/json/comments/:comment_id</code></td>
100 <td></td>
101 <td>Fetches a <em>comment response</em> for the
102 comment ID referenced by the <code>comment_id</code>
103 URL parameter.</td>
104 <td><code>{"comment":<a href=
105 "#comment-response">comment-response</a>}</code></td>
106 <td>
107 <a href=
108 "/api/v1/json/comments/1000"><code>/api/v1/json/comments/1000</code></a>
109 </td>
110 </tr>
111 <tr>
112 <td><code>GET</code></td>
113 <td><code>/api/v1/json/images/:image_id</code></td>
114 <td><code>key, filter_id</code></td>
115 <td>Fetches an <em>image response</em> for the image
116 ID referenced by the <code>image_id</code> URL
117 parameter.</td>
118 <td><code>{"image":<a href=
119 "#image-response">image-response</a>}</code></td>
120 <td>
121 <a href=
122 "/api/v1/json/images/1"><code>/api/v1/json/images/1</code></a>
123 </td>
124 </tr>
125 <tr>
126 <td><code>GET</code></td>
127 <td><code>/api/v1/json/images/featured</code></td>
128 <td></td>
129 <td>Fetches an <em>image response</em> for the for
130 the current featured image.</td>
131 <td><code>{"image":<a href=
132 "#image-response">image-response</a>}</code></td>
133 <td>
134 <a href=
135 "/api/v1/json/images/featured"><code>/api/v1/json/images/featured</code></a>
136 </td>
137 </tr>
138 <tr>
139 <td><code>GET</code></td>
140 <td><code>/api/v1/json/tags/:tag_id</code></td>
141 <td></td>
142 <td>Fetches a <em>tag response</em> for the <em>tag
143 slug</em> given by the <code>tag_id</code> URL
144 parameter. The tag's ID is <em>not</em> used.</td>
145 <td><code>{"tag":<a href=
146 "#tag-response">tag-response</a>}</code></td>
147 <td>
148 <a href=
149 "/api/v1/json/tags/artist-colon-atryl"><code>/api/v1/json/tags/artist-colon-atryl</code></a>
150 </td>
151 </tr>
152 <tr>
153 <td><code>GET</code></td>
154 <td><code>/api/v1/json/posts/:post_id</code></td>
155 <td></td>
156 <td>Fetches a <em>post response</em> for the post ID
157 given by the <code>post_id</code> URL parameter.</td>
158 <td><code>{"post":<a href=
159 "#post-response">post-response</a>}</code></td>
160 <td>
161 <a href=
162 "/api/v1/json/posts/2730144"><code>/api/v1/json/posts/2730144</code></a>
163 </td>
164 </tr>
165 <tr>
166 <td><code>GET</code></td>
167 <td><code>/api/v1/json/profiles/:user_id</code></td>
168 <td></td>
169 <td>Fetches a <em>profile response</em> for the user
170 ID given by the <code>user_id</code> URL
171 parameter.</td>
172 <td><code>{"user":<a href=
173 "#user-response">user-response</a>}</code></td>
174 <td>
175 <a href=
176 "/api/v1/json/profiles/216494"><code>/api/v1/json/profiles/216494</code></a>
177 </td>
178 </tr>
179 <tr>
180 <td><code>GET</code></td>
181 <td><code>/api/v1/json/filters/:filter_id</code></td>
182 <td><code>key</code></td>
183 <td>Fetches a <em>filter response</em> for the filter
184 ID given by the <code>filter_id</code> URL
185 parameter.</td>
186 <td><code>{"filter":<a href=
187 "#filter-response">filter-response</a>}</code></td>
188 <td>
189 <a href=
190 "/api/v1/json/filters/56027"><code>/api/v1/json/filters/56027</code></a>
191 </td>
192 </tr>
193 <tr>
194 <td><code>GET</code></td>
195 <td><code>/api/v1/json/filters/system</code></td>
196 <td><code>page</code></td>
197 <td>Fetches a list of <em>filter responses</em> that
198 are flagged as being <em>system</em> filters (and
199 thus usable by anyone).</td>
200 <td><code>{"filters":[<a href=
201 "#filter-response">filter-response</a>]}</code></td>
202 <td>
203 <a href=
204 "/api/v1/json/filters/system"><code>/api/v1/json/filters/system</code></a>
205 </td>
206 </tr>
207 <tr>
208 <td><code>GET</code></td>
209 <td><code>/api/v1/json/filters/user</code></td>
210 <td><code>key, page</code></td>
211 <td>Fetches a list of <em>filter responses</em> that
212 belong to the user given by <em>key</em>. If no
213 <em>key</em> is given or it is invalid, will return a
214 <em>403 Forbidden</em> error.</td>
215 <td><code>{"filters":[<a href=
216 "#filter-response">filter-response</a>]}</code></td>
217 <td>
218 <a href=
219 "/api/v1/json/filters/user"><code>/api/v1/json/filters/user</code></a>
220 </td>
221 </tr>
222 <tr>
223 <td><code>GET</code></td>
224 <td><code>/api/v1/json/oembed</code></td>
225 <td><code>url</code></td>
226 <td>Fetches an <em>oEmbed response</em> for the given
227 app link or CDN URL.</td>
228 <td><code><a href=
229 "#oembed-response">oembed-response</a></code></td>
230 <td>
231 <a href=
232 "/api/v1/json/oembed?url=https://derpicdn.net/img/2012/1/2/3/full.png">
233 <code>/api/v1/json/oembed?url=https://derpicdn.net/img/2012/1/2/3/full.png</code></a>
234 </td>
235 </tr>
236 <tr>
237 <td><code>GET</code></td>
238 <td><code>/api/v1/json/search/comments</code></td>
239 <td><code>key, page</code></td>
240 <td>Executes the search given by the <code>q</code>
241 query parameter, and returns <em>comment
242 responses</em> sorted by descending creation
243 time.</td>
244 <td><code>{"comments":[<a href=
245 "#comment-response">comment-response</a>]}</code></td>
246 <td>
247 <a href=
248 "/api/v1/json/search/comments?q=image_id:1000000"><code>
249 /api/v1/json/search/comments?q=image_id:1000000</code></a>
250 </td>
251 </tr>
252 <tr>
253 <td><code>GET</code></td>
254 <td><code>/api/v1/json/search/galleries</code></td>
255 <td><code>key, page</code></td>
256 <td>Executes the search given by the <code>q</code>
257 query parameter, and returns <em>gallery
258 responses</em> sorted by descending creation
259 time.</td>
260 <td><code>{"galleries":[<a href=
261 "#gallery-response">gallery-response</a>]}</code></td>
262 <td>
263 <a href=
264 "/api/v1/json/search/galleries?q=title:mean*"><code>
265 /api/v1/json/search/galleries?q=title:mean*</code></a>
266 </td>
267 </tr>
268 <tr>
269 <td><code>GET</code></td>
270 <td><code>/api/v1/json/search/posts</code></td>
271 <td><code>key, page</code></td>
272 <td>Executes the search given by the <code>q</code>
273 query parameter, and returns <em>post responses</em>
274 sorted by descending creation time.</td>
275 <td><code>{"posts":[<a href=
276 "#post-response">post-response</a>]}</code></td>
277 <td>
278 <a href=
279 "/api/v1/json/search/posts?q=subject:time%20wasting%20thread">
280 <code>/api/v1/json/search/posts?q=subject:time
281 wasting thread</code></a>
282 </td>
283 </tr>
284 <tr>
285 <td><code>GET</code></td>
286 <td><code>/api/v1/json/search/images</code></td>
287 <td><code>key, filter_id, page, per_page, q, sd,
288 sf</code></td>
289 <td>Executes the search given by the <code>q</code>
290 query parameter, and returns <em>image
291 responses</em>.</td>
292 <td><code>{"images":[<a href=
293 "#image-response">image-response</a>]}</code></td>
294 <td>
295 <a href=
296 "/api/v1/json/search/images?q=safe"><code>/api/v1/json/search/images?q=safe</code></a>
297 </td>
298 </tr>
299 <tr>
300 <td><code>GET</code></td>
301 <td><code>/api/v1/json/search/tags</code></td>
302 <td><code>page</code></td>
303 <td>Executes the search given by the <code>q</code>
304 query parameter, and returns <em>tag responses</em>
305 sorted by descending image count.</td>
306 <td><code>{"tags":[<a href=
307 "#tag-response">tag-response</a>]}</code></td>
308 <td>
309 <a href=
310 "/api/v1/json/search/tags?q=analyzed_name:wing"><code>
311 /api/v1/json/search/tags?q=analyzed_name:wing</code></a>
312 </td>
313 </tr>
314 <tr>
315 <td><code>POST</code></td>
316 <td><code>/api/v1/json/search/reverse</code></td>
317 <td><code>key, url, distance</code></td>
318 <td>Returns <em>image responses</em> based on the
319 results of reverse-searching the image given by the
320 <code>url</code> query parameter.</td>
321 <td><code>{"images":[<a href=
322 "#image-response">image-response</a>]}</code></td>
323 <td>
324 <a href=
325 "/api/v1/json/search/reverse?url=https://derpicdn.net/img/2019/12/24/2228439/full.jpg"
326 data-method=
327 "post"><code>/api/v1/json/search/reverse?url=https://derpicdn.net/img/2019/12/24/2228439/full.jpg</code></a>
328 </td>
329 </tr>
330 <tr>
331 <td><code>GET</code></td>
332 <td><code>/api/v1/json/forums</code></td>
333 <td></td>
334 <td>Fetches a list of <em>forum responses</em>.</td>
335 <td><code>{"forums":<a href=
336 "#forum-response">forum-response</a>}</code></td>
337 <td>
338 <a href=
339 "/api/v1/json/forums"><code>/api/v1/json/forums</code></a>
340 </td>
341 </tr>
342 <tr>
343 <td><code>GET</code></td>
344 <td><code>/api/v1/json/forums/:short_name</code></td>
345 <td></td>
346 <td>Fetches a <em>forum response</em> for the
347 abbreviated name given by the <code>short_name</code>
348 URL parameter.</td>
349 <td><code>{"forum":<a href=
350 "#forum-response">forum-response</a>}</code></td>
351 <td>
352 <a href=
353 "/api/v1/json/forums/dis"><code>/api/v1/json/forums/dis</code></a>
354 </td>
355 </tr>
356 <tr>
357 <td><code>GET</code></td>
358 <td>
359 <code>/api/v1/json/forums/:short_name/topics</code></td>
360 <td><code>page</code></td>
361 <td>Fetches a list of <em>topic responses</em> for
362 the abbreviated forum name given by the
363 <code>short_name</code> URL parameter.</td>
364 <td><code>{"topics":<a href=
365 "#topic-response">topic-response</a>}</code></td>
366 <td>
367 <a href=
368 "/api/v1/json/forums/dis/topics"><code>/api/v1/json/forums/dis/topics</code></a>
369 </td>
370 </tr>
371 <tr>
372 <td><code>GET</code></td>
373 <td>
374 <code>/api/v1/json/forums/:short_name/topics/:topic_slug</code></td>
375 <td></td>
376 <td>Fetches a <em>topic response</em> for the
377 abbreviated forum name given by the
378 <code>short_name</code> and topic given by
379 <code>topic_slug</code> URL parameters.</td>
380 <td><code>{"topic":<a href=
381 "#topic-response">topic-response</a>}</code></td>
382 <td>
383 <a href=
384 "/api/v1/json/forums/dis/topics/ask-the-mods-anything">
385 <code>/api/v1/json/forums/dis/topics/ask-the-mods-anything</code></a>
386 </td>
387 </tr>
388 <tr>
389 <td><code>GET</code></td>
390 <td>
391 <code>/api/v1/json/forums/:short_name/topics/:topic_slug/posts</code></td>
392 <td><code>page</code></td>
393 <td>Fetches a list of <em>post responses</em> for the
394 abbreviated forum name given by the
395 <code>short_name</code> and topic given by
396 <code>topic_slug</code> URL parameters.</td>
397 <td><code>{"posts":<a href=
398 "#post-response">post-response</a>}</code></td>
399 <td>
400 <a href=
401 "/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts">
402 <code>/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts</code></a>
403 </td>
404 </tr>
405 <tr>
406 <td><code>GET</code></td>
407 <td>
408 <code>/api/v1/json/forums/:short_name/topics/:topic_slug/posts/:post_id</code></td>
409 <td></td>
410 <td>Fetches a <em>post response</em> for the
411 abbreviated forum name given by the
412 <code>short_name</code>, topic given by
413 <code>topic_slug</code> and post given by
414 <code>post_id</code> URL parameters.</td>
415 <td><code>{"post":<a href=
416 "#post-response">post-response</a>}</code></td>
417 <td>
418 <a href=
419 "/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts/2761095">
420 <code>/api/v1/json/forums/dis/topics/ask-the-mods-anything/posts/2761095</code></a>
421 </td>
422 </tr>
423 </tbody>
424 </table>
425 <h2 id="image-response">Image Responses</h2>
426 <table class="table">
427 <thead>
428 <tr>
429 <th>Field</th>
430 <th>Type</th>
431 <th>Description</th>
432 </tr>
433 </thead>
434 <tbody>
435 <tr>
436 <td><code>aspect_ratio</code></td>
437 <td>Float</td>
438 <td>The image's width divided by its height.</td>
439 </tr>
440 <tr>
441 <td><code>comment_count</code></td>
442 <td>Integer</td>
443 <td>The number of comments made on the image.</td>
444 </tr>
445 <tr>
446 <td><code>created_at</code></td>
447 <td>RFC3339 datetime</td>
448 <td>The creation time, in UTC, of the image.</td>
449 </tr>
450 <tr>
451 <td><code>deletion_reason</code></td>
452 <td>String</td>
453 <td>The hide reason for the image, or
454 <code>null</code> if none provided. This will only
455 have a value on images which are deleted for a rule
456 violation.</td>
457 </tr>
458 <tr>
459 <td><code>description</code></td>
460 <td>String</td>
461 <td>The image's description.</td>
462 </tr>
463 <tr>
464 <td><code>downvotes</code></td>
465 <td>Integer</td>
466 <td>The number of downvotes the image has.</td>
467 </tr>
468 <tr>
469 <td><code>duplicate_of</code></td>
470 <td>Integer</td>
471 <td>The ID of the target image, or <code>null</code>
472 if none provided. This will only have a value on
473 images which are merged into another image.</td>
474 </tr>
475 <tr>
476 <td><code>faves</code></td>
477 <td>Integer</td>
478 <td>The number of faves the image has.</td>
479 </tr>
480 <tr>
481 <td><code>first_seen_at</code></td>
482 <td>RFC3339 datetime</td>
483 <td>The time, in UTC, this image was first seen
484 (before any duplicate merging).</td>
485 </tr>
486 <tr>
487 <td><code>format</code></td>
488 <td>String</td>
489 <td>The file extension of this image. One of
490 <code>"gif", "jpg", "jpeg", "png", "svg",
491 "webm"</code>.</td>
492 </tr>
493 <tr>
494 <td><code>height</code></td>
495 <td>Integer</td>
496 <td>The image's height, in pixels.</td>
497 </tr>
498 <tr>
499 <td><code>hidden_from_users</code></td>
500 <td>Boolean</td>
501 <td>Whether this image is hidden. An image is hidden
502 if it is merged or deleted for a rule violation.</td>
503 </tr>
504 <tr>
505 <td><code>id</code></td>
506 <td>Integer</td>
507 <td>The image's ID.</td>
508 </tr>
509 <tr>
510 <td><code>intensities</code></td>
511 <td>Object</td>
512 <td>
513 Optional object of <a href=
514 "https://github.com/derpibooru/cli_intensities">internal
515 image intensity data</a> for deduplication
516 purposes. May be <code>null</code> if intensities
517 have not yet been generated.
518 </td>
519 </tr>
520 <tr>
521 <td><code>mime_type</code></td>
522 <td>String</td>
523 <td>The MIME type of this image. One of
524 <code>"image/gif", "image/jpeg", "image/png",
525 "image/svg+xml", "video/webm"</code>.</td>
526 </tr>
527 <tr>
528 <td><code>name</code></td>
529 <td>String</td>
530 <td>The filename that this image was uploaded
531 with.</td>
532 </tr>
533 <tr>
534 <td><code>orig_sha512_hash</code></td>
535 <td>String</td>
536 <td>The SHA512 hash of this image as it was
537 originally uploaded.</td>
538 </tr>
539 <tr>
540 <td><code>processed</code></td>
541 <td>Boolean</td>
542 <td>Whether the image has finished optimization.</td>
543 </tr>
544 <tr>
545 <td><code>representations</code></td>
546 <td>Object</td>
547 <td>A mapping of representation names to their
548 respective URLs. Contains the keys <code>"full",
549 "large", "medium", "small", "tall", "thumb",
550 "thumb_small", "thumb_tiny"</code>.</td>
551 </tr>
552 <tr>
553 <td><code>score</code></td>
554 <td>Integer</td>
555 <td>The image's number of upvotes minus the image's
556 number of downvotes.</td>
557 </tr>
558 <tr>
559 <td><code>sha512_hash</code></td>
560 <td>String</td>
561 <td>The SHA512 hash of this image after it has been
562 processed.</td>
563 </tr>
564 <tr>
565 <td><code>source_url</code></td>
566 <td>String</td>
567 <td>The current source URL of the image.</td>
568 </tr>
569 <tr>
570 <td><code>spoilered</code></td>
571 <td>Boolean</td>
572 <td>Whether this image is hit by the current
573 filter.</td>
574 </tr>
575 <tr>
576 <td><code>tag_count</code></td>
577 <td>Integer</td>
578 <td>The number of tags present on this image.</td>
579 </tr>
580 <tr>
581 <td><code>tag_ids</code></td>
582 <td>Array</td>
583 <td>A list of tag IDs this image contains.</td>
584 </tr>
585 <tr>
586 <td><code>tags</code></td>
587 <td>Array</td>
588 <td>A list of tag names this image contains.</td>
589 </tr>
590 <tr>
591 <td><code>thumbnails_generated</code></td>
592 <td>Boolean</td>
593 <td>Whether this image has finished thumbnail
594 generation. Do not attempt to load images from
595 <code>view_url</code> or <code>representations</code>
596 if this is false.</td>
597 </tr>
598 <tr>
599 <td><code>updated_at</code></td>
600 <td>RFC3339 datetime</td>
601 <td>The time, in UTC, the image was last
602 updated.</td>
603 </tr>
604 <tr>
605 <td><code>uploader</code></td>
606 <td>String</td>
607 <td>The image's uploader.</td>
608 </tr>
609 <tr>
610 <td><code>uploader_id</code></td>
611 <td>Integer</td>
612 <td>The ID of the image's uploader.</td>
613 </tr>
614 <tr>
615 <td><code>upvotes</code></td>
616 <td>Integer</td>
617 <td>The image's number of upvotes.</td>
618 </tr>
619 <tr>
620 <td><code>view_url</code></td>
621 <td>String</td>
622 <td>The image's view URL, including tags.</td>
623 </tr>
624 <tr>
625 <td><code>width</code></td>
626 <td>Integer</td>
627 <td>The image's width, in pixels.</td>
628 </tr>
629 <tr>
630 <td><code>wilson_score</code></td>
631 <td>Float</td>
632 <td>
633 The lower bound of the <a href=
634 "https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval">
635 Wilson score interval</a> for the image, based on
636 its upvotes and downvotes, given a z-score
637 corresponding to a confidence of 99.5%.
638 </td>
639 </tr>
640 </tbody>
641 </table>
642 <h2 id="comment-response">Comment Responses</h2>
643 <table class="table">
644 <thead>
645 <tr>
646 <th>Field</th>
647 <th>Type</th>
648 <th>Description</th>
649 </tr>
650 </thead>
651 <tbody>
652 <tr>
653 <td><code>author</code></td>
654 <td>String</td>
655 <td>The comment's author.</td>
656 </tr>
657 <tr>
658 <td><code>avatar</code></td>
659 <td>String</td>
660 <td>The URL of the author's avatar. May be a link to
661 the CDN path, or a <code>data:</code> URI.</td>
662 </tr>
663 <tr>
664 <td><code>body</code></td>
665 <td>String</td>
666 <td>The comment text.</td>
667 </tr>
668 <tr>
669 <td><code>created_at</code></td>
670 <td>RFC3339 datetime</td>
671 <td>The creation time, in UTC, of the comment.</td>
672 </tr>
673 <tr>
674 <td><code>edit_reason</code></td>
675 <td>String</td>
676 <td>The edit reason for this comment, or
677 <code>null</code> if none provided.</td>
678 </tr>
679 <tr>
680 <td><code>edited_at</code></td>
681 <td>RFC3339 datetime</td>
682 <td>The time, in UTC, this comment was last edited
683 at, or <code>null</code> if it was not edited.</td>
684 </tr>
685 <tr>
686 <td><code>id</code></td>
687 <td>Integer</td>
688 <td>The comment's ID.</td>
689 </tr>
690 <tr>
691 <td><code>image_id</code></td>
692 <td>Integer</td>
693 <td>The ID of the image the comment belongs to.</td>
694 </tr>
695 <tr>
696 <td><code>updated_at</code></td>
697 <td>RFC3339 dateime</td>
698 <td>The time, in UTC, the comment was last updated
699 at.</td>
700 </tr>
701 <tr>
702 <td><code>user_id</code></td>
703 <td>Integer</td>
704 <td>The ID of the user the comment belongs to, if
705 any.</td>
706 </tr>
707 </tbody>
708 </table>
709 <h2 id="forum-response">Forum Responses</h2>
710 <table class="table">
711 <thead>
712 <tr>
713 <th>Field</th>
714 <th>Type</th>
715 <th>Description</th>
716 </tr>
717 </thead>
718 <tbody>
719 <tr>
720 <td><code>name</code></td>
721 <td>String</td>
722 <td>The forum's name.</td>
723 </tr>
724 <tr>
725 <td><code>short_name</code></td>
726 <td>String</td>
727 <td>The forum's short name (used to identify
728 it).</td>
729 </tr>
730 <tr>
731 <td><code>description</code></td>
732 <td>String</td>
733 <td>The forum's description.</td>
734 </tr>
735 <tr>
736 <td><code>topic_count</code></td>
737 <td>Integer</td>
738 <td>The amount of topics in the forum.</td>
739 </tr>
740 <tr>
741 <td><code>post_count</code></td>
742 <td>Integer</td>
743 <td>The amount of posts in the forum.</td>
744 </tr>
745 </tbody>
746 </table>
747 <h2 id="topic-response">Topic Responses</h2>
748 <table class="table">
749 <thead>
750 <tr>
751 <th>Field</th>
752 <th>Type</th>
753 <th>Description</th>
754 </tr>
755 </thead>
756 <tbody>
757 <tr>
758 <td><code>slug</code></td>
759 <td>String</td>
760 <td>The topic's slug (used to identify it).</td>
761 </tr>
762 <tr>
763 <td><code>title</code></td>
764 <td>String</td>
765 <td>The topic's title.</td>
766 </tr>
767 <tr>
768 <td><code>post_count</code></td>
769 <td>Integer</td>
770 <td>The amount of posts in the topic.</td>
771 </tr>
772 <tr>
773 <td><code>view_count</code></td>
774 <td>Integer</td>
775 <td>The amount of views the topic has received.</td>
776 </tr>
777 <tr>
778 <td><code>sticky</code></td>
779 <td>Boolean</td>
780 <td>Whether the topic is sticky.</td>
781 </tr>
782 <tr>
783 <td><code>last_replied_to_at</code></td>
784 <td>RFC3339 datetime</td>
785 <td>The time, in UTC, when the last reply was
786 made.</td>
787 </tr>
788 <tr>
789 <td><code>locked</code></td>
790 <td>Boolean</td>
791 <td>Whether the topic is locked.</td>
792 </tr>
793 <tr>
794 <td><code>user_id</code></td>
795 <td>Integer</td>
796 <td>The ID of the user who made the topic.
797 <code>Null</code> if posted anonymously.</td>
798 </tr>
799 <tr>
800 <td><code>author</code></td>
801 <td>String</td>
802 <td>The name of the user who made the topic.</td>
803 </tr>
804 </tbody>
805 </table>
806 <h2 id="post-response">Post Responses</h2>
807 <table class="table">
808 <thead>
809 <tr>
810 <th>Field</th>
811 <th>Type</th>
812 <th>Description</th>
813 </tr>
814 </thead>
815 <tbody>
816 <tr>
817 <td><code>author</code></td>
818 <td>String</td>
819 <td>The post's author.</td>
820 </tr>
821 <tr>
822 <td><code>avatar</code></td>
823 <td>String</td>
824 <td>The URL of the author's avatar. May be a link to
825 the CDN path, or a <code>data:</code> URI.</td>
826 </tr>
827 <tr>
828 <td><code>body</code></td>
829 <td>String</td>
830 <td>The post text.</td>
831 </tr>
832 <tr>
833 <td><code>created_at</code></td>
834 <td>RFC3339 datetime</td>
835 <td>The creation time, in UTC, of the post.</td>
836 </tr>
837 <tr>
838 <td><code>edit_reason</code></td>
839 <td>String</td>
840 <td>The edit reason for this post.</td>
841 </tr>
842 <tr>
843 <td><code>edited_at</code></td>
844 <td>RFC3339 datetime</td>
845 <td>The time, in UTC, this post was last edited at,
846 or <code>null</code> if it was not edited.</td>
847 </tr>
848 <tr>
849 <td><code>id</code></td>
850 <td>Integer</td>
851 <td>The post's ID (used to identify it).</td>
852 </tr>
853 <tr>
854 <td><code>updated_at</code></td>
855 <td>RFC3339 dateime</td>
856 <td>The time, in UTC, the post was last updated
857 at.</td>
858 </tr>
859 <tr>
860 <td><code>user_id</code></td>
861 <td>Integer</td>
862 <td>The ID of the user the post belongs to, if
863 any.</td>
864 </tr>
865 </tbody>
866 </table>
867 <h2 id="tag-response">Tag Responses</h2>
868 <table class="table">
869 <thead>
870 <tr>
871 <th>Field</th>
872 <th>Type</th>
873 <th>Description</th>
874 </tr>
875 </thead>
876 <tbody>
877 <tr>
878 <td><code>aliased_tag</code></td>
879 <td>String</td>
880 <td>The slug of the tag this tag is aliased to, if
881 any.</td>
882 </tr>
883 <tr>
884 <td><code>aliases</code></td>
885 <td>Array</td>
886 <td>The slugs of the tags aliased to this tag.</td>
887 </tr>
888 <tr>
889 <td><code>category</code></td>
890 <td>String</td>
891 <td>The category class of this tag. One of
892 <code>"character", "content-fanmade",
893 "content-official", "error", "oc", "origin",
894 "rating", "species", "spoiler"</code>.</td>
895 </tr>
896 <tr>
897 <td><code>description</code></td>
898 <td>String</td>
899 <td>The long description for the tag.</td>
900 </tr>
901 <tr>
902 <td><code>dnp_entries</code></td>
903 <td>Array</td>
904 <td>An array of objects containing DNP entries
905 claimed on the tag.</td>
906 </tr>
907 <tr>
908 <td><code>id</code></td>
909 <td>Integer</td>
910 <td>The tag's ID.</td>
911 </tr>
912 <tr>
913 <td><code>images</code></td>
914 <td>Integer</td>
915 <td>The image count of the tag.</td>
916 </tr>
917 <tr>
918 <td><code>implied_by_tags</code></td>
919 <td>Array</td>
920 <td>The slugs of the tags this tag is implied
921 by.</td>
922 </tr>
923 <tr>
924 <td><code>implied_tags</code></td>
925 <td>Array</td>
926 <td>The slugs of the tags this tag implies.</td>
927 </tr>
928 <tr>
929 <td><code>name</code></td>
930 <td>String</td>
931 <td>The name of the tag.</td>
932 </tr>
933 <tr>
934 <td><code>name_in_namespace</code></td>
935 <td>String</td>
936 <td>The name of the tag in its namespace.</td>
937 </tr>
938 <tr>
939 <td><code>namespace</code></td>
940 <td>String</td>
941 <td>The namespace of the tag.</td>
942 </tr>
943 <tr>
944 <td><code>short_description</code></td>
945 <td>String</td>
946 <td>The short description for the tag.</td>
947 </tr>
948 <tr>
949 <td><code>slug</code></td>
950 <td>String</td>
951 <td>The slug for the tag.</td>
952 </tr>
953 <tr>
954 <td><code>spoiler_image</code></td>
955 <td>String</td>
956 <td>The spoiler image URL for the tag.</td>
957 </tr>
958 </tbody>
959 </table>
960 <h2 id="user-response">User Responses</h2>
961 <table class="table">
962 <thead>
963 <tr>
964 <th>Field</th>
965 <th>Type</th>
966 <th>Description</th>
967 </tr>
968 </thead>
969 <tbody>
970 <tr>
971 <td><code>id</code></td>
972 <td>Integer</td>
973 <td>The ID of the user.</td>
974 </tr>
975 <tr>
976 <td><code>name</code></td>
977 <td>String</td>
978 <td>The name of the user.</td>
979 </tr>
980 <tr>
981 <td><code>slug</code></td>
982 <td>String</td>
983 <td>The slug of the user.</td>
984 </tr>
985 <tr>
986 <td><code>role</code></td>
987 <td>String</td>
988 <td>The role of the user.</td>
989 </tr>
990 <tr>
991 <td><code>description</code></td>
992 <td>String</td>
993 <td>The description (bio) of the user.</td>
994 </tr>
995 <tr>
996 <td><code>avatar_url</code></td>
997 <td>String</td>
998 <td>The URL of the user's thumbnail.
999 <code>Null</code> if they haven't set one.</td>
1000 </tr>
1001 <tr>
1002 <td><code>created_at</code></td>
1003 <td>RFC3339 datetime</td>
1004 <td>The creation time, in UTC, of the user.</td>
1005 </tr>
1006 <tr>
1007 <td><code>comments_count</code></td>
1008 <td>Integer</td>
1009 <td>The comment count of the user.</td>
1010 </tr>
1011 <tr>
1012 <td><code>uploads_count</code></td>
1013 <td>Integer</td>
1014 <td>The upload count of the user.</td>
1015 </tr>
1016 <tr>
1017 <td><code>posts_count</code></td>
1018 <td>Integer</td>
1019 <td>The forum posts count of the user.</td>
1020 </tr>
1021 <tr>
1022 <td><code>topics_count</code></td>
1023 <td>Integer</td>
1024 <td>The forum topics count of the user.</td>
1025 </tr>
1026 <tr>
1027 <td><code>links</code></td>
1028 <td>Object</td>
1029 <td>
1030 The links the user has registered. See <a href=
1031 "#links-response">links-response</a>.
1032 </td>
1033 </tr>
1034 <tr>
1035 <td><code>awards</code></td>
1036 <td>Object</td>
1037 <td>
1038 The awards/badges of the user. See <a href=
1039 "#awards-response">awards-response</a>.
1040 </td>
1041 </tr>
1042 </tbody>
1043 </table>
1044 <h2 id="filter-response">Filter Responses</h2>
1045 <table class="table">
1046 <thead>
1047 <tr>
1048 <th>Field</th>
1049 <th>Type</th>
1050 <th>Description</th>
1051 </tr>
1052 </thead>
1053 <tbody>
1054 <tr>
1055 <td><code>id</code></td>
1056 <td>Integer</td>
1057 <td>The id of the filter.</td>
1058 </tr>
1059 <tr>
1060 <td><code>name</code></td>
1061 <td>String</td>
1062 <td>The name of the filter.</td>
1063 </tr>
1064 <tr>
1065 <td><code>description</code></td>
1066 <td>String</td>
1067 <td>The description of the filter.</td>
1068 </tr>
1069 <tr>
1070 <td><code>user_id</code></td>
1071 <td>Integer</td>
1072 <td>The id of the user the filter belongs to.
1073 <code>Null</code> if it isn't assigned to a user
1074 (usually <code>system</code> filters only).</td>
1075 </tr>
1076 <tr>
1077 <td><code>user_count</code></td>
1078 <td>Integer</td>
1079 <td>The amount of users employing this filter.</td>
1080 </tr>
1081 <tr>
1082 <td><code>system</code></td>
1083 <td>Boolean</td>
1084 <td>If <code>true</code>, is a system filter. System
1085 filters are usable by anyone and don't have a
1086 <code>user_id</code> set.</td>
1087 </tr>
1088 <tr>
1089 <td><code>public</code></td>
1090 <td>Boolean</td>
1091 <td>If <code>true</code>, is a public filter. Public
1092 filters are usable by anyone.</td>
1093 </tr>
1094 <tr>
1095 <td><code>spoilered_tag_ids</code></td>
1096 <td>Array</td>
1097 <td>A list of tag IDs (as integers) that this filter
1098 will spoil.</td>
1099 </tr>
1100 <tr>
1101 <td><code>spoilered_complex</code></td>
1102 <td>String</td>
1103 <td>The complex spoiled filter.</td>
1104 </tr>
1105 <tr>
1106 <td><code>hidden_tag_ids</code></td>
1107 <td>Array</td>
1108 <td>A list of tag IDs (as integers) that this filter
1109 will hide.</td>
1110 </tr>
1111 <tr>
1112 <td><code>hidden_complex</code></td>
1113 <td>String</td>
1114 <td>The complex hidden filter.</td>
1115 </tr>
1116 </tbody>
1117 </table>
1118 <h2 id="links-response">Links Responses</h2>
1119 <table class="table">
1120 <thead>
1121 <tr>
1122 <th>Field</th>
1123 <th>Type</th>
1124 <th>Description</th>
1125 </tr>
1126 </thead>
1127 <tbody>
1128 <tr>
1129 <td><code>user_id</code></td>
1130 <td>Integer</td>
1131 <td>The ID of the user who owns this link.</td>
1132 </tr>
1133 <tr>
1134 <td><code>created_at</code></td>
1135 <td>RFC3339 datetime</td>
1136 <td>The creation time, in UTC, of this link.</td>
1137 </tr>
1138 <tr>
1139 <td><code>state</code></td>
1140 <td>String</td>
1141 <td>The state of this link.</td>
1142 </tr>
1143 <tr>
1144 <td><code>tag_id</code></td>
1145 <td>Integer</td>
1146 <td>The ID of an associated tag for this link.
1147 <code>Null</code> if no tag linked.</td>
1148 </tr>
1149 </tbody>
1150 </table>
1151 <h2 id="awards-response">Awards Responses</h2>
1152 <table class="table">
1153 <thead>
1154 <tr>
1155 <th>Field</th>
1156 <th>Type</th>
1157 <th>Description</th>
1158 </tr>
1159 </thead>
1160 <tbody>
1161 <tr>
1162 <td><code>image_url</code></td>
1163 <td>String</td>
1164 <td>The URL of this award.</td>
1165 </tr>
1166 <tr>
1167 <td><code>title</code></td>
1168 <td>String</td>
1169 <td>The title of this award.</td>
1170 </tr>
1171 <tr>
1172 <td><code>id</code></td>
1173 <td>Integer</td>
1174 <td>The ID of the badge this award is derived
1175 from.</td>
1176 </tr>
1177 <tr>
1178 <td><code>label</code></td>
1179 <td>String</td>
1180 <td>The label of this award.</td>
1181 </tr>
1182 <tr>
1183 <td><code>awarded_on</code></td>
1184 <td>RFC3339 datetime</td>
1185 <td>The time, in UTC, when this award was given.</td>
1186 </tr>
1187 </tbody>
1188 </table>
1189 <h2 id="gallery-response">Gallery Responses</h2>
1190 <table class="table">
1191 <thead>
1192 <tr>
1193 <th>Field</th>
1194 <th>Type</th>
1195 <th>Description</th>
1196 </tr>
1197 </thead>
1198 <tbody>
1199 <tr>
1200 <td><code>description</code></td>
1201 <td>String</td>
1202 <td>The gallery's description.</td>
1203 </tr>
1204 <tr>
1205 <td><code>id</code></td>
1206 <td>Integer</td>
1207 <td>The gallery's ID.</td>
1208 </tr>
1209 <tr>
1210 <td><code>spoiler_warning</code></td>
1211 <td>String</td>
1212 <td>The gallery's spoiler warning.</td>
1213 </tr>
1214 <tr>
1215 <td><code>thumbnail_id</code></td>
1216 <td>Integer</td>
1217 <td>The ID of the cover image for the gallery.</td>
1218 </tr>
1219 <tr>
1220 <td><code>title</code></td>
1221 <td>String</td>
1222 <td>The gallery's title.</td>
1223 </tr>
1224 <tr>
1225 <td><code>user</code></td>
1226 <td>String</td>
1227 <td>The name of the gallery's creator.</td>
1228 </tr>
1229 <tr>
1230 <td><code>user_id</code></td>
1231 <td>Integer</td>
1232 <td>The ID of the gallery's creator.</td>
1233 </tr>
1234 </tbody>
1235 </table>
1236 <h2 id="oembed-response">Oembed Responses</h2>
1237 <table class="table">
1238 <thead>
1239 <tr>
1240 <th>Field</th>
1241 <th>Type</th>
1242 <th>Description</th>
1243 </tr>
1244 </thead>
1245 <tbody>
1246 <tr>
1247 <td><code>author_name</code></td>
1248 <td>String</td>
1249 <td>The comma-delimited names of the image
1250 authors.</td>
1251 </tr>
1252 <tr>
1253 <td><code>author_url</code></td>
1254 <td>String</td>
1255 <td>The source URL of the image.</td>
1256 </tr>
1257 <tr>
1258 <td><code>cache_age</code></td>
1259 <td>Integer</td>
1260 <td>Always <code>7200</code>.</td>
1261 </tr>
1262 <tr>
1263 <td><code>derpibooru_comments</code></td>
1264 <td>Integer</td>
1265 <td>The number of comments made on the image.</td>
1266 </tr>
1267 <tr>
1268 <td><code>derpibooru_id</code></td>
1269 <td>Integer</td>
1270 <td>The image's ID.</td>
1271 </tr>
1272 <tr>
1273 <td><code>derpibooru_score</code></td>
1274 <td>Integer</td>
1275 <td>The image's number of upvotes minus the image's
1276 number of downvotes.</td>
1277 </tr>
1278 <tr>
1279 <td><code>derpibooru_tags</code></td>
1280 <td>Array</td>
1281 <td>The names of the image's tags.</td>
1282 </tr>
1283 <tr>
1284 <td><code>provider_name</code></td>
1285 <td>String</td>
1286 <td>Always <code>"Derpibooru"</code>.</td>
1287 </tr>
1288 <tr>
1289 <td><code>provider_url</code></td>
1290 <td>String</td>
1291 <td>Always <code>"https://furbooru.org"</code>.</td>
1292 </tr>
1293 <tr>
1294 <td><code>title</code></td>
1295 <td>String</td>
1296 <td>The image's ID and associated tags, as would be
1297 given on the title of the image page.</td>
1298 </tr>
1299 <tr>
1300 <td><code>type</code></td>
1301 <td>String</td>
1302 <td>Always <code>"photo"</code>.</td>
1303 </tr>
1304 <tr>
1305 <td><code>version</code></td>
1306 <td>String</td>
1307 <td>Always <code>"1.0"</code>.</td>
1308 </tr>
1309 </tbody>
1310 </table>
1311 </div>
1312 </main>