{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Reviews Scraper — Company Reviews & TrustScore",
    "description": "Every Trustpilot review of any company: 1-5 rating, title, text, language, review and experience dates, reviewer name and country, verification, likes and the company's reply, plus TrustScore, the star histogram and contact details. Filter by stars, date, language and keyword before billing.",
    "version": "1.0",
    "x-build-id": "Ajj261QCg1iTX3Y0W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestrel~trustpilot-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestrel-trustpilot-reviews-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/kestrel~trustpilot-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kestrel-trustpilot-reviews-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/kestrel~trustpilot-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kestrel-trustpilot-reviews-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "companyDomains": {
            "title": "Company domains",
            "uniqueItems": true,
            "type": "array",
            "description": "The domain a company is listed under on Trustpilot — the part after trustpilot.com/review/, e.g. www.booking.com, www.monzo.com, ryanair.com. A company's own website URL works too (the domain is taken from it), and Trustpilot's own canonical spelling is followed automatically, so monzo.com resolves to www.monzo.com.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Trustpilot review page URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Trustpilot company pages, e.g. https://www.trustpilot.com/review/www.booking.com — any query string is ignored (set the filters below instead), and a country subdomain such as uk.trustpilot.com is read as the same profile.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerCompany": {
            "title": "Max reviews per company",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 = as deep as Trustpilot lets an anonymous visitor go. Trustpilot stops paging after 200 reviews of any one filtered view, so this actor walks the five star bands separately and merges them: up to 1000 reviews per company per run, newest first. N = the first N in the order below. The main cost control.",
            "default": 100
          },
          "sort": {
            "title": "Order",
            "enum": [
              "most_recent",
              "most_relevant"
            ],
            "type": "string",
            "description": "most_recent = newest first (the order a monitoring schedule wants); most_relevant = Trustpilot's own relevance order.",
            "default": "most_recent"
          },
          "deepPaging": {
            "title": "Go past Trustpilot's 200-review wall",
            "type": "boolean",
            "description": "On (the default): when more than 200 reviews are asked for, each star rating is fetched as its own filtered view — 1, 2, 3, 4 and 5 stars each have their own 200-review allowance — and the results are merged and de-duplicated, so up to 1000 reviews come back per company. Off: one view only, so never more than 200 reviews and never more than 10 page requests per company.",
            "default": true
          },
          "languages": {
            "title": "Language",
            "type": "string",
            "description": "all = every language, and the default here (Trustpilot's own page shows English only, which hides most reviews of a global brand). Or one language code — en, de, fr, es, it, nl, da, sv … — applied by Trustpilot itself, so reviews in other languages are never fetched and never billed. The company row lists how many reviews each language holds.",
            "default": "all"
          },
          "minRating": {
            "title": "Min rating (stars)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "0 = any. 1-5 = keep only reviews rated at or above this. Combine with maxRating for a band, e.g. minRating 1 and maxRating 2 for a complaints feed.",
            "default": 0
          },
          "maxRating": {
            "title": "Max rating (stars)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "0 = any. 1-5 = keep only reviews rated at or below this. maxRating 2 on a 125,000-review brand fetches and bills only the 1- and 2-star rows, because the star filter is Trustpilot's own URL parameter and runs on their servers.",
            "default": 0
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "all",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Trustpilot's own date filter, applied server-side. all = no limit.",
            "default": "all"
          },
          "sinceDate": {
            "title": "Since date",
            "type": "string",
            "description": "Keep only reviews published on or after this date: YYYY-MM-DD, or relative so a schedule never goes stale — \"7 days\", \"2 weeks\", \"1 month\". With most_recent order the walk stops at the first page that is older than the cut, so a daily run reads one or two pages.",
            "default": ""
          },
          "verifiedOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Keep only reviews Trustpilot marks as verified (invited after a real transaction, or identity-checked). Applied by Trustpilot, so unverified reviews are never fetched or billed.",
            "default": false
          },
          "keyword": {
            "title": "Keyword",
            "maxLength": 100,
            "type": "string",
            "description": "Keep only reviews mentioning this word or phrase — refund, delivery, cancellation, chargeback. This is Trustpilot's own review search, so non-matching reviews are never fetched or billed.",
            "default": ""
          },
          "requireText": {
            "title": "Require review text",
            "type": "boolean",
            "description": "Drop reviews that carry only a star rating and a title, before billing.",
            "default": false
          },
          "includeCompanyRow": {
            "title": "Include company row",
            "type": "boolean",
            "description": "One free row per company: TrustScore, stars, total reviews, reviews in the last 12 months, the 1-5 star histogram, the per-language breakdown, categories, website, country, the public contact details Trustpilot shows, and the claimed/closed/verification flags.",
            "default": true
          },
          "sessions": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many proxy sessions (egress IPs) fetch pages in parallel. Each is paced separately. 2 is plenty for a handful of companies; raise it for long lists.",
            "default": 2
          },
          "perIp": {
            "title": "Requests per second per session",
            "minimum": 0.2,
            "maximum": 2,
            "type": "number",
            "description": "Pace for each session. 1 request per second per IP is what Trustpilot tolerates comfortably; higher values earn retries, not speed.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy with the RESIDENTIAL group (the default, and required: the headless browser that solves the WAF challenge runs through it). Once the token exists it is honoured from any IP, so the page fetches themselves are not fussy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}