{
  "openapi": "3.0.1",
  "info": {
    "title": "Yandex SERP & Knowledge Graph Scraper",
    "description": "Query Yandex across 17 regional domains and get organic results, ads, knowledge graph cards, inline images and videos, and related searches per page, with language, region and recency filters.",
    "version": "1.0",
    "x-build-id": "bSVngXIyYRPALNUTs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~yandex-serp-and-knowledge-graph-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-yandex-serp-and-knowledge-graph-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/vexaloom-labs~yandex-serp-and-knowledge-graph-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-yandex-serp-and-knowledge-graph-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/vexaloom-labs~yandex-serp-and-knowledge-graph-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-yandex-serp-and-knowledge-graph-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byUrls"
            ],
            "type": "string",
            "description": "Search by keyword or parse existing Yandex SERP URLs.",
            "default": "search"
          },
          "queries": {
            "title": "Search Queries",
            "minItems": 1,
            "type": "array",
            "description": "One or more search queries (mode=search). Each query is processed separately.",
            "items": {
              "type": "string"
            }
          },
          "serpUrls": {
            "title": "Yandex SERP URLs",
            "type": "array",
            "description": "Yandex search-result URLs, one per page (mode=byUrls). Direct Yandex URLs and translated Yandex URLs are accepted.",
            "items": {
              "type": "string"
            }
          },
          "domain": {
            "title": "Yandex Domain",
            "enum": [
              "yandex.com",
              "yandex.by",
              "yandex.kz",
              "yandex.uz",
              "yandex.com.tr",
              "yandex.com.ge",
              "yandex.az",
              "yandex.md",
              "yandex.tj"
            ],
            "type": "string",
            "description": "Regional Yandex front. yandex.com is the international entry point; Yandex may serve it from its Russia front (reported as servedDomain).",
            "default": "yandex.com"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "ru",
              "tr",
              "kk",
              "uz",
              "az",
              "be",
              "uk",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              "pl",
              "cs",
              "ar",
              "he",
              "fa",
              "id"
            ],
            "type": "string",
            "description": "Yandex interface and search language. Match it to your query language to keep result text untranslated.",
            "default": "en"
          },
          "region": {
            "title": "Region",
            "enum": [
              "",
              "ru",
              "moscow",
              "spb",
              "novosibirsk",
              "yekaterinburg",
              "kazan",
              "nizhny-novgorod",
              "chelyabinsk",
              "omsk",
              "samara",
              "rostov-on-don",
              "ufa",
              "krasnoyarsk",
              "voronezh",
              "perm",
              "volgograd",
              "by",
              "minsk",
              "kz",
              "almaty",
              "astana",
              "uz",
              "tashkent",
              "tr",
              "istanbul",
              "ankara",
              "izmir",
              "ge",
              "az",
              "md",
              "tj"
            ],
            "type": "string",
            "description": "Named Yandex region preset. Leave empty to use Yandex's default region. regionId overrides this value.",
            "default": ""
          },
          "regionId": {
            "title": "Region ID",
            "minimum": 1,
            "maximum": 3000000,
            "type": "integer",
            "description": "Numeric Yandex region ID (lr). Overrides the Region preset. For example 213 is Moscow and 983 is Turkey."
          },
          "maxPages": {
            "title": "Max Pages Per Query",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Number of result pages to read per query (1-25). Yandex serves at most 25 pages.",
            "default": 3
          },
          "startPage": {
            "title": "Start Page",
            "minimum": 0,
            "maximum": 24,
            "type": "integer",
            "description": "Zero-based page to start from (0-24). Use it to resume a deep result window.",
            "default": 0
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Global cap on unique items across all queries and pages (1-10,000). In rows mode this is the row count; in pages mode it caps the items inside page records.",
            "default": 100
          },
          "timeFilter": {
            "title": "Time Filter",
            "enum": [
              "any",
              "day",
              "twoWeeks",
              "month"
            ],
            "type": "string",
            "description": "Limit results by recency. The values map to Yandex's own past-day, past-two-weeks and past-month filters.",
            "default": "any"
          },
          "fixTypos": {
            "title": "Fix Typos",
            "type": "boolean",
            "description": "Let Yandex correct misspelled queries. Turn it off for exact-match searches.",
            "default": true
          },
          "includeAds": {
            "title": "Include Ads",
            "type": "boolean",
            "description": "Include sponsored Yandex Direct rows with their click URL and displayed domain.",
            "default": true
          },
          "includeBlocks": {
            "title": "Include SERP Blocks",
            "type": "boolean",
            "description": "Include knowledge graph, AI answer, inline images, inline videos, products, local companies and weather when present.",
            "default": true
          },
          "includeRelatedSearches": {
            "title": "Include Related Searches",
            "type": "boolean",
            "description": "Include the related-search suggestions shown below the results (requires Include SERP Blocks).",
            "default": true
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "pages",
              "rows"
            ],
            "type": "string",
            "description": "Page records preserve the existing dataset shape; rows emit one flat record per result or block item.",
            "default": "pages"
          },
          "failIfEmpty": {
            "title": "Fail If Empty",
            "type": "boolean",
            "description": "Fail the run when no records were produced, instead of finishing with an empty dataset.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}