{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Scraper - Company Profiles, Reviews & Leads",
    "description": "Scrape Trustpilot company profiles (TrustScore, review counts, categories, website, email, phone, address), full reviews with company replies, and category/search discovery as B2B leads. Lead scoring, filters and monitor mode. No login or API key.",
    "version": "0.1",
    "x-build-id": "eq5fAi7CxLMZD50jC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~trustpilot-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~trustpilot-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~trustpilot-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "companyDomains": {
            "title": "Company domains or review URLs",
            "type": "array",
            "description": "Companies to scrape. Enter a domain (e.g. \"amazon.com\", \"www.nike.com\") or a full Trustpilot review URL (e.g. \"https://www.trustpilot.com/review/booking.com\"). Each yields one company profile plus its reviews (if enabled). One per row.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries (company names)",
            "type": "array",
            "description": "Company names to search on Trustpilot. Each query returns the matching companies (use \"Max companies per query\" to cap). One query per row — e.g. \"Tesla\", \"meal delivery\".",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (lead-list discovery)",
            "type": "array",
            "description": "Trustpilot category slugs or names to list businesses from — e.g. \"electronics_technology\", \"bank\", \"Travel Insurance Company\". Returns every company in the category (great for building lead lists). One per row.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (any Trustpilot URL)",
            "type": "array",
            "description": "Paste any Trustpilot URLs — a company page (/review/<domain>), a category page (/categories/<slug>) or a search page (/search?query=...). Each URL is auto-detected and routed. One per row.",
            "items": {
              "type": "string"
            }
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "For every company scraped, also output its reviews (type `review`). Turn off to get only the company profile records (fastest, cheapest — perfect for lead lists).",
            "default": true
          },
          "maxReviewsPerCompany": {
            "title": "Max reviews per company",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many reviews to output per company (most recent / most relevant first, depending on Sort). Trustpilot serves 20 reviews per page. Keep modest for fast runs.",
            "default": 50
          },
          "reviewsSort": {
            "title": "Reviews sort",
            "enum": [
              "recency",
              "relevance"
            ],
            "type": "string",
            "description": "Order reviews are collected in. \"Most recent\" is best for monitoring new reviews; \"Most relevant\" is Trustpilot's default ranking.",
            "default": "recency"
          },
          "starRatings": {
            "title": "Filter by star rating",
            "type": "array",
            "description": "Only keep reviews with these star ratings (1–5). Leave empty to keep all ratings.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            },
            "default": []
          },
          "reviewsNewerThan": {
            "title": "Only reviews newer than",
            "type": "string",
            "description": "Keep only reviews published after this. Accepts an ISO date (2026-01-01) or a relative window like \"7 days\", \"24 hours\", \"3 months\". Great with monitoring mode for fresh-only pulls."
          },
          "verifiedReviewsOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Keep only reviews Trustpilot marks as verified (invitation/verified purchase). Off = include organic reviews too.",
            "default": false
          },
          "includeCompanyRecord": {
            "title": "Include company profile record",
            "type": "boolean",
            "description": "Output a `company` record (TrustScore, review counts, categories, website, email, phone, address, claimed status, lead score) for each company. Turn off if you only want reviews.",
            "default": true
          },
          "maxCompaniesPerQuery": {
            "title": "Max companies per search / category",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on companies returned per search query or per category (for discovery / lead lists). 0 = no per-source limit (only the global Max items applies).",
            "default": 100
          },
          "enrichCompanyDetails": {
            "title": "Enrich discovered companies",
            "type": "boolean",
            "description": "For companies found via search/category, open each company's page for the full profile (website, email, phone, full category list, star distribution) and reviews. Off = use the lighter listing-level fields only (faster, cheaper, no extra page per company).",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "Cap on total records (companies + reviews) across the whole run. Listings and review pages paginate automatically until this cap is reached.",
            "default": 200
          },
          "deduplicate": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Skip a record already emitted in this run (by id) — useful when sources overlap.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember ids already returned and emit ONLY records not seen in previous runs. Pairs with Apify Schedules to track new reviews (and newly listed companies) over time without re-paying for old data. Independent of — and complementary to — the platform Scheduler.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked job to keep their histories separate. Lowercase letters, digits and hyphens only.",
            "default": "trustpilot-scraper-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel browser pages. Lower it if you see transient blocks; raise it for speed (uses more memory — allow ~1GB per 2 pages).",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Trustpilot is protected by AWS WAF, so this actor defaults to Apify Residential proxy (blocked requests retry automatically on a fresh IP). Residential is strongly recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}