Skip to content

Latest commit

 

History

History
executable file
·
94 lines (52 loc) · 2.61 KB

api.md

File metadata and controls

executable file
·
94 lines (52 loc) · 2.61 KB

RedditBooru API Endpoints

Sources


Returns a list of all enabled subreddit sources.

  • URL: sources/

    Note: the trailing '/' is required

  • Method:

    GET

  • Success Response:

    • Code: 200
    • Content: [{ "name" : "r\/awwnime", "title":"awwnime","value":"1","checked":true }, ...
  • Error Response:

    The only error that should be returned is a 404 if the url was malformed, in which case it will return the default webpage

  • Sample Call:

    curl https://redditbooru.com/sources/

Images


Returns images. If this is POSTed to with an image file, it will honor all of these settings while doing a reverse image search on the file supplied.

  • URL: images/

  • Method:

    GET, POST

  • URL Params

    Optional:

  • imageUri -- URL to an image; returns visually similar results. Default: empty

  • sources -- a comma delimited list of sources to search through. If not passed, will default to source via subdomain, cookie, or source ID 1. Pass -1 to search all sources. Default: empty

  • limit -- The max number of images to return. Default: 30

  • afterId -- For paging; only fetches results after the image ID (currently buggy with albums). Default: null

  • postId -- Returns all images for a specific post ID. Default: null

  • externalId -- Returns all images for a specific reddit post ID. Default: null

  • afterDate -- Return only images posted after a specific unix timestamp. Default: null

  • user -- Return images posted by a specific user. Default: null

  • q -- Return images that match a keywords search query. Default: null

  • ignoreSource -- Ignore the default or provided sources. DEPRECATED

  • ignoreUser -- Ignore the provided user. DEPRECATED

  • honorVisible -- Don't show images that aren't marked visible. True by default. DEPRECATED

  • Success Response:

    • Code: 200
      Content: Varies with query. Will most likely be an array of image objects
  • Error Response:

    • Code: 500 INTERNAL SERVER Error
      Content: none

      OR

    • Code: 404 CONTENT NOT FOUND
      Content: none

  • Sample Call:

    curl https://redditbooru.com/api/images/?sources=1&limit=5&user=chiefnoah&q=alice

A Note About Sources

Sources can be specified in a few ways with each having its own order of precedence, listed here from highest to lowest: