Go To Top

Categories API

Get details of a specific category.

GET
Authentication: API Key
https://api.trustpilot.com/v1/categories/{categoryId}
Parameters
locale, Optional String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK

country, Required String
Specify country using ISO 3166-1-alpha-2.
Example: ?country=US

categoryId, Required String
The id of the category to get details about.
Example: …/v1/categories/pet_store

Response
{
  "businessUnitCount": 42,
  "displayName": "Pet Store",
  "name": "pet_store",
  "parentId": "animals_pets",
  "categoryId": "pet_store"
}

Get a list of business units in a specific category. NOTE rank result values are obsolete.

GET
Authentication: API Key
https://api.trustpilot.com/v1/categories/{categoryId}/business-units
Parameters
perPage, Optional Number
The number of business units to retrieve per page.
Constraints: The allowed range is minimum: 0, maximum: 100
Default value: 20
Example: ?perPage=20

locale, Optional String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=en-US

country, Optional String
The country of the business units.
Example: ?country=US

categoryId, Required String
The id of the category to get business unit list for.
Example: …/v1/categories/building_materials_supplier/business-units

page, Optional Number
The page to retrieve. If the page number requested is higher than the available number of pages an empty array will be returned.
Default value: 1
Example: ?page=1

Response
{
  "businessUnits": [
    {
      "displayName": null,
      "businessUnitId": null,
      "rank": 0,
      "numberOfReviews": 0,
      "location": {
        "city": null,
        "zipCode": null,
        "address": null
      },
      "logoUrl": null,
      "identifyingName": null,
      "trustScore": 0,
      "categories": [
        {
          "ranking": {
            "position": 1,
            "cardinality": 13
          },
          "displayName": "Pet Store",
          "name": "pet_store",
          "source": "business",
          "isPrimary": true,
          "categoryId": "pet_store"
        }
      ]
    }
  ],
  "totalNumberOfBusinesses": 0
}

Get a list of all categories.

GET
Authentication: API Key
https://api.trustpilot.com/v1/categories
Parameters
locale, Optional String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK

country, Optional String
Specify country using ISO 3166-1-alpha-2.
Default value: US
Example: ?country=DK

parentId, Optional String
Optional id of a parent category to list children of.
Example: ?parentId=animals_pets

Response
{
  "categories": [
    {
      "displayName": "Pet Store",
      "name": "pet_store",
      "categoryId": "pet_store"
    }
  ]
}