{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Reviews Scraper",
    "description": "Public Trustpilot reviews of any company by domain: rating, title, text, language, date, useful votes and the company reply. Reviewer data hashed, emails and phones redacted.",
    "version": "0.1",
    "x-build-id": "OcRrK82nKZtKSPDAp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~trustpilot-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-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/rastriq~trustpilot-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-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/rastriq~trustpilot-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-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",
        "required": [
          "companies"
        ],
        "properties": {
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Company domains (<code>booking.com</code>, <code>www.booking.com</code>) or Trustpilot profile URLs (<code>https://www.trustpilot.com/review/booking.com</code>). One per line. Companies are scraped one after another.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "fast",
              "deep"
            ],
            "type": "string",
            "description": "<b>Auto</b>: Trustpilot's public widget data first (fast, cheap, newest ~100 reviews per star rating and language), full profile pages only when more reviews or other fields are needed. <b>Fast</b>: widget only (a browser page is loaded once for a company never seen before, to learn its Trustpilot id, which is then cached); no company replies, useful votes or reviewer country; fails with an error if <b>Only reviews with a company reply</b> or <b>Reviewer countries</b> is set. <b>Deep</b>: full profile pages in a real browser with a residential proxy; every field, any depth, slower. If empty, Auto. The widget data is only available for companies on a paid Trustpilot plan; other companies always use the full profile pages (Auto switches by itself; Fast returns nothing for them)."
          },
          "maxReviews": {
            "title": "Max reviews",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Max reviews delivered per company and per language, newest first. If empty, 100. Hard cap 2000. With several languages, each company-language pair gets its own quota."
          },
          "languages": {
            "title": "Review languages",
            "type": "array",
            "description": "Languages to collect, one Trustpilot localized site per language (e.g. German reviews come from de.trustpilot.com). Pick <b>All languages</b> for every supported language, English first. If empty, English. Each language is a separate group with its own <b>Max reviews</b> quota; a language with no reviews for a company is skipped without loading a page. Unsupported codes are skipped and reported in the run summary.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "en",
                "de",
                "fr",
                "es",
                "it",
                "nl",
                "da",
                "sv",
                "nb",
                "fi",
                "pl",
                "pt",
                "ja"
              ],
              "enumTitles": [
                "All languages (English first)",
                "English",
                "German",
                "French",
                "Spanish",
                "Italian",
                "Dutch",
                "Danish",
                "Swedish",
                "Norwegian",
                "Finnish",
                "Polish",
                "Portuguese",
                "Japanese"
              ]
            }
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Only reviews from the last 30 days, 3 months (90 days), 6 months (180 days) or 12 months (365 days), counted from today (UTC). If <b>Reviews since</b> is also set, the later of the two dates is used."
          },
          "dateFrom": {
            "title": "Reviews since",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only reviews published on or after this date (UTC), YYYY-MM-DD. The run stops as soon as a whole page is older."
          },
          "stars": {
            "title": "Star ratings",
            "type": "array",
            "description": "Only reviews with these star ratings. If empty, all ratings.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            }
          },
          "verifiedOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Only reviews that Trustpilot labels as verified (<code>ext_review_verified</code> is true)."
          },
          "withRepliesOnly": {
            "title": "Only reviews with a company reply",
            "type": "boolean",
            "description": "Only reviews the company has answered (<code>developer_reply</code> is not null). Needs the deep route: Auto switches to it, Fast refuses."
          },
          "keyword": {
            "title": "Keyword",
            "maxLength": 100,
            "type": "string",
            "description": "Only reviews whose title or text contains this text, case-insensitive. Up to 100 characters."
          },
          "reviewerCountries": {
            "title": "Reviewer countries",
            "type": "array",
            "description": "Only reviews from reviewers in these countries, as ISO 3166 alpha-2 codes (<code>GB</code>, <code>DE</code>), case-insensitive. Reviews without a country never match. Needs the deep route: Auto switches to it, Fast refuses. If empty, all countries.",
            "items": {
              "type": "string"
            }
          },
          "incrementalKey": {
            "title": "Incremental key",
            "pattern": "^[A-Za-z0-9-]{1,40}$",
            "type": "string",
            "description": "Collect only reviews newer than the previous run that used the same key. The newest delivered review per company and language is remembered in the named key-value store <code>rastriq-trustpilot-incremental</code>. Letters, digits and hyphens, up to 40 characters. Leave empty for a normal run."
          },
          "hideAuthorNames": {
            "title": "Hide author names",
            "type": "boolean",
            "description": "Replace reviewer names with null (author_hash is kept) to minimise personal data under GDPR."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}