{
  "openapi": "3.0.1",
  "info": {
    "title": "Local Rank Tracker API: Google Reviews, Local Pack and Listings",
    "description": "Local rank tracker and local SEO API: Google, Google Maps Local Finder and Bing local pack and organic rank checks, Google Business Profile and directory listing data, and up to 500 reviews per profile from Google, Facebook, Tripadvisor and Trustpilot via the BrightLocal API. Bring your own key.",
    "version": "0.1",
    "x-build-id": "gDkY8d0wk2tcwQcNf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~local-seo-rankings-reviews-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-local-seo-rankings-reviews-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~local-seo-rankings-reviews-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-local-seo-rankings-reviews-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~local-seo-rankings-reviews-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-local-seo-rankings-reviews-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": [
              "rankings",
              "findListings",
              "fetchListings",
              "reviews",
              "reviewsByBusiness",
              "batchResults",
              "findLocations",
              "directories"
            ],
            "type": "string",
            "description": "Each mode calls documented BrightLocal API routes with your own API key. Rank checks and listings use the Data APIs (api.brightlocal.com); reviews use the batch API (create a batch, add jobs, commit, poll). No batch is ever stopped or deleted.",
            "default": "rankings"
          },
          "apiKey": {
            "title": "BrightLocal API key",
            "type": "string",
            "description": "Your own BrightLocal API key, issued by BrightLocal to your account on request. Sent only to BrightLocal: as the x-api-key header to api.brightlocal.com and as the api-key field to tools.brightlocal.com, and removed from every log line. Requests are billed by BrightLocal to that account. Leave empty to use the DATA_API_KEY secret."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Three letter ISO 3166-1 country code such as USA, GBR, CAN or AUS. Used by every mode except Read a reviews batch. Reviews by business data supports USA only. In Supported directories mode, leave empty to list every country.",
            "default": "USA"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Local rank check. One keyword per line, at most 400 characters each. Each term is checked in each location.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Local rank check. One location per line: a canonical name (see the Find search locations mode) or a free form place name. Each pair of search term and location is one BrightLocal request.",
            "items": {
              "type": "string"
            }
          },
          "searchEngine": {
            "title": "Search engine",
            "enum": [
              "google",
              "google-mobile",
              "google-local-finder",
              "bing",
              "bing-local"
            ],
            "type": "string",
            "description": "Local rank check. The engine to check.",
            "default": "google"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Local rank check. Two letter ISO 639-1 language code.",
            "default": "en"
          },
          "numResults": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Local rank check. How many search results BrightLocal returns or matches against, 1 to 100.",
            "default": 20
          },
          "resultScope": {
            "title": "Rows to keep",
            "enum": [
              "all",
              "matched"
            ],
            "type": "string",
            "description": "Local rank check. All search results (your matches carry a rank and how they matched), or only the results that match your business.",
            "default": "all"
          },
          "matchWebsiteUrls": {
            "title": "Your website URLs",
            "type": "array",
            "description": "Local rank check. Up to 10 URLs that identify your business in the results.",
            "items": {
              "type": "string"
            }
          },
          "matchUid": {
            "title": "Google CID or Bing Local ID",
            "type": "string",
            "description": "Local rank check. The Google ludocid (CID) or Bing Local ID of your business, recommended for local pack and Local Finder matching."
          },
          "napMatchLocal": {
            "title": "Match local results by name, phone and postcode",
            "type": "boolean",
            "description": "Local rank check. Use the business names, telephone and postcode below to match local pack and Local Finder results.",
            "default": true
          },
          "napMatchOrganic": {
            "title": "Match organic results by name, phone and postcode",
            "type": "boolean",
            "description": "Local rank check. Also match organic results by name, phone and postcode. Finds third party mentions but can give fuzzier matches.",
            "default": false
          },
          "businessNames": {
            "title": "Business names",
            "type": "array",
            "description": "Local rank check (up to 20, for matching), Find business listings and Reviews by business data. The business name and its variants, one per line.",
            "items": {
              "type": "string"
            }
          },
          "telephone": {
            "title": "Telephone",
            "type": "string",
            "description": "Local rank check (at most 20 characters), Find business listings and Reviews by business data. Improves match quality."
          },
          "postcode": {
            "title": "Postcode or ZIP code",
            "type": "string",
            "description": "Local rank check (at most 10 characters), Find business listings, and Reviews by business data (required there)."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Find business listings, and Reviews by business data (required there)."
          },
          "region": {
            "title": "Region or state",
            "type": "string",
            "description": "Find business listings."
          },
          "streetAddress": {
            "title": "Street address",
            "type": "string",
            "description": "Find business listings and Reviews by business data. Optional, improves match accuracy."
          },
          "directories": {
            "title": "Directories",
            "type": "array",
            "description": "Find business listings (any directory ID from the Supported directories mode, such as google, apple or facebook) and Reviews by business data (google, trustpilot, dentist1800, expedia, facebook, grubhub, healthgrades, insiderpages, opentable, realself, selfstorage, tripadvisor or yellowpages). One per line; empty means google.",
            "items": {
              "type": "string"
            }
          },
          "profileUrls": {
            "title": "Profile URLs",
            "type": "array",
            "description": "Fetch business listings and Reviews by profile URL. One directory profile link per line, such as a Google Maps cid link, an Apple Maps place link or a directory business page.",
            "items": {
              "type": "string"
            }
          },
          "reviewSort": {
            "title": "Review order",
            "enum": [
              "date",
              "rating"
            ],
            "type": "string",
            "description": "Reviews modes. Newest first or by rating.",
            "default": "date"
          },
          "reviewsLimit": {
            "title": "Reviews per profile",
            "type": "string",
            "description": "Reviews modes. A positive whole number, or all. BrightLocal returns up to 500 reviews per request for a directory; use the next start page value of the last row to read further.",
            "default": "100"
          },
          "dateFrom": {
            "title": "Reviews since",
            "type": "string",
            "description": "Reviews modes. Only reviews from this date: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS."
          },
          "startPage": {
            "title": "Start page",
            "type": "string",
            "description": "Reviews modes. The nextStartPage value of an earlier run (a page number or token), to read the next batch of up to 500 reviews."
          },
          "batchId": {
            "title": "Batch ID",
            "type": "string",
            "description": "Read a reviews batch. The batch ID an earlier reviews run logged."
          },
          "locationQuery": {
            "title": "Location search",
            "type": "string",
            "description": "Find search locations. A place name such as Springfield, at most 400 characters."
          },
          "waitMinutes": {
            "title": "Wait for results (minutes)",
            "minimum": 0,
            "maximum": 120,
            "type": "integer",
            "description": "Rank checks, listings and reviews run as asynchronous BrightLocal jobs. How long to keep checking before ending the run. Requests still running are saved as free rows; a reviews batch can be read later with its batch ID.",
            "default": 15
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops after this many rows. It also caps how many requests are created (at most 500).",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}