{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Reviews",
    "description": "Hosted trustpilot scraper that returns structured review data from any Trustpilot business page as JSON, title, body, rating, reviewer, date, language, plus the aggregate business rating. Run it from the Apify Store with one click, or call it from your own service via the Apify API.",
    "version": "0.1",
    "x-build-id": "HgR6piboa3HX8eAfl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~trustpilot-reviews/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-trustpilot-reviews",
        "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/s-r~trustpilot-reviews/runs": {
      "post": {
        "operationId": "runs-sync-s-r-trustpilot-reviews",
        "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/s-r~trustpilot-reviews/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-trustpilot-reviews",
        "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": {
          "companyUrls": {
            "title": "Companies",
            "type": "array",
            "description": "The companies to read, one per line. A full Trustpilot address such as https://www.trustpilot.com/review/booking.com works, and so does the bare domain, booking.com. Every company is scraped with the same filters.",
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerCompany": {
            "title": "Maximum reviews per company",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many reviews per company. Leave it at 0 to take everything reachable. Trustpilot shows 20 reviews per page and asks anonymous readers to log in from page 11 onwards, so one set of filters reaches 200 reviews. Splitting the run by star rating or by language raises that ceiling, because each combination gets its own 200.",
            "default": 20
          },
          "stars": {
            "title": "Star ratings",
            "type": "array",
            "description": "Keep only reviews with these star ratings. Leave empty for every rating. Picking more than one rating runs each as its own series, which multiplies how many reviews the run can reach.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Two-letter language codes such as en, nl or de, one per line. Use the single entry all to take every language mixed together. Leave empty and Trustpilot picks its own default, which is English on most companies. Each language is fetched as its own series.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "recency",
              "relevance"
            ],
            "type": "string",
            "description": "Newest reviews first, or the order Trustpilot considers most relevant.",
            "default": "recency"
          },
          "date": {
            "title": "Published within",
            "enum": [
              "",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Keep only reviews published inside one of Trustpilot's own windows. Leave empty for reviews of any age.",
            "default": ""
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only reviews published after this exact date, written as 2026-09-01 or as a full timestamp. Trustpilot has no exact-date filter of its own, so this is applied to the rows as they arrive and the run stops early once it reaches older reviews."
          },
          "verified": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Keep only reviews Trustpilot marks as verified. Most companies have far fewer of these than unverified ones, so expect a much smaller result.",
            "default": false
          },
          "withReplies": {
            "title": "Reviews with a company reply only",
            "type": "boolean",
            "description": "Keep only reviews the company has publicly answered. Companies that never reply return nothing under this filter.",
            "default": false
          },
          "search": {
            "title": "Search within reviews",
            "type": "string",
            "description": "Keep only reviews whose text matches this phrase, for example refund or delivery. Leave empty to skip the search."
          },
          "includeCompanyInfo": {
            "title": "Include company profile",
            "type": "boolean",
            "description": "Attach the company's own record to every row: trust score, total reviews, categories, website and contact details. It is read from the same page as the reviews, so it costs nothing extra.",
            "default": true
          },
          "proxy_country": {
            "title": "Fetch from country",
            "type": "string",
            "description": "Two-letter country code to read the pages from, for example us or nl. Leave empty to let the run choose. Trustpilot serves the same reviews everywhere, so this only matters if you need a specific origin."
          },
          "business_domain": {
            "title": "Business domain (old input, still accepted)",
            "type": "string",
            "description": "The single-company input this Actor started with. It still works, so saved runs and existing API calls keep running unchanged. New runs should use Companies above, which takes a list."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}