{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Reviews Scraper",
    "description": "Scrape Trustpilot reviews from any company by domain or URL, even beyond the 100-page limit. Get star ratings, review text, reviewer name & country, dates, verified status and company replies. Filter by rating, language, country or date, scrape multiple companies, and export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "DZdhHezI6enMgXGiK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacach~trustpilot-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacach-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/datacach~trustpilot-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datacach-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/datacach~trustpilot-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datacach-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": [
          "companyWebsite"
        ],
        "properties": {
          "companyWebsite": {
            "title": "Company website or URL",
            "type": "string",
            "description": "The company to scrape, as a website domain (e.g. <code>ubereats.com</code>), a Trustpilot review URL (e.g. <code>https://www.trustpilot.com/review/ubereats.com</code>), or several of either separated by commas to scrape multiple companies in one run."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "recency",
              "relevancy"
            ],
            "type": "string",
            "description": "Order in which reviews are fetched. 'Recency' returns newest reviews first and produces an exact 'isLatestByConsumerOnBusinessUnit' flag. 'Relevancy' uses Trustpilot's relevance ranking (the latest-review flag is left at its source default).",
            "default": "recency"
          },
          "filterByStarRating": {
            "title": "Star rating",
            "enum": [
              "all",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Keep only reviews with this star rating. 'All ratings' applies no rating filter.",
            "default": "all"
          },
          "filterByLanguage": {
            "title": "Language",
            "type": "string",
            "description": "Keep only reviews written in this language, as an ISO language code (e.g. <code>en</code>, <code>de</code>, <code>es</code>). Use <code>all</code> for no language filter.",
            "default": "all"
          },
          "filterByVerifiedReviews": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "When enabled, only verified reviews are returned. When disabled (default), both verified and unverified reviews are included.",
            "default": false
          },
          "filterByCountryOfReviewers": {
            "title": "Reviewer country",
            "type": "string",
            "description": "Keep only reviews from reviewers in this country, as an ISO 3166-1 alpha-2 country code (e.g. <code>US</code>, <code>GB</code>, <code>DE</code>). Leave empty for no country filter.",
            "default": ""
          },
          "filterByDatePeriod": {
            "title": "Date period",
            "enum": [
              "any date",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Keep only reviews published within this period, counting back from now. 'Any date' applies no date filter.",
            "default": "any date"
          },
          "maxReviews": {
            "title": "Max reviews per company",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of reviews to return per company. Use 0 for no limit (all reviews). Lower values finish faster and cost less — keep this small for a quick test run.",
            "default": 0
          },
          "startFromPageNumber": {
            "title": "Start page",
            "minimum": 1,
            "type": "integer",
            "description": "First review page to scrape (1-based). Each page holds about 20 reviews. Default 1.",
            "default": 1
          },
          "endAtPageNumber": {
            "title": "End page",
            "minimum": 0,
            "type": "integer",
            "description": "Last review page to scrape. Use 0 to scrape through to the final page. Each page holds about 20 reviews.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}