{
  "openapi": "3.0.1",
  "info": {
    "title": "Business Review Monitor — New & Changed Reviews",
    "description": "Monitor public business-review pages for new and changed reviews with persistent state, structured output, and selector fallback when Schema.org data is unavailable.",
    "version": "1.0",
    "x-build-id": "HA2HnA8IblK7FcfcG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yearly_register~business-review-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yearly_register-business-review-monitor",
        "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/yearly_register~business-review-monitor/runs": {
      "post": {
        "operationId": "runs-sync-yearly_register-business-review-monitor",
        "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/yearly_register~business-review-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-yearly_register-business-review-monitor",
        "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": "Review page URLs",
            "type": "array",
            "description": "Add one or more public business/review pages. The Actor uses Schema.org review data when available or your optional CSS selectors.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Public HTTP(S) business or review page."
                }
              },
              "required": [
                "url"
              ]
            },
            "default": []
          },
          "maxResults": {
            "title": "Maximum delivered reviews",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Global cap for review rows delivered by this run.",
            "default": 250
          },
          "monitor": {
            "title": "Only return new or changed reviews",
            "type": "boolean",
            "description": "Persist review state between runs. Reuse the same Monitor name on schedules to suppress unchanged reviews.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "pattern": "^[A-Za-z0-9._-]{1,128}$",
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Stable identifier for this monitor. Reuse the same value on future runs.",
            "default": "default"
          },
          "emitMode": {
            "title": "What should monitoring runs return?",
            "enum": [
              "new",
              "changed",
              "new_and_changed",
              "all"
            ],
            "type": "string",
            "description": "new = unseen reviews; changed = previously seen reviews whose normalized content changed; new_and_changed = both; all = all observed reviews.",
            "default": "new"
          },
          "changeRetentionDays": {
            "title": "Remember reviews for",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Monitoring state older than this is pruned.",
            "default": 30
          },
          "maxStateRecords": {
            "title": "Maximum remembered reviews",
            "minimum": 100,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum review snapshots kept for this monitor after pruning.",
            "default": 50000
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard crawl request limit.",
            "default": 10000
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum concurrent requests.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries after transient request failures.",
            "default": 3
          },
          "maxRequestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum requests per minute.",
            "default": 60
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify or custom proxy configuration."
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Enable verbose debug logs.",
            "default": false
          },
          "reviewSelector": {
            "title": "Review card selector",
            "maxLength": 500,
            "type": "string",
            "description": "Optional CSS selector for review cards. Leave empty to use structured JSON-LD only.",
            "default": ""
          },
          "titleSelector": {
            "title": "Review title selector",
            "maxLength": 500,
            "type": "string",
            "description": "CSS selector relative to each review card.",
            "default": ""
          },
          "bodySelector": {
            "title": "Review body selector",
            "minLength": 1,
            "maxLength": 500,
            "type": "string",
            "description": "CSS selector relative to each review card.",
            "default": "[itemprop=reviewBody]"
          },
          "ratingSelector": {
            "title": "Rating selector",
            "minLength": 1,
            "maxLength": 500,
            "type": "string",
            "description": "CSS selector relative to each review card.",
            "default": "[itemprop=ratingValue]"
          },
          "authorSelector": {
            "title": "Author selector",
            "minLength": 1,
            "maxLength": 500,
            "type": "string",
            "description": "CSS selector relative to each review card.",
            "default": "[itemprop=author]"
          },
          "dateSelector": {
            "title": "Published date selector",
            "minLength": 1,
            "maxLength": 500,
            "type": "string",
            "description": "CSS selector relative to each review card.",
            "default": "[itemprop=datePublished]"
          },
          "maxReviewsPerPage": {
            "title": "Maximum reviews per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum valid review candidates retained from one page.",
            "default": 100
          },
          "maxReviewBodyLength": {
            "title": "Maximum review body length",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum body characters delivered; change detection still hashes the full normalized body.",
            "default": 10000
          },
          "ratingScaleMax": {
            "title": "Rating scale maximum",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Fallback maximum rating when structured bestRating is unavailable.",
            "default": 5
          },
          "reviewIdAttribute": {
            "title": "Review ID attribute",
            "pattern": "^[A-Za-z0-9:_-]*$",
            "maxLength": 100,
            "type": "string",
            "description": "Optional card attribute containing a stable source review ID.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}