Trustpilot Reviews API

Pull Trustpilot reviews for any company by brand name: star ratings, review text, dates, and reviewer details as clean JSON.

USD 0.000800 / chiamata riuscita

ID pubblico: data.trustpilot.reviews · Versione 1

Prezzi

USD 0.000800 / chiamata riuscita

Avvio rapido

Cerca questo strumento con la tua chiave API, poi esamina provider ed endpoint restituiti prima di eseguirlo.

Imposta GLOOP_API_BASE con il tuo indirizzo API e GLOOP_API_KEY con la chiave lato server.

curl

curl --fail-with-body "${GLOOP_API_BASE%/}/v1/discover" \
  -H "Authorization: Bearer $GLOOP_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "limit": 5,
  "query": "Trustpilot Reviews"
}'

Python

import os, json, urllib.request

url = os.environ['GLOOP_API_BASE'].rstrip('/') + "/v1/discover"
headers = {'Authorization': 'Bearer ' + os.environ['GLOOP_API_KEY']}
headers['Content-Type'] = 'application/json'
data = "{\n  \"limit\": 5,\n  \"query\": \"Trustpilot Reviews\"\n}".encode('utf-8')
request = urllib.request.Request(url, data=data, headers=headers)
with urllib.request.urlopen(request) as response:
    print(json.load(response))

Node.js

const url = process.env.GLOOP_API_BASE.replace(/\/$/, '') + "/v1/discover";
const headers = { Authorization: `Bearer ${process.env.GLOOP_API_KEY}` };
headers['Content-Type'] = 'application/json';
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify({
  "limit": 5,
  "query": "Trustpilot Reviews"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
Documentazione API degli strumenti · POST /v1/inspect

Schema di input

{
  "additionalProperties": false,
  "properties": {
    "company": {
      "description": "Brand name or Trustpilot review-page URL to fetch reviews for (e.g. nike or https://www.trustpilot.com/review/nike.com).",
      "type": "string"
    },
    "countries": {
      "description": "Only return reviews from reviewers in these ISO 3166-1 alpha-2 countries (e.g. [\"US\", \"GB\"]). Omit this field for all countries and to stay on the cheapest price; a country filter routes to the dearest source.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "languages": {
      "description": "Only return reviews in these ISO 639-1 languages (e.g. [\"en\", \"de\"]). Omit this field for all languages and to stay on the cheapest price; a language filter routes to the dearest source.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "limit": {
      "description": "Maximum number of results to return (1-200, default 200). Trustpilot serves at most 200 reviews per company.",
      "maximum": 200,
      "minimum": 1,
      "type": "integer"
    },
    "sortBy": {
      "description": "Review ordering: auto, relevancy, or recent (e.g. recent).",
      "enum": [
        "auto",
        "relevancy",
        "recent"
      ],
      "type": "string"
    },
    "stars": {
      "description": "Limit reviews to a single star rating from 1 to 5 (e.g. 5).",
      "type": "string"
    },
    "verifiedOnly": {
      "description": "Set true to return only verified reviews (e.g. true). Omit this field, or send false, to stay on the cheapest price; true routes to a dearer source.",
      "type": "boolean"
    }
  },
  "required": [
    "company"
  ],
  "title": "Trustpilot reviews input",
  "type": "object"
}

Schema di output

{
  "type": "object"
}

Strumenti della stessa categoria