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
{"totalNumberOfCategories": 0,"categories": [{"categoryId": null,"displayName": null,"name": null,"parentId": null,"numberOfBusinesses": null,"childrenCategories": [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,"childrenCategories": [null],"countries": [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
-
orderBy, Optional string
In what order to list the businesses.
Example: ?orderBy=trustscore.desc
-
status, Optional array
The business status(s) [collecting, claimed, unclaimed, all]
Example: ?status=collecting,claimed
-
minimumReviews, Optional number
The minimum number of reviews the business has.
Example: ?minimumReviews=25
-
timePeriodMonths, Optional number
For what period we analyze the businesses for. (in months)
Example: ?timePeriodMonths=12
-
location, Optional string
City or Zipcode of the business unit
Example: ?location=Birmingham
-
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
-
offset, Optional number
The number of business units to skip.
Example: ?offset=6
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,"trustScoreV2": 0,"stars": 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}]}]} -