{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Scraper: Reviews, Companies, Categories, Contacts",
    "description": "Scrape Trustpilot reviews with ratings, replies and reviewer details, then go further: find companies by keyword, list a whole category, pull company metadata, or read a transparency report. 50+ fields per review including AI summaries and B2B contacts (email, phone, address).",
    "version": "0.1",
    "x-build-id": "5GFe1wjUYw3R31J6n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~trustpilot-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-trustpilot-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/sourabhbgp~trustpilot-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-trustpilot-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/sourabhbgp~trustpilot-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-trustpilot-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": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "reviews",
              "searchCompanies",
              "categoryBrowser",
              "companyInfo",
              "transparency"
            ],
            "type": "string",
            "description": "Choose what to scrape. Each mode is billed separately (review_result $0.0005, company_result $0.001, search_result $0.0002, transparency_report $0.005).",
            "default": "reviews"
          },
          "urls": {
            "title": "Company URLs or Domains",
            "type": "array",
            "description": "List of Trustpilot company URLs or domain names. Used by reviews, companyInfo, transparency modes. Examples: 'amazon.com', 'https://www.trustpilot.com/review/booking.com', 'www.netflix.com'.",
            "items": {
              "type": "string"
            }
          },
          "companyUrls": {
            "title": "Company URLs (alias)",
            "type": "array",
            "description": "Alias for `urls`, kept for backward compatibility with existing v1 saved configs.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Brand Names (auto-resolved)",
            "type": "array",
            "description": "Brand names to look up on Trustpilot. In reviews mode, each term is resolved to the best-matching company and its reviews are scraped: use this instead of `urls` when you only know the brand name. In searchCompanies mode, each term is also run as a search, after Search Query.",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "Max Reviews per Company",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum reviews per company. 0 = 1,000 (back-compat). Up to 200 uses a single request. Above 200 the scraper slices by star rating to get past Trustpilot's 200-per-filter cap, which reaches roughly 1,000 per company. To go beyond that, turn on Sweep all languages.",
            "default": 200
          },
          "stars": {
            "title": "Star Ratings",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter to specific star ratings (e.g. [1, 5] for one- and five-star reviews only). Empty = all ratings.",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "default": []
          },
          "starFilter": {
            "title": "Star Filter (single, alias)",
            "enum": [
              "all",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Backward-compat alias for `stars` accepting a single value: 'all' / '1' / '2' / '3' / '4' / '5'.",
            "default": "all"
          },
          "languages": {
            "title": "Review Languages",
            "type": "array",
            "description": "ISO codes (e.g. ['en', 'de', 'fr']). Empty = Trustpilot's default view, which is English (for a company with no English reviews, Trustpilot shows all of its reviews). To add other languages, leave this empty and turn on Sweep all languages (it is not applied when 2 or more star ratings are selected with maxReviews at 200 or below). Languages you list are fetched in order until maxReviews is reached, so set maxReviews high enough to cover them (e.g. 200 per language).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language (single, alias)",
            "type": "string",
            "description": "Backward-compat alias for `languages` accepting a single ISO code (or 'all').",
            "default": "all"
          },
          "dateRange": {
            "title": "Published Within",
            "enum": [
              "all",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Server-side date filter. Limited to Trustpilot's predefined buckets.",
            "default": "all"
          },
          "startDate": {
            "title": "Start Date Cutoff (YYYY-MM-DD)",
            "type": "string",
            "description": "Skip reviews published before this date. Use for chronological cutoff (e.g., '2025-01-01')."
          },
          "verifiedOnly": {
            "title": "Verified Only",
            "type": "boolean",
            "description": "Only return reviews marked as verified by Trustpilot.",
            "default": false
          },
          "repliesOnly": {
            "title": "Has Company Reply",
            "type": "boolean",
            "description": "Only return reviews that have a reply from the company.",
            "default": false
          },
          "topics": {
            "title": "Review Topics",
            "type": "array",
            "description": "Trustpilot topic filter (e.g. ['delivery_service', 'customer_service', 'refund', 'product']). Empty = all topics.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword in Review Body",
            "type": "string",
            "description": "Full-text search within review body. Server-side filter."
          },
          "sort": {
            "title": "Sort Order",
            "enum": [
              "recency",
              "relevance"
            ],
            "type": "string",
            "description": "Sort reviews by recency or relevance.",
            "default": "recency"
          },
          "sortBy": {
            "title": "Sort (deprecated alias)",
            "enum": [
              "recency",
              "relevance"
            ],
            "type": "string",
            "description": "Backward-compat alias for `sort`. New configs should use `sort` instead.",
            "default": "recency"
          },
          "aggressiveSlicing": {
            "title": "Aggressive Slicing (>200 reviews)",
            "type": "boolean",
            "description": "Slice by star rating to get past Trustpilot's 200-review per-filter cap. Auto-on when Max reviews is above 200, or when multiple star ratings are selected."
          },
          "includeCompanyInfo": {
            "title": "Include Company Info",
            "type": "boolean",
            "description": "Add company metadata (trust score, distribution, categories) to each review record.",
            "default": true
          },
          "includeContact": {
            "title": "Include Contact (email/phone/address)",
            "type": "boolean",
            "description": "Add company contact info (email, phone, address, city, country, zip). In reviews mode these ride along on each review record. In Company Info mode, turning this off omits the six contact keys entirely rather than returning them empty.",
            "default": true
          },
          "includeStats": {
            "title": "Include Per-Star Stats",
            "type": "boolean",
            "description": "Add full per-star count breakdown (one/two/three/four/five) to each review record.",
            "default": false
          },
          "includeSimilarCompetitors": {
            "title": "Include Similar Competitors",
            "type": "boolean",
            "description": "Add up to 8 similar businesses (with trustScore + review count). Trustpilot's own competitor map. Unique to this scraper.",
            "default": false
          },
          "includeAiSummary": {
            "title": "Include AI Summary",
            "type": "boolean",
            "description": "Add Trustpilot's AI-generated review summary + topic summaries (delivery, product, customer service, etc.) on the first review per company. Unique to this scraper.",
            "default": true
          },
          "compact": {
            "title": "Compact Output (for AI/MCP)",
            "type": "boolean",
            "description": "Return only core fields (id, text, rating, reviewer, company, AI summary). Smaller payloads for LLM contexts.",
            "default": false
          },
          "incremental": {
            "title": "Incremental Mode",
            "type": "boolean",
            "description": "Track which review IDs have been seen across runs. Each output record gets `changeType` (NEW / UPDATED / REAPPEARED) plus `firstSeenAt` / `lastSeenAt` timestamps. Requires `stateKey`. Unique to this scraper.",
            "default": false
          },
          "stateKey": {
            "title": "Incremental State Key",
            "type": "string",
            "description": "Identifier for the persistent state store (e.g. 'monitor-amazon-2026'). Reuse the same key across runs to detect changes."
          },
          "lookbackDays": {
            "title": "Lookback Window (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only emit reviews published within the last N days. Shortcut for setting startDate. Convenient for monitoring use cases."
          },
          "searchQuery": {
            "title": "Search Query (searchCompanies mode)",
            "type": "string",
            "description": "Keyword to search the Trustpilot company directory. E.g., 'car insurance', 'web hosting', 'crypto exchange'."
          },
          "searchCountry": {
            "title": "Country (categoryBrowser)",
            "type": "string",
            "description": "ISO Alpha-2 country code (e.g. 'US', 'GB', 'DE'). Default: US. Has no effect in searchCompanies mode: Trustpilot's company search has no country filter, so results come from every country.",
            "default": "US"
          },
          "categoryId": {
            "title": "Category ID (categoryBrowser mode)",
            "type": "string",
            "description": "Trustpilot category id, e.g. 'electronics_technology', 'insurance_agency', 'web_hosting'. See trustpilot.com/categories for the full list."
          },
          "minTrustScore": {
            "title": "Min Trust Score",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Minimum rating, for searchCompanies and categoryBrowser. Trustpilot filters on the star rating it shows (whole and half stars), not the exact TrustScore, and supports only three thresholds: 3 keeps 3 stars and up, 4 keeps 4 stars and up, 5 keeps 4.5 stars and up. Because stars are rounded, a company with a TrustScore just below the threshold (e.g. 3.8 with 4 stars) can appear. Values of 1 or 2 apply no filter."
          },
          "maxTrustScore": {
            "title": "Max Trust Score",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Not supported by Trustpilot: its category filter is a minimum only, so this value is ignored. Kept for backward compatibility. Use Min TrustScore instead."
          },
          "onlyClaimed": {
            "title": "Claimed Companies Only",
            "type": "boolean",
            "description": "Filter to companies that have claimed their Trustpilot profile.",
            "default": false
          },
          "maxBusinesses": {
            "title": "Max Businesses Returned",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum businesses to return in searchCompanies / categoryBrowser mode. This is one limit for the whole run, shared by all queries: once it is reached, later queries are not searched and the run status says which ones were skipped.",
            "default": 200
          },
          "requestDelayMs": {
            "title": "Delay Between Requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds between the start of one request and the next, in Company Info and Transparency modes. Default 150, which together with the concurrency below caps the scraper at about 7 requests per second. Raise it to 300 or 500 for a gentler run on very large lists; set it to 0 to let Max Concurrent Requests alone control the rate.",
            "default": 150
          },
          "maxConcurrency": {
            "title": "Max Concurrent Requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many requests may be in flight at once in Company Info and Transparency modes. Default 8. This is the setting that controls how long a run takes: 1,000 companies takes a few minutes at the default. Combined with the delay above it sets the real request rate. Lower it to 1 for the gentlest possible run, or raise it up to 16 if you want a large list finished faster.",
            "default": 8
          },
          "reportFailedInputs": {
            "title": "Add Failed Inputs To The Dataset",
            "type": "boolean",
            "description": "Off by default. In Company Info mode, also write one row for every input that did not return a company, each carrying the reason: not-found (Trustpilot has no profile for it), rate-limited, blocked, error or duplicate. These extra rows add columns to CSV and Excel exports, which is why it is opt-in. The same per-input breakdown is always written to the key-value store record COMPANY_INFO_REPORT, whether this is on or off.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy for all outbound requests. Leave Apify Proxy on: the scraper rotates the proxy session automatically, both every 150 requests and immediately after any 429, 403, 5xx or connection failure. Datacenter proxy is enough, residential is not needed.",
            "default": {
              "useApifyProxy": true
            }
          },
          "sweepAllLanguages": {
            "title": "Sweep all languages",
            "type": "boolean",
            "description": "Off by default. Trustpilot serves English only unless asked otherwise, so a normal run returns English reviews and tops out near 1,000 per company. Turn this on to also collect the other languages a company has. How much it adds depends entirely on the company: a global brand can go from 1,000 to several thousand, while a single-market company may add almost nothing. Results will then contain non-English reviews. Not applied with 2 or more star ratings at maxReviews 200 or below.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}