{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Reviews Scraper",
    "description": "Scrape Trustpilot company profiles, customer reviews, keyword search results, and category listings. Filter by stars, date, language, topics, verified reviews, and replies. Bulk domains and queries. Structured JSON for reputation monitoring, VoC, lead generation, and AI agents.",
    "version": "1.0",
    "x-build-id": "pKc9jbQ79VEfl9nxD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devil_port369-owner~trustpilot-reviews/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devil_port369-owner-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/devil_port369-owner~trustpilot-reviews/runs": {
      "post": {
        "operationId": "runs-sync-devil_port369-owner-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/devil_port369-owner~trustpilot-reviews/run-sync": {
      "post": {
        "operationId": "run-sync-devil_port369-owner-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "companyReviews",
              "search",
              "category"
            ],
            "type": "string",
            "description": "companyReviews = reviews for company domains/URLs. search = find businesses by keyword. category = list businesses in a Trustpilot category.",
            "default": "companyReviews"
          },
          "companyUrls": {
            "title": "Companies (domains or Trustpilot URLs)",
            "type": "array",
            "description": "Company domains or profile URLs, e.g. www.adorama.com or https://www.trustpilot.com/review/www.adorama.com",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Semantic/business search queries (e.g. Insurance agency in United States).",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Category slugs or URLs, e.g. car_dealer or https://www.trustpilot.com/categories/car_dealer",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "Max reviews per company",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "0 = all reviews available on public pages (Trustpilot limits how deep pagination goes, so very large review sets may be only partly available). For analyzeReviews use 0 or at least 500 so 90-day trends can be computed.",
            "default": 100
          },
          "maxResults": {
            "title": "Max search/category results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Max business rows for search or category mode. 0 = unlimited within maxPages.",
            "default": 50
          },
          "maxPages": {
            "title": "Max search/category pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Pagination depth for search and category modes.",
            "default": 5
          },
          "stars": {
            "title": "Star filter",
            "uniqueItems": true,
            "type": "array",
            "description": "Only reviews with these star ratings (1-5). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            }
          },
          "date": {
            "title": "Date range",
            "enum": [
              "all",
              "last30days",
              "last3months",
              "last6months",
              "last12months"
            ],
            "type": "string",
            "description": "Review recency filter.",
            "default": "all"
          },
          "languages": {
            "title": "Language",
            "type": "string",
            "description": "ISO language code for reviews (e.g. en, es, de). Use all for every language when supported.",
            "default": "en"
          },
          "topics": {
            "title": "Topics",
            "type": "array",
            "description": "Topic ids from Trustpilot (e.g. delivery_service, value_for_money, customer_service, price, staff).",
            "items": {
              "type": "string"
            }
          },
          "verifiedOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Only include verified reviews.",
            "default": false
          },
          "withReplies": {
            "title": "Only reviews with company reply",
            "type": "boolean",
            "description": "Filter to reviews that have a business reply.",
            "default": false
          },
          "reviewSearch": {
            "title": "Search text inside reviews",
            "type": "string",
            "description": "Keyword filter applied inside review text on the company profile.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "recency",
              "relevance",
              "rating"
            ],
            "type": "string",
            "description": "Review sort order.",
            "default": "recency"
          },
          "includeBusinessProfile": {
            "title": "Include business profile row",
            "type": "boolean",
            "description": "Push one business summary row before that company's reviews.",
            "default": true
          },
          "country": {
            "title": "Country code",
            "type": "string",
            "description": "2-letter country for search ranking (US, GB, DE…). Used by search mode.",
            "default": "US"
          },
          "scrapeReviews": {
            "title": "Scrape reviews for found companies",
            "type": "boolean",
            "description": "When mode is search or category, also scrape reviews for each company found in the listings. Uses maxReviews and the review filters below.",
            "default": false
          },
          "analyzeReviews": {
            "title": "Analyze reviews (investor-grade insights)",
            "type": "boolean",
            "description": "When true, every review gets sentiment fields and one type=insight row is pushed per company (rating confidence interval, 90-day trend, complaint/praise themes with evidence quotes, reply behaviour, review-integrity flags). With 2+ companies a type=benchmark row ranks them. No LLM. Best results: sort by recency, no star/verified/reply/keyword filters, and Max reviews = 0 or at least 500; filtered or short samples automatically disable trend statistics. Text sentiment is English-only.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}