{
  "openapi": "3.0.1",
  "info": {
    "title": "Bing Rank Tracker & SERP Scraper",
    "description": "Export Bing organic search results with positions, titles, URLs, snippets and available related searches. Choose market and language for each search snapshot.",
    "version": "0.1",
    "x-build-id": "zYLH74URFWRDDgkdT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetch_cat~bing-search-results-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetch_cat-bing-search-results-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/fetch_cat~bing-search-results-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetch_cat-bing-search-results-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/fetch_cat~bing-search-results-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetch_cat-bing-search-results-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": {
          "queries": {
            "title": "Queries",
            "maxItems": 100,
            "type": "array",
            "description": "Bing keywords, one per row; at most 2048 characters each. Use at most 100 combined queries, URLs and resume seeds per run.",
            "items": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "startUrls": {
            "title": "Bing search URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Public HTTPS Bing /search URLs with a nonempty query, no credentials or custom ports, and at most 8192 characters. At most 100 combined seeds per run. Remote URL-list expansion is not supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResultsPerQuery": {
            "title": "Maximum results per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of organic results to save for each query or start URL.",
            "default": 10
          },
          "market": {
            "title": "Market",
            "maxLength": 64,
            "type": "string",
            "description": "Bing market code, for example en-US, en-GB, de-DE, fr-FR, or es-ES; at most 64 characters.",
            "default": "en-US"
          },
          "language": {
            "title": "Language",
            "maxLength": 64,
            "type": "string",
            "description": "Preferred result language code, for example en, de, fr, or es; at most 64 characters.",
            "default": "en"
          },
          "safeSearch": {
            "title": "SafeSearch",
            "enum": [
              "Off",
              "Moderate",
              "Strict"
            ],
            "type": "string",
            "description": "Bing SafeSearch level to request.",
            "default": "Moderate"
          },
          "connectionMode": {
            "title": "Connection",
            "enum": [
              "direct",
              "automatic"
            ],
            "type": "string",
            "description": "Direct (default) sends requests without a proxy and never switches to a paid proxy. Automatic uses the existing managed Apify Proxy route from the first request, with the same bounded retries and run budget. It does not try Direct first or guarantee access. Managed proxy usage can incur additional costs. Explicit legacy proxyConfiguration settings override this selector, including Direct/Automatic values supplied by the form.",
            "default": "direct"
          },
          "includeRelatedSearches": {
            "title": "Include related searches",
            "type": "boolean",
            "description": "Add related search suggestions found on the result page to each result row.",
            "default": true
          },
          "maxRunSeconds": {
            "title": "Maximum run time (seconds)",
            "minimum": 1,
            "maximum": 270,
            "type": "integer",
            "description": "Processing deadline measured from the original run start, at most 270 seconds with a shutdown reserve. It cannot be renewed by a timeout override or automatic restart. Deadline-incomplete runs fail with saved rows and pending seeds available; charge-budget stops are reported separately.",
            "default": 270
          },
          "resumeSeeds": {
            "title": "Resume pending searches",
            "maxItems": 100,
            "type": "array",
            "description": "Copy actual PENDING_SEEDS into a new run, retaining query, URL, page, savedForQuery and optional skipOnPage. Query/page must match the URL. The saved page offset avoids re-saving already completed rows from a budget-limited page. Automatic resurrection never repeats charged work. Live search results may change between runs; inspect combined output for changes.",
            "items": {
              "type": "object",
              "properties": {
                "query": {
                  "type": "string",
                  "title": "Query",
                  "description": "The Bing query to resume.",
                  "maxLength": 2048
                },
                "url": {
                  "type": "string",
                  "title": "Bing page URL",
                  "description": "The recorded Bing result page URL.",
                  "maxLength": 8192
                },
                "page": {
                  "type": "integer",
                  "title": "Page",
                  "description": "The next Bing results page number.",
                  "minimum": 1,
                  "maximum": 10000
                },
                "savedForQuery": {
                  "type": "integer",
                  "title": "Saved results",
                  "description": "The number of results already saved for this query in the interrupted run.",
                  "minimum": 0,
                  "maximum": 100
                },
                "skipOnPage": {
                  "type": "integer",
                  "title": "Saved page offset",
                  "description": "Optional offset copied from PENDING_SEEDS, counting already saved records on this page.",
                  "minimum": 0,
                  "maximum": 100
                }
              }
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional legacy connection settings. Explicit settings override Connection. useApifyProxy: false or omitted preserves Direct with no paid fallback, even if Automatic is selected. useApifyProxy: true preserves the existing SDK route: a nonempty proxyUrls pool uses those customer proxies, otherwise managed Apify Proxy options apply. Supported SDK groups, country/subdivision aliases, password, access-check and tier options remain accepted. Custom pools cannot be combined with managed groups/location options. Empty active proxy pools and malformed settings are rejected before charging/search work. Omit this object to use Connection. Never share proxy URLs or credentials in support examples."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}