{
  "openapi": "3.0.1",
  "info": {
    "title": "Bing Maps Scraper",
    "description": "Extracts public place and business results from Bing Maps: names, addresses, phone numbers, websites, coordinates, ratings, review counts, opening hours, categories, and place IDs.",
    "version": "1.0",
    "x-build-id": "gk8TZKZNZIz0udIw9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/searchapi~bing-maps-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-searchapi-bing-maps-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/searchapi~bing-maps-scraper/runs": {
      "post": {
        "operationId": "runs-sync-searchapi-bing-maps-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/searchapi~bing-maps-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-searchapi-bing-maps-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": {
          "query": {
            "title": "Search Query",
            "minLength": 1,
            "maxLength": 500,
            "type": "string",
            "description": "The place or business type to search for on Bing Maps (e.g. 'restaurants in New York', 'hotels in Chicago')",
            "default": "restaurants in New York"
          },
          "searchQueries": {
            "title": "Search queries (batch)",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "Optional batch of public Bing Maps business queries. When supplied, the structured overlay endpoint mode is used.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "maxItems": {
            "title": "Maximum Items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of place results to extract",
            "default": 50
          },
          "maxPages": {
            "title": "Maximum pages per batch query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum public overlay pages per search query.",
            "default": 5
          },
          "resultsPerPage": {
            "title": "Results per page (batch)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Requested result count for each structured overlay page.",
            "default": 25
          },
          "maxConcurrency": {
            "title": "Maximum batch concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of batch requests in flight; the browser mode remains single-query.",
            "default": 2
          },
          "maxRetries": {
            "title": "Batch request retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Bounded retries for temporary structured endpoint failures.",
            "default": 2
          },
          "requestTimeoutMs": {
            "title": "Batch request timeout (ms)",
            "minimum": 5000,
            "maximum": 60000,
            "type": "integer",
            "description": "Timeout for each structured endpoint request.",
            "default": 30000
          },
          "minRating": {
            "title": "Minimum rating (batch)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Keep structured business listings at or above this rating."
          },
          "minReviewCount": {
            "title": "Minimum review count (batch)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep structured business listings with at least this many reviews."
          },
          "categoryIncludes": {
            "title": "Category contains (batch)",
            "type": "string",
            "description": "Case-insensitive category filter for structured business results."
          },
          "includePermanentlyClosed": {
            "title": "Include permanently closed (batch)",
            "type": "boolean",
            "description": "Include listings that the structured response explicitly marks permanently closed.",
            "default": false
          },
          "language": {
            "title": "Batch language",
            "pattern": "^[a-z]{2,3}(?:-[A-Z]{2})?$",
            "type": "string",
            "description": "Bing structured result language, for example en-US.",
            "default": "en-US"
          },
          "countryCode": {
            "title": "Batch country code",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter uppercase Bing market code for structured results.",
            "default": "US"
          },
          "requestDelayMs": {
            "title": "Batch request delay (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum spacing between structured endpoint request starts.",
            "default": 500
          },
          "market": {
            "title": "Market / Region",
            "type": "string",
            "description": "Bing market code (language-country), e.g. en-US, en-GB, de-DE",
            "default": "en-US"
          },
          "headless": {
            "title": "Headless Mode",
            "type": "boolean",
            "description": "Run browser in headless mode (recommended for performance)",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for the scraper",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}