{
  "openapi": "3.0.1",
  "info": {
    "title": "Customer Reviews API - Trustpilot Reviews, TrustScore, Profiles",
    "description": "Customer reviews and TrustScores of any business from the public Trustpilot API: service reviews with star, language, reply and date filters, business profiles with star distribution and categories, business search, category listings and product reviews per SKU. Bring your own key.",
    "version": "0.1",
    "x-build-id": "42AqTCDepdIutPX6v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~customer-reviews-trustscore-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-customer-reviews-trustscore-api",
        "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/nabeelbaghoor~customer-reviews-trustscore-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-customer-reviews-trustscore-api",
        "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/nabeelbaghoor~customer-reviews-trustscore-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-customer-reviews-trustscore-api",
        "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": {
          "service": {
            "title": "What to read",
            "enum": [
              "reviews",
              "allReviews",
              "businessProfile",
              "searchBusinesses",
              "categoryBusinesses",
              "categories",
              "latestReviews",
              "review",
              "productReviews",
              "productSummary"
            ],
            "type": "string",
            "description": "Service reviews (the default) reads the reviews of each business with the star, language, reply and sort filters. Every service review reads all of them with page tokens and no provider filters, past the 100,000 review limit of the filtered route. Business profile returns TrustScore, star distribution, categories and contact details. The other services search businesses by name, list a category's businesses or the category tree, read the latest reviews in a language, read reviews by id, or read product reviews and rating summaries per SKU.",
            "default": "reviews"
          },
          "businesses": {
            "title": "Businesses",
            "type": "array",
            "description": "One per line: a website domain such as example.com, a review page address such as https://www.trustpilot.com/review/example.com, or a 24 character business unit id. Used by service reviews, every service review, business profile, product reviews and product rating summary.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Search businesses by name only: one company name or part of a domain per line, such as bank or shoes.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category ids",
            "type": "array",
            "description": "Businesses in a category: the category ids to list, such as pet_store or electronics_technology. Categories: parent ids whose sub-categories to list; leave empty for the top level. Category ids come from the categories service.",
            "items": {
              "type": "string"
            }
          },
          "reviewIds": {
            "title": "Review ids",
            "type": "array",
            "description": "Reviews by id only: one 24 character review id per line.",
            "items": {
              "type": "string"
            }
          },
          "stars": {
            "title": "Star ratings",
            "type": "array",
            "description": "Service reviews and product reviews: keep only these star ratings. Leave empty for all.",
            "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, de or da. Service reviews: keep only reviews in these languages. Product reviews: one language. Latest reviews by language: required.",
            "items": {
              "type": "string"
            }
          },
          "orderBy": {
            "title": "Sort order",
            "enum": [
              "createdat.desc",
              "createdat.asc",
              "stars.desc",
              "stars.asc",
              "default"
            ],
            "type": "string",
            "description": "Service reviews only: newest first (the default), oldest first, highest stars first or lowest stars first.",
            "default": "createdat.desc"
          },
          "responded": {
            "title": "Company reply",
            "enum": [
              "any",
              "true",
              "false"
            ],
            "type": "string",
            "description": "Service reviews only: all reviews, only those the company replied to, or only those without a reply.",
            "default": "any"
          },
          "reviewsFrom": {
            "title": "Reviews from date",
            "type": "string",
            "description": "Service reviews, every service review and product reviews: keep reviews created on or after this date (YYYY-MM-DD). Applied by the actor, since the public routes take no date filter. With newest first sorting, paging stops once reviews are older than this."
          },
          "reviewsTo": {
            "title": "Reviews to date",
            "type": "string",
            "description": "Keep reviews created on or before this date (YYYY-MM-DD). Applied by the actor, like the from date."
          },
          "includeReportedReviews": {
            "title": "Include reported reviews",
            "type": "boolean",
            "description": "Service reviews only: also return reviews that have been reported.",
            "default": false
          },
          "locationId": {
            "title": "Location id",
            "type": "string",
            "description": "Service reviews only: keep reviews of one location of a multi-location business, by its location id."
          },
          "skus": {
            "title": "Product SKUs",
            "type": "array",
            "description": "Product reviews and product rating summary: one SKU per line, as the business lists it. Each SKU is read separately so every row names its SKU.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Product reviews only: product page addresses, as an alternative or addition to SKUs.",
            "items": {
              "type": "string"
            }
          },
          "customerProductId": {
            "title": "Customer product id",
            "type": "string",
            "description": "Product reviews and product rating summary: the business's own product id, instead of SKUs and product URLs."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two letter country code such as US, GB or DE. Narrows search results, category listings and categories, and the category ranking in a business profile."
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "Such as en-US or da-DK. Translates category names, and sets the language of profile links, latest review links and product attributes."
          },
          "includeProfileDetails": {
            "title": "Include profile details",
            "type": "boolean",
            "description": "Business profile only: also read company contact details, categories with ranking and the profile page link. Three extra API calls per business.",
            "default": true
          },
          "maxReviewsPerBusiness": {
            "title": "Maximum reviews per business",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop each business after this many reviews. 0 means no limit per business, only the overall maximum.",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many rows in total.",
            "default": 500
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 160,
            "type": "integer",
            "description": "Pacing ceiling for calls to the provider, which recommends no more than 833 calls per 5 minutes. Every call counts toward your yearly API allowance.",
            "default": 120
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own API key: the key (Client ID) of an application you create in your Trustpilot Business account with the API module. Not the secret. This actor is bring-your-own-key and never ships one. Leave blank to use the DATA_API_KEY environment secret. The key is sent only in the apikey header and is never written to a row or logged."
          },
          "baseUrl": {
            "title": "API base URL",
            "type": "string",
            "description": "Override the host the actor calls. Only useful for testing against a different environment."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}