Trustpilot Categories
Get all available Trustpilot categories and subcategories. This is a free endpoint that returns a structured list of all business categories used on Trustpilot.
Endpoint
GET
/api/trustpilot_categories
Request Examples
<?php
$url = "http://scrappa.test/api/trustpilot/categories";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Accept: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
const url = "http://scrappa.test/api/trustpilot/categories";
fetch(url, {
method: "GET",
headers: {
"Accept": "application/json"
}
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error("Error:", error);
});
import requests
import json
url = "http://scrappa.test/api/trustpilot/categories"
headers = {
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json()
print(json.dumps(data, indent=2))
curl -X GET "http://scrappa.test/api/trustpilot/categories" \
-H "Accept: application/json"
Response Schema
{
"data": {
"categories": [
{
"id": 1,
"name": "Animals & Pets",
"slug": "animals-pets",
"subcategories": [
{
"id": 2,
"name": "Animal Health",
"slug": "animal-health"
},
{
"id": 3,
"name": "Pet Stores",
"slug": "pet-stores"
}
]
}
],
"total_categories": 20,
"total_subcategories": 133
},
"message": "Trustpilot categories retrieved successfully",
"success": true
}
Try It Live
Test this endpoint in our interactive playground with real data.
Open in Playground