{
  "openapi": "3.0.1",
  "info": {
    "title": "Bing Search Scraper: Organic Results, Ads & Related Searches",
    "description": "Scrape Bing results pages: organic results with decoded real URLs, sitelinks, text and shopping ads, Copilot AI answer, People also ask, related searches and result counts. Markets, mobile, date filters. Pay per results page, not per result.",
    "version": "0.1",
    "x-build-id": "VXyHPY3fqn8NK8F54"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~bing-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-bing-search-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/rjmacarthy~bing-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-bing-search-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/rjmacarthy~bing-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-bing-search-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "One query per line, exactly as you would type it into Bing (operators like \"quoted phrases\" work). Each query is scraped in its own Bing session.",
            "default": [
              "project management software",
              "eiffel tower",
              "best running shoes"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerQuery": {
            "title": "Results pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many results pages to scrape for each query. Bing decides how many organic results a page shows: up to 10, but often only 2-6 on page 1 of commercial queries, where ads, shopping and answers take the space. Each next page continues exactly where Bing's own pager does, so no result is skipped. Each scraped page is one billable \"results-page\" event. The Actor stops early, without charging, when Bing runs out of new results.",
            "default": 1
          },
          "market": {
            "title": "Market (country & language)",
            "enum": [
              "en-US",
              "en-GB",
              "en-CA",
              "fr-CA",
              "en-AU",
              "en-NZ",
              "en-IE",
              "en-IN",
              "en-SG",
              "en-ZA",
              "en-PH",
              "en-MY",
              "de-DE",
              "de-AT",
              "de-CH",
              "fr-FR",
              "fr-BE",
              "fr-CH",
              "nl-NL",
              "nl-BE",
              "es-ES",
              "es-MX",
              "es-AR",
              "es-CL",
              "es-US",
              "it-IT",
              "pt-BR",
              "pt-PT",
              "pl-PL",
              "sv-SE",
              "da-DK",
              "nb-NO",
              "fi-FI",
              "tr-TR",
              "ru-RU",
              "ja-JP",
              "ko-KR",
              "zh-CN",
              "zh-HK",
              "zh-TW",
              "ar-SA"
            ],
            "type": "string",
            "description": "Bing market to search in. Sets the country and the language Bing uses to rank results. For United States (en-US) Bing picks the market from the IP address and language, so for US results run from US IPs (Apify Proxy, country US); other markets are applied explicitly.",
            "default": "en-US"
          },
          "language": {
            "title": "Interface language (optional)",
            "type": "string",
            "description": "Bing interface language (setlang), e.g. \"en\", \"de\" or \"pt-BR\". Leave empty to use the market's language."
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Scrape the desktop or the mobile results page (mobile uses an Android Chrome user agent). Bing's mobile page has no classic pagination, so mobile scrapes page 1 only.",
            "default": "desktop"
          },
          "safeSearch": {
            "title": "SafeSearch",
            "enum": [
              "moderate",
              "strict",
              "off"
            ],
            "type": "string",
            "description": "Bing SafeSearch level for adult content.",
            "default": "moderate"
          },
          "freshness": {
            "title": "Date range",
            "enum": [
              "any",
              "day",
              "week",
              "month"
            ],
            "type": "string",
            "description": "Only results Bing considers published or updated in this period.",
            "default": "any"
          },
          "site": {
            "title": "Restrict to site (optional)",
            "type": "string",
            "description": "Only results from this domain, e.g. \"example.com\" or \"example.com/blog\" (adds site: to every query). Note: in our tests Bing degraded site: searches for automated clients from datacenter IPs; such pages are detected, retried and never charged. If that happens, leave this empty and filter the results by domain yourself."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "page",
              "flat"
            ],
            "type": "string",
            "description": "\"One item per results page\" puts organic results, ads, People also ask etc. in nested arrays (one dataset item per page). \"Page items + one row per organic result\" additionally outputs every organic result as its own flat row (type \"organic\"), handy for spreadsheets; those rows are free - you still pay per page.",
            "default": "flat"
          },
          "maxConcurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many queries run at the same time (each in its own Bing session). Requests are spaced at least 1 second apart in total.",
            "default": 2
          },
          "debugSaveHtml": {
            "title": "Debug: save raw HTML",
            "type": "boolean",
            "description": "Diagnostics only: store every raw Bing response in the run's key-value store (DEBUG-* records).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Recommended for runs of more than ~100 pages: with Apify Proxy (datacenter) each query gets a fresh IP. Degraded or challenged pages are retried with a new session and never charged. Residential proxies are not supported: if you select the RESIDENTIAL group, the Actor logs a warning and uses Apify datacenter proxy instead. Your own proxy URLs are used as given.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}