Categories API
Get details of a specific category.
GET
Authentication: API Key
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
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
Specify country using ISO 3166-1-alpha-2.
Example: ?country=US
locale,
Optional
String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK
Response
{ "businessUnitCount": 42, "parentId": "animals_pets", "displayName": "Pet Store", "categoryId": "pet_store", "name": "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
categoryId,
Required
String
The id of the category to get business unit list for.
Example: …/v1/categories/building_materials_supplier/business-units
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
The country of the business units.
Example: ?country=US
locale,
Optional
String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=en-US
The locale to get translated category names for.
Default value: en-US
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.
Default value: 1
Example: ?page=1
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
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
The number of business units to retrieve per page.
Constraints: The allowed range is minimum: 0, maximum: 100
Default value: 20
Example: ?perPage=20
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": "pet_store", "displayName": "Pet Store", "name": "pet_store", "isPrimary": true, "ranking": { "position": 1, "cardinality": 13 }, "source": "business", "relevance": 1 } ] } ] }
Get a list of all categories.
GET
Authentication: API Key
https://api.trustpilot.com/v1/categories
Parameters
country,
Optional
String
Specify country using ISO 3166-1-alpha-2.
Default value: US
Example: ?country=DK
Specify country using ISO 3166-1-alpha-2.
Default value: US
Example: ?country=DK
locale,
Optional
String
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK
The locale to get translated category names for.
Default value: en-US
Example: ?locale=da-DK
parentId,
Optional
String
Optional id of a parent category to list children of.
Example: ?parentId=animals_pets
Optional id of a parent category to list children of.
Example: ?parentId=animals_pets
Response
{ "categories": [ { "categoryId": "pet_store", "displayName": "Pet Store", "name": "pet_store" } ] }