Getting Started
Turn a brand name into a Trustpilot domain, read its rating summary, then pull the reviews behind the score.
1. Get your API key
Create an account and generate a FetchLayer API key from your dashboard. There is no Trustpilot Business account, no invitation, and no OAuth app involved.
Create free account →2. Find the company
Every other endpoint takes a company domain. If you have a brand name instead, search for it.
curl -X POST https://api.fetchlayer.dev/trustpilot/search-companies \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"query":"meal kit delivery","limit":10}'Tip
/resolve-url first — it returns the domain or review id plus any star, language and date filters the URL encodes, and it does not consume a credit. 3. Read the rating summary
/company-profile returns the TrustScore, the one-to-five star distribution and the review count per language. Those two breakdowns are how you plan a reviews pull that does not lose data to the 200-review ceiling.
curl -X POST https://api.fetchlayer.dev/trustpilot/company-profile \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"company":"hellofresh.com"}'4. Pull the reviews
curl -X POST https://api.fetchlayer.dev/trustpilot/company-reviews \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"company":"hellofresh.com","stars":[1,2],"language":"en","limit":200,"pages":10}'200 reviews per filter combination
limit does not help. Run one request per star rating, per language, or per date window instead, and merge the results — a 1-star pull and a 2-star pull return 400 reviews where a combined one returns 200. The response reports the cap in notes. 5. Read one review in full
Every listed review carries a reviewId. /review fetches one by id or link — and it is the only route that reaches a review sitting past the listing's 200-review depth.
curl -X POST https://api.fetchlayer.dev/trustpilot/review \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"review":"https://www.trustpilot.com/reviews/6aacabb3d3f1adf0be67d112"}'Error responses
Every error, on every route, is JSON in one shape: error (what went wrong, in words), status, code, retryable and requestId, which also comes as the X-Request-Id header. Branch on code and retryable rather than on the text; on a 5xx the text is generic. Quote requestId when reporting a problem.
{
"error": "Missing required parameter: url",
"status": 400,
"missing": ["url"],
"code": "invalid_input",
"retryable": false,
"requestId": "922874e3-c0d0-40d8-8866-d198af132420"
}| code | Status | Retryable | Meaning |
|---|---|---|---|
| invalid_input | 400 | no | The request needs fixing; error names the field. A missing required parameter also lists it in missing. |
| unauthorized | 401 | no | The API key is missing or not valid. |
| insufficient_credits | 402 | no | Nothing left to spend: no credits, a used-up free trial, or a monthly allowance and credit balance both spent. error says which. Waiting does not help; topping up does. |
| forbidden | 403 | no | This key or account is not allowed this request. |
| not_found | 404 | no | What the request names does not exist or is not public. |
| expired | 410 | no | What the request refers to is no longer available; ask for it afresh. |
| quota_exceeded | 429 | no | A request-rate limit was reached; error says which. Slow down before sending more. |
| cancelled | 499 | no | The caller closed or cancelled the request before it finished. The work was stopped and nothing was charged. |
| time_limit | 503 | yes | Your timeoutMs ran out before there was anything to return; ask again, or allow more time. |
| temporarily_unavailable | 503 | yes | Not available right now; ask again shortly. |
| store_unreachable | 503 | yes | Store routes (Shopify, WooCommerce): the store itself can’t be reached right now — it may be offline. Ask again later. Where a store route doesn’t say so yet, an offline store is temporarily_unavailable. |
| upstream_error | 502 | yes | The source answered in a way that could not be used; ask again later. |
| internal_error | 500 | yes | Something failed on our side; ask again later, and quote requestId if it persists. |
| tool_error | — | no | MCP only: a tool call failed in a way no other code describes; error says what. |
More codes may be added; treat one you do not recognise by its retryable flag. Over MCP, a tool error carries the same fields in structuredContent, and as a JSON text block beside the message.