Already have an account? Sign in.
Retrieve the details of all beers, and narrow down the results with specific arguments.
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 “kin” will find “Pumpking”. |
| token | string | Include beers created by the API user with the specified token in the results. Public or private. |
| Status | Reason |
|---|---|
| 400 | Invalid query. |
| 406 | Invalid format. |
GET /v1/beers.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,
"beers" : [
{ "id" : 1,
"name" : "Strawberry Harvest",
"description" : "Strawberry Harvest Lager is a wheat beer ...",
"abv" : 4.2,
"created_at" : "2010-01-01T00:00:00Z",
"updated_at" : "2010-02-02T12:30:00Z",
"brewery" : {
"id" : 1,
"name" : "Abita"
}
},
...
]
}