{
  "openapi": "3.0.1",
  "info": {
    "title": "Trustpilot Reviews Scraper & Monitor",
    "description": "Trustpilot reviews of any company: newest first, star, language, reviewer-country, verified and date filters, company TrustScore and profile, and a monitor mode that returns only reviews published since the last run. Built for daily schedules.",
    "version": "0.1",
    "x-build-id": "d0qPDT4RdYRbuDsFz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shelfdata~trustpilot-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shelfdata-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/shelfdata~trustpilot-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-shelfdata-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/shelfdata~trustpilot-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-shelfdata-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",
        "properties": {
          "startUrls": {
            "title": "Companies",
            "type": "array",
            "description": "One company per row: its domain as Trustpilot shows it (`www.amazon.com`, `bankfive.com`), its Trustpilot page (`https://www.trustpilot.com/review/www.amazon.com`, any language subdomain) or its own website URL. Each company is read on its own; regional sites (e.g. `amazon.co.uk`) are separate Trustpilot companies, list them too.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum reviews per company",
            "minimum": 1,
            "type": "integer",
            "description": "Reviews returned per company in one run. Also the size of the first (baseline) run of a monitor.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "auto",
              "recent",
              "relevancy"
            ],
            "type": "string",
            "description": "With **Only new reviews** on, reviews are always read newest first (`Most relevant` needs it off). `Auto` without a star filter or date splits the limit across star ratings.",
            "default": "auto"
          },
          "filterStars": {
            "title": "Star ratings",
            "uniqueItems": true,
            "type": "array",
            "description": "Only reviews with these star ratings, e.g. 1 and 2 to catch complaints. Empty returns all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            },
            "default": []
          },
          "filterLanguages": {
            "title": "Review languages",
            "type": "array",
            "description": "Language codes such as `en`, `de`, `fr` (`unknown` for reviews Trustpilot could not classify). Empty returns reviews in every language.",
            "items": {
              "type": "string"
            }
          },
          "filterCountries": {
            "title": "Reviewer countries",
            "type": "array",
            "description": "Two-letter countries of the reviewer's profile, e.g. `US`, `GB`. Empty keeps all. Trustpilot has no country filter of its own, so other reviews are still read and dropped.",
            "items": {
              "type": "string"
            }
          },
          "filterVerifiedOnly": {
            "title": "Verified reviews only",
            "type": "boolean",
            "description": "Trustpilot's own 'Verified' filter.",
            "default": false
          },
          "filterRepliesOnly": {
            "title": "Reviews with a company reply only",
            "type": "boolean",
            "description": "Trustpilot's own 'With replies' filter.",
            "default": false
          },
          "startDate": {
            "title": "Reviews since",
            "type": "string",
            "description": "Only reviews published on or after this date (YYYY-MM-DD, UTC)."
          },
          "lastDays": {
            "title": "Only the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only reviews published in the last N days, counted from the run's start. With **Reviews since** too, the later bound wins."
          },
          "flattenCompanyData": {
            "title": "Company columns",
            "type": "boolean",
            "description": "Adds `companyName`, `companyDomain`, `companyWebsite`, `companyTrustScore`, `companyStars`, `companyTotalReviews`, `companyCountryCode` and `companyUrl` to every review (no extra requests).",
            "default": false
          },
          "includeCompanyDetails": {
            "title": "Full company profile",
            "type": "boolean",
            "description": "Adds the company's Trustpilot profile as a nested `company` object: categories, contact details, TrustScore, review count, reply behaviour (no extra requests).",
            "default": false
          },
          "onlyNewReviews": {
            "title": "Only new reviews since the last run",
            "type": "boolean",
            "description": "Remembers per company and filter set the newest review already returned (in a key-value store named `trustpilot-reviews-state` in your account), so each scheduled run returns only reviews published since. The first run of a company returns its newest reviews up to the maximum (baseline). Turn off for one-off exports. The form starts with it off (a one-off run); tick it for scheduled monitoring. API calls and schedules that omit this field keep it on.",
            "default": true
          },
          "monitorName": {
            "title": "Monitor name",
            "maxLength": 60,
            "type": "string",
            "description": "Keeps separate memories for different monitors (e.g. one per client) that watch the same companies.",
            "default": "default"
          },
          "proxySource": {
            "title": "Proxy",
            "enum": [
              "direct",
              "owner",
              "apify_residential",
              "custom_pool"
            ],
            "type": "string",
            "description": "Automatic needs no setup and is the fastest: Trustpilot's bot check passes in seconds from Apify's own servers, while Apify's shared datacenter proxy is often held for half a minute or more. Residential uses your own Apify Residential traffic in the country below.",
            "default": "direct"
          },
          "apifyProxyCountry": {
            "title": "Residential proxy country",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country for `My Apify Residential proxies`.",
            "default": "US"
          },
          "apifyProxySessions": {
            "title": "Apify proxy sessions",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Sticky sessions (exits) to rotate over when one is refused; with Automatic they are only the fallback.",
            "default": 2
          },
          "customProxyUrls": {
            "title": "My custom proxy list (secret)",
            "type": "string",
            "description": "For `My custom proxy list`: one http(s)://user:password@host:port per line (semicolons or a JSON array also work)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}