{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Scraper",
    "description": "Scrape Trustpilot reviews with the field that decides whether a rating is earned: whether each review came in on its own or was solicited by the company.",
    "version": "0.1",
    "x-build-id": "Q60dIZ6qZBccodAi0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/juanoox~trustpilot-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-juanoox-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/juanoox~trustpilot-scraper/runs": {
      "post": {
        "operationId": "runs-sync-juanoox-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/juanoox~trustpilot-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-juanoox-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Companies",
            "type": "array",
            "description": "One entry per company. A bare domain works — 'amazon.com' — and so does a full Trustpilot URL or the company's own website. Trustpilot identifies companies by domain, so you rarely need to open the site to find the right link.",
            "default": [
              "https://www.trustpilot.com/review/www.amazon.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerBusiness": {
            "title": "Max pages per company",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Each page holds 20 reviews, newest first. 5 pages is the last 100 reviews. Big companies run past 4,000 pages.",
            "default": 5
          },
          "onlyOrganic": {
            "title": "Only reviews the company did not ask for",
            "type": "boolean",
            "description": "Trustpilot records whether each review arrived on its own or came from an invitation the company sent. Turning this on leaves only the unprompted ones — the rating a company earned rather than the one it collected. Reviews whose origin Trustpilot does not state are excluded too, since assuming they were spontaneous is exactly the mistake this filter exists to prevent.",
            "default": false
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep reviews at or above this, 1 to 5. Leave empty for no filter."
          },
          "maxRating": {
            "title": "Maximum star rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep reviews at or below this. Set it to 2 to read only the complaints."
          },
          "onlyVerified": {
            "title": "Only verified reviews",
            "type": "boolean",
            "description": "Keep only reviews where Trustpilot confirmed the reviewer had a real experience with the company.",
            "default": false
          },
          "onlyWithReply": {
            "title": "Only reviews the company replied to",
            "type": "boolean",
            "description": "Useful for measuring how a company handles complaints in public.",
            "default": false
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Ignore anything published before this date, as YYYY-MM-DD. Reviews come newest first, so this is the cheap way to fetch only what is new since your last run.",
            "default": ""
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Two-letter codes such as en or es. Empty keeps every language.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only reviews whose title or text contains one of these, e.g. 'refund', 'delivery'.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 500000,
            "type": "integer",
            "description": "Hard cap on how many reviews are saved and charged. 0 means no cap.",
            "default": 200
          },
          "includeSeen": {
            "title": "Include reviews already seen in previous runs",
            "type": "boolean",
            "description": "Off means the run only saves reviews it has never returned before, which is what you want when monitoring a company over time.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests. Trustpilot filters aggressive clients, so higher is not faster.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a blocked or failed request is retried before the company is given up on.",
            "default": 3
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Rate limit for the whole run.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}