Categories API
-
List categories
Get a list of all categories.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/categories
Parameters
-
country, Optional string
Specify country using ISO 3166-1-alpha-2.
Example: ?country=DK
-
locale, Optional string
The locale to get translated category names for.
Example: ?locale=da-DK
-
parentId, Optional string
Optional id of a parent category to list children of.
Example: ?parentId=animals_pets
curl -X GET "https://api.trustpilot.com/v1/categories" \-H "apikey: YOUR-API-KEY-HERE"Response
{"categories": [{"categoryId": null,"displayName": null,"name": null}]} -
-
Get category
Get details of a specific category.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/categories/{categoryId}
Parameters
-
categoryId, Required string
The id of the category to get details about.
Example: .../v1/categories/pet_store
-
country, Required string
Specify country using ISO 3166-1-alpha-2.
Example: ?country=US
-
locale, Optional string
The locale to get translated category names for.
Example: ?locale=da-DK
curl -X GET "https://api.trustpilot.com/v1/categories/{categoryId}" \-G \--data-urlencode "country=US" \-H "apikey: YOUR-API-KEY-HERE"Response
{"businessUnitCount": 0,"parentId": null,"displayName": null,"categoryId": null,"name": null} -
-
List business units in category
Get a list of business units in a specific category. NOTE rank result values are obsolete.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/v1/categories/{categoryId}/business-units
Parameters
-
categoryId, Required string
The id of the category to get business unit list for.
Example: .../v1/categories/building_materials_supplier/business-units
-
country, Optional string
The country of the business units.
Example: ?country=US
-
locale, Optional string
The locale to get translated category names for.
Example: ?locale=en-US
-
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.
Example: ?page=1
-
perPage, Optional number
The number of business units to retrieve per page.
Example: ?perPage=20
curl -X GET "https://api.trustpilot.com/v1/categories/{categoryId}/business-units" \-H "apikey: YOUR-API-KEY-HERE"Response
{"totalNumberOfBusinesses": 0,"businessUnits": [{"businessUnitId": null,"displayName": null,"identifyingName": null,"trustScore": 0,"numberOfReviews": 0,"rank": 0,"location": {"city": null,"zipCode": null,"address": null},"logoUrl": null,"categories": [{"categoryId": null,"displayName": null,"name": null,"isPrimary": false,"ranking": {"position": 0,"cardinality": 0},"source": null,"relevance": 0}]}]} -