Open Beer Database

A free, public database and API for beer information.

Sign up for an API token.

Already have an account? Sign in.

GET /breweries

Retrieve the details of all breweries, and narrow down the results with specific arguments.

Parameters

All parameters are optional.

Name Type Description
callback string Name of the callback function for JSONP.
order string The order to sort the results by. Defaults to “id ASC”. Valid options are “id”, “name”, “created_at”, and “updated_at” for the column and “ASC” and “DESC” for the direction.
page integer The page of results to retrieve. Defaults to “1”.
per_page integer The number of results per page. Defaults to “50”.
query string The string to search with. Case-insensitive and must be at least two characters. Automatically wrapped in wildcards, so a query of “bit” will find “Abita”.
token string Include breweries created by the API user with the specified token in the results. Public or private.

Errors

Status Reason
400 Invalid query.
406 Invalid format.

Example

GET /v1/breweries.json HTTP/1.1
Host: api.openbeerdatabase.com
Content-Type: application/json; charset=utf-8
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: length

{ "page"      : 1,
  "pages"     : 2,
  "total"     : 55,
  "breweries" : [
    { "id"         : 1,
      "name"       : "Abita",
      "url"        : "http://abita.com",
      "created_at" : "2010-01-01T00:00:00Z",
      "updated_at" : "2010-02-02T12:30:00Z"
    },
    ...
  ]
}