{
  "openapi": "3.0.1",
  "info": {
    "title": "Review Scraper API: Datashake Reviews, Ratings and Replies",
    "description": "Online reviews API for 100+ review sites: scrape reviews, star ratings, review text, dates, reviewer details and owner replies from any business, product or app review page, plus average rating and review count, through the Datashake Reviews API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "6PgEpkYJvbh9RAF4y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~online-review-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-online-review-scraper-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~online-review-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-online-review-scraper-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~online-review-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-online-review-scraper-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": {
          "mode": {
            "title": "What to do",
            "enum": [
              "scrapeReviews",
              "jobReviews",
              "jobDetails",
              "listJobs"
            ],
            "type": "string",
            "description": "Scrape reviews queues one Datashake job per review page link, waits for it within the maximum wait and returns every review. Job reviews and Job and page details read jobs that already exist on your account; Job list lists your jobs.",
            "default": "scrapeReviews"
          },
          "urls": {
            "title": "Review page URLs",
            "type": "array",
            "description": "Scrape reviews. One review page link per line: the main page of a business, product or app on a review site Datashake supports (not a single review). Each link becomes one job on your Datashake account and uses its credits. Up to 500 per run.",
            "items": {
              "type": "string"
            }
          },
          "fromDate": {
            "title": "Reviews posted on or after",
            "type": "string",
            "description": "Scrape reviews and Job reviews. Only collect, and only return, reviews posted on or after this date (YYYY-MM-DD)."
          },
          "diffJobId": {
            "title": "Only new reviews since job",
            "type": "string",
            "description": "Scrape reviews, with exactly one URL. The ID of an earlier job for the same page: Datashake then collects only reviews posted since that job. Cannot be combined with the from date."
          },
          "externalIdentifier": {
            "title": "Your own ID",
            "type": "string",
            "description": "Scrape reviews. Your own ID for the job (up to 255 characters), sent back with the results so they match your records."
          },
          "maxWaitSeconds": {
            "title": "Maximum wait (seconds)",
            "minimum": 0,
            "maximum": 3000,
            "type": "integer",
            "description": "Scrape reviews. How long to wait for the jobs to finish. Pages with thousands of reviews can take longer; any job still collecting is returned with its job ID, free, to read later with Job reviews.",
            "default": 600
          },
          "pollSeconds": {
            "title": "Check every (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Scrape reviews. How often to check each job's progress while waiting.",
            "default": 20
          },
          "callbackUrl": {
            "title": "Callback URL (optional)",
            "type": "string",
            "description": "Scrape reviews. Datashake requires a callback URL for every job and POSTs the results there when the job ends. Leave empty to use this run's own address, which only acknowledges it; set your own public https endpoint to also receive results after the run ends."
          },
          "callbackParameters": {
            "title": "Callback parameters",
            "type": "object",
            "description": "Scrape reviews, with your own callback URL. The documented callback_parameters object: headers, query_params, custom_api_key_header and reviews_chunk_size."
          },
          "jobIds": {
            "title": "Job IDs",
            "type": "array",
            "description": "Job reviews and Job and page details. One Datashake job ID per line, from a Scrape reviews run, the Job list mode or your own integration.",
            "items": {
              "type": "string"
            }
          },
          "languageCode": {
            "title": "Language",
            "type": "string",
            "description": "Scrape reviews and Job reviews. Only return reviews in this language, as a two letter code such as en. Support varies by site."
          },
          "includeReplies": {
            "title": "Include owner replies",
            "type": "boolean",
            "description": "Scrape reviews and Job reviews. Return the business owner's reply with each review, where there is one.",
            "default": true
          },
          "includePageDetails": {
            "title": "Add a page summary row",
            "type": "boolean",
            "description": "Scrape reviews and Job reviews. Add one row per job with the page's review count, average rating, crawl status and business details.",
            "default": true
          },
          "fromCreatedAt": {
            "title": "Jobs created on or after",
            "type": "string",
            "description": "Job list. Only list jobs created on or after this date (YYYY-MM-DD)."
          },
          "crawlStatus": {
            "title": "Job status",
            "enum": [
              "",
              "pending",
              "complete",
              "maintenance",
              "failed",
              "invalid_url"
            ],
            "type": "string",
            "description": "Job list. Only list jobs with this status.",
            "default": ""
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 1000
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing of calls to the Datashake API. Lower it if your plan's rate limit answers 429.",
            "default": 60
          },
          "apiKey": {
            "title": "Datashake API key",
            "type": "string",
            "description": "Your own Datashake API key, created in the Datashake dashboard once your account is verified. Stored encrypted. Or set the DATA_API_KEY environment secret."
          },
          "confirmPaidPlan": {
            "title": "My Datashake key is on a paid plan",
            "type": "boolean",
            "description": "Required. The Datashake terms of service forbid non-paying users from caching or storing review data, and this actor stores results in your dataset. Tick this to confirm the key belongs to a paid Datashake plan.",
            "default": false
          },
          "baseUrl": {
            "title": "Base URL (optional)",
            "type": "string",
            "description": "The Reviews API base URL from your verified Datashake docs, if it differs from the default https://app.datashake.com. Only https addresses on datashake.com are accepted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}