brands

List brands

Return a keyset-paginated page of food brands.

Supports filtering (id, name), sorting (sort=id, sort=name), sparse fieldsets (fields[brands]), and typo-tolerant search (?q=).

get/v1/brands

Request

  • Base URL: https://api.noms.sh
  • URL: https://api.noms.sh/v1/brands
  • Auth: API key in header X-API-Key

Query parameters

page_sizeinteger nullable

Number of items to return per page (keyset pagination). Allowed range is 1–20; a value outside it is rejected with a 400.

Example:20
cursorstring nullable

Opaque keyset-pagination cursor. Don't build it by hand; follow links.next from a previous response to fetch the next page.

sortstring nullable

Sort key; prefix with - for descending (-name). Comma-join keys for tie-breakers. Defaults to the resource's natural order.

Example:-name
qstring nullable

Typo-tolerant text search. Filters to matching rows and, when no sort is given, orders them by relevance. Composes with filters and pagination.

Example:chocolat
fields[brands]string

Sparse fieldset. A comma-separated subset of brands fields to return (e.g. id,name). Omit to return all fields.

idstring

Filter on id. Bare id=value means eq; the bracket form names the operator — id[eq], id[in]. id[in] takes a comma-separated list. Rows with no value for the field never match.

namestring

Filter on name. Bare name=value means eq; the bracket form names the operator — name[eq], name[in]. name[in] takes a comma-separated list. Rows with no value for the field never match.

Headers

If-None-Matchstring

An ETag from a previous response for this URL. If it still matches, the API answers 304 Not Modified with no body; otherwise you get the full 200. Either way the request is metered.

Response

A page of brands. fields[brands] may trim the keys present in each data item.

Example response

{
  "data": [
    {
      "id": "XoluRyOx9o3C",
      "name": "Blue Diamond"
    }
  ],
  "links": {
    "next": "https://api.noms.sh/v1/foods?page_size=2&cursor=eyJ2IjpbeyJ0IjoicmF3IiwidiI6Ik1pbGsifV0sInMiOiIrbmFtZSJ9",
    "self": "https://api.noms.sh/v1/foods?page_size=2"
  },
  "meta": {
    "has_more": true,
    "page_size": 10
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.