{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Scraper: Reviews, Ratings & Replies | Fast API",
    "description": "Fast Trustpilot scraper for all reviews, ratings, replies, TrustScore, and company profiles. Bypass the 200-review limit with API pagination, bulk runs, and CSV/JSON/Excel-ready output.",
    "version": "1.4",
    "x-build-id": "DXnhhpN6EanSdA8ln"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apivault_labs~trustpilot-scraper-reviews-ratings-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apivault_labs-trustpilot-scraper-reviews-ratings-api",
        "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/apivault_labs~trustpilot-scraper-reviews-ratings-api/runs": {
      "post": {
        "operationId": "runs-sync-apivault_labs-trustpilot-scraper-reviews-ratings-api",
        "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/apivault_labs~trustpilot-scraper-reviews-ratings-api/run-sync": {
      "post": {
        "operationId": "run-sync-apivault_labs-trustpilot-scraper-reviews-ratings-api",
        "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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One item per row: brand/domain, normal website, Trustpilot /review/, /reviews/, /users/, or /search?query= URL.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Brand or company names",
            "type": "array",
            "description": "Examples: bankfive, Apple, Vans. May be combined with Start URLs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeReviewInsights": {
            "title": "Add Review insights per company",
            "type": "boolean",
            "description": "Adds rating/sentiment statistics, complaint themes, top negative terms, and feature-request snippets without AI.",
            "default": true
          },
          "contentMode": {
            "title": "Content mode",
            "enum": [
              "companyInformationAndReviews",
              "reviews",
              "companyInformation",
              "bulkCompanyInformation"
            ],
            "type": "string",
            "description": "Choose reviews, company information, or both.",
            "default": "companyInformationAndReviews"
          },
          "maxReviews": {
            "title": "Maximum reviews per company",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Use 0 to fetch every available review. Each review becomes a separate dataset row.",
            "default": 0
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "all",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Convenient relative published-date filter; startDate takes precedence.",
            "default": "all"
          },
          "lastDays": {
            "title": "Only the last N days",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Rolling cutoff recalculated on every run. Leave empty or 0 to disable.",
            "default": 0
          },
          "startDate": {
            "title": "Published on or after",
            "type": "string",
            "description": "Optional YYYY-MM-DD cutoff.",
            "default": ""
          },
          "filterStars": {
            "title": "Star ratings",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty to include every rating.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ]
            },
            "default": []
          },
          "sampling": {
            "title": "Sampling when a limit is set",
            "enum": [
              "balanced",
              "proportional"
            ],
            "type": "string",
            "description": "Balanced covers every rating; proportional keeps the returned rating mix/order.",
            "default": "balanced"
          },
          "filterLanguages": {
            "title": "Languages",
            "type": "array",
            "description": "ISO language codes such as en, de, or fr. Leave empty for all.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "filterCountries": {
            "title": "Reviewer countries",
            "type": "array",
            "description": "Country codes such as US or DE. Leave empty for all.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "verifiedOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Keep only reviews marked as verified by Trustpilot.",
            "default": false
          },
          "repliesOnly": {
            "title": "Reviews with company replies only",
            "type": "boolean",
            "description": "Keep only reviews that contain a company reply.",
            "default": false
          },
          "strictNameMatch": {
            "title": "Strict brand-name matching",
            "type": "boolean",
            "description": "Reject autosuggest results that do not closely match the requested brand.",
            "default": false
          },
          "includeCompanyDetails": {
            "title": "Include company row",
            "type": "boolean",
            "description": "Writes one company-information item to the separate Companies dataset.",
            "default": true
          },
          "includeCompanyResponseMetrics": {
            "title": "Company response metrics",
            "type": "boolean",
            "description": "Calculate sampled reply count, reply rate, and average response time.",
            "default": true
          },
          "emitInputStatus": {
            "title": "Report inputs with no results",
            "type": "boolean",
            "description": "Writes invalid, failed, and empty inputs to the separate Input errors dataset and INPUT_STATUS record.",
            "default": true
          },
          "compact": {
            "title": "Compact review rows",
            "type": "boolean",
            "description": "Return essential review fields only.",
            "default": false
          },
          "includeRaw": {
            "title": "Include complete raw review",
            "type": "boolean",
            "description": "Preserve the complete mobile API review object under raw.",
            "default": false
          },
          "startPage": {
            "title": "Start page",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Start review pagination from this API page.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum API pages",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Each page contains up to 100 reviews.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "auto",
              "recency",
              "relevance"
            ],
            "type": "string",
            "description": "Auto and recency return newest reviews first. Relevance is attempted and safely falls back to newest if the API rejects it.",
            "default": "auto"
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for temporary API or network failures.",
            "default": 3
          },
          "timeout": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout in seconds.",
            "default": 45
          },
          "trustpilotAccessToken": {
            "title": "Trustpilot accessToken",
            "type": "string",
            "description": "Sent as Authorization: Bearer. Prefer the TRUSTPILOT_ACCESS_TOKEN Actor secret."
          },
          "trustpilotJwt": {
            "title": "Trustpilot jwt cookie",
            "type": "string",
            "description": "Alternative jwt cookie; accessToken is extracted in memory."
          },
          "incremental": {
            "title": "Only reviews newer than saved state",
            "type": "boolean",
            "description": "First run builds state. Later runs skip reviews already seen. For automatic persistence, provide a state store ID below.",
            "default": false
          },
          "incrementalStateStoreId": {
            "title": "Persistent state store ID",
            "type": "string",
            "description": "Optional Apify key-value store ID used to read and update INCREMENTAL_STATE across runs.",
            "default": ""
          },
          "incrementalState": {
            "title": "Incremental state (advanced)",
            "type": "object",
            "description": "Optional domain-to-latest-publishedAt map. Useful when state is supplied directly by API.",
            "default": {}
          },
          "expandRegionalDomains": {
            "title": "Include regional profiles with the same brand name",
            "type": "boolean",
            "description": "Find additional country or regional Trustpilot profiles whose display name exactly matches the resolved company.",
            "default": false
          },
          "maxRegionalDomains": {
            "title": "Maximum regional profiles per brand",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Safety cap when regional profile discovery is enabled.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Companies processed at once",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel company requests. Three is a safe default for speed and rate limits.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}