Trustpilot Reviews API — Getting Started — FetchLayer Docs
Documentation menu
FetchLayer FetchLayer API

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.

bash
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

Already have a Trustpilot URL? Send it to /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.

bash
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

bash
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

Trustpilot caps an anonymous reader at 200 reviews for any one set of filters, whatever the company's total. Raising 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.

bash
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.

json
{
  "error": "Missing required parameter: url",
  "status": 400,
  "missing": ["url"],
  "code": "invalid_input",
  "retryable": false,
  "requestId": "922874e3-c0d0-40d8-8866-d198af132420"
}
codeStatusRetryableMeaning
invalid_input400noThe request needs fixing; error names the field. A missing required parameter also lists it in missing.
unauthorized401noThe API key is missing or not valid.
insufficient_credits402noNothing 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.
forbidden403noThis key or account is not allowed this request.
not_found404noWhat the request names does not exist or is not public.
expired410noWhat the request refers to is no longer available; ask for it afresh.
quota_exceeded429noA request-rate limit was reached; error says which. Slow down before sending more.
cancelled499noThe caller closed or cancelled the request before it finished. The work was stopped and nothing was charged.
time_limit503yesYour timeoutMs ran out before there was anything to return; ask again, or allow more time.
temporarily_unavailable503yesNot available right now; ask again shortly.
store_unreachable503yesStore 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_error502yesThe source answered in a way that could not be used; ask again later.
internal_error500yesSomething failed on our side; ask again later, and quote requestId if it persists.
tool_error—noMCP 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.

Next steps