Trustpilot API — Parse a Trustpilot URL
Documentation menu
FetchLayer FetchLayer API

Parse a Trustpilot URL

Turn any Trustpilot URL into the structured input it encodes — whether it points at a company, a single review or a search, plus the company domain, review id, or the star, language, date window, sort, verified, replied and keyword filters carried in its query string. Hand it a URL a colleague pasted and it comes back as the exact request body company-reviews takes. Parsing a URL does not consume a credit.

POST /resolve-url Utility
https://api.fetchlayer.dev/trustpilot/resolve-url
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

url string required

Any Trustpilot URL, to be parsed into structured input.

format string optional

json or markdown. (default: json)

timeoutMs number optional

Per-request time limit in milliseconds (max 600000).

Response Fields

resolve-url

Parse a Trustpilot URL

kind string

What the URL points at: company, review, or search.

url string

The URL that was parsed.

domain string

Present when kind is company — pass it to company-profile or company-reviews.

reviewId string

Present when kind is review — pass it to the review endpoint.

query string

Present when kind is search — pass it to search-companies.

stars number[]

Star filter carried in the URL.

language string

Language filter carried in the URL.

dateWindow string

Date window carried in the URL.

sort string

Sort order carried in the URL.

verifiedOnly boolean

Verified-reviewer filter carried in the URL.

repliedOnly boolean

Replied-to filter carried in the URL.

search string

Keyword filter carried in the URL.

page number

Page number carried in the URL.

Request

curl -X POST "https://api.fetchlayer.dev/trustpilot/resolve-url" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.trustpilot.com/review/hellofresh.com?stars=1&stars=2&languages=en&date=last3months"}'

Response

{
  "kind": "company",
  "domain": "hellofresh.com",
  "reviewId": null,
  "query": null,
  "stars": [
    1,
    2
  ],
  "language": "en",
  "dateWindow": "last3months",
  "sort": null,
  "verifiedOnly": null,
  "repliedOnly": null,
  "search": null,
  "page": null
}