{
  "openapi": "3.0.1",
  "info": {
    "title": "Bing Search Scraper — Organic, Ads, Copilot AI Answer",
    "description": "Scrape Bing.com SERP — organic results, ads, Copilot AI answer, featured snippet, PAA, related searches, sitelinks. Multi-market, MCP-ready.",
    "version": "0.2",
    "x-build-id": "LPXX2JfIBNNtHhEov"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~bing-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~bing-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~bing-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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 or Bing URLs",
            "type": "array",
            "description": "List of free-text search queries (e.g., 'best crm software 2026') or full Bing search URLs (https://www.bing.com/search?q=...). Each query produces one or more result records. Defaults to a sample marketing query. NOT for Bing Maps URLs — use the bing-maps-scraper actor instead.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country code",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "BR",
              "MX",
              "IN",
              "JP",
              "CN",
              "KR",
              "RU",
              "TR",
              "AE",
              "SG",
              "ZA",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "PT",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "AR",
              "CL"
            ],
            "type": "string",
            "description": "Two-letter ISO country code (e.g., 'US', 'GB', 'DE') used for IP geo-targeting via Apify residential proxy and Bing market hint. Defaults to 'US'. NOT a city name or 3-letter code.",
            "default": "US"
          },
          "language": {
            "title": "Language code",
            "enum": [
              "en",
              "es",
              "de",
              "fr",
              "it",
              "pt",
              "nl",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "tr",
              "pl",
              "sv",
              "no",
              "da",
              "fi",
              "id",
              "th",
              "vi",
              "hi"
            ],
            "type": "string",
            "description": "Two-letter ISO language code for Bing UI/results filter (e.g., 'en', 'es', 'de'). Combines with country to form the Bing market parameter (e.g., en + US = en-US). Defaults to 'en'. NOT a locale string like 'en-US'.",
            "default": "en"
          },
          "safeSearch": {
            "title": "SafeSearch filter",
            "enum": [
              "off",
              "moderate",
              "strict"
            ],
            "type": "string",
            "description": "Bing SafeSearch level: 'off' = no filter, 'moderate' = blur explicit images only, 'strict' = filter all adult content. Defaults to 'moderate'. NOT a content quality filter.",
            "default": "moderate"
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on result records emitted per query, including organic, ads, Copilot answer, PAA, and related searches. Defaults to 50. Range 1-200. NOT the number of Bing result pages — pagination is automatic until this cap is reached.",
            "default": 50
          },
          "includeAds": {
            "title": "Include sponsored ads",
            "type": "boolean",
            "description": "When true, paid ads at top/bottom of SERP are extracted as records with type='ad'. Defaults to true. NOT a setting for Microsoft Advertising API.",
            "default": true
          },
          "includeCopilotAnswer": {
            "title": "Include Microsoft Copilot AI answer",
            "type": "boolean",
            "description": "When true, the Copilot/AI Overview answer block above results is extracted as one record with type='copilot_answer'. Defaults to true. NOT a separate Copilot Chat API call.",
            "default": true
          },
          "includeRelatedSearches": {
            "title": "Include related searches & PAA",
            "type": "boolean",
            "description": "When true, 'People also ask' (PAA) questions and 'Related searches' suggestions are emitted as records with type='paa' or 'related'. Defaults to true. NOT scraping of PAA expanded answers — only the questions and related queries are returned.",
            "default": true
          },
          "fallbackMode": {
            "title": "SerpApi fallback mode",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Controls when the SerpApi (engine=bing) fallback runs. 'auto' (default) — Bing direct first; SerpApi only for queries the direct scrape returned zero records for. 'always' — skip Bing direct, use SerpApi for every query (most reliable, higher cost). 'never' — direct Bing only, no fallback. NOT a setting for the Microsoft Bing Search API.",
            "default": "auto"
          },
          "serpApiKey": {
            "title": "SerpApi API key (BYOK — bring your own key, optional)",
            "type": "string",
            "description": "Your own SerpApi key from serpapi.com. When provided, the actor uses YOUR account for SerpApi fallback calls and you pay the standard $0.003/result price (no premium). When empty, fallback uses the actor owner's managed SerpApi account at the premium $0.005/result rate. NOT a Bing or Microsoft Azure key."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Defaults to residential proxy with country-targeted IP for reliable Bing access. Override only if you have a specific proxy strategy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}