Trustpilot
Trustpilot Categories API
The full Trustpilot category tree (22 top-level categories and their 189 subcategories) with the category_id and name of each, or the categories whose name matches a query. Every category_id works with the Category endpoint. Costs 2 credits per request.
POST/api/v1/trustpilot/categories
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonquerystringFind categories by name, 1-100 characters. Omit it for the full category tree.
Example: insurance
countrystringdefault:US2-letter country code for the name lookup.
Example: GB
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
tree = client.trustpilot.categories()
for top in tree["data"]["categories"]:
print(top["category_id"], [s["category_id"] for s in top["subcategories"]])
matches = client.trustpilot.categories(query="insurance")Response
"query": null,
"count": 22,
"subcategory_count": 189,
},
"response_time": 3016
}