{
  "openapi": "3.0.1",
  "info": {
    "title": "Yandex Search Engine Scraper (SERP API)",
    "description": "The same query put to Yandex from Moscow (lr=213) and from Istanbul (lr=11508) is not the same page. Yandex ranks by region and this pins whichever lr you want, wherever it runs. Rank, title, URL, snippet, sitelinks, result type. No API key. $3.40 per 1,000 plus $0.001 a run.",
    "version": "0.1",
    "x-build-id": "hYmgV6Tc9aYdgOcV4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~yandex-search-engine-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-yandex-search-engine-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/dami_studio~yandex-search-engine-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-yandex-search-engine-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/dami_studio~yandex-search-engine-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-yandex-search-engine-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": "Search queries",
            "type": "array",
            "description": "Keywords to search on Yandex. One row per result. Works in any language — Russian, Turkish, English, Kazakh.",
            "items": {
              "type": "string"
            }
          },
          "domain": {
            "title": "Yandex domain",
            "enum": [
              "yandex.com.tr",
              "yandex.uz",
              "yandex.com",
              "yandex.ru",
              "yandex.kz",
              "yandex.by",
              "yandex.com.ge",
              "yandex.az"
            ],
            "type": "string",
            "description": "Which Yandex front-end to query. They all serve the same index, but they do not all defend themselves the same way: yandex.com.tr answers automated requests reliably and honours the lr region code, which is why it is the default. If the host you pick answers with a robot check, the run automatically retries that query on yandex.com.tr pinned to the same region and tells you in an uncharged notice row - the \"domain\" field on every result records the host that actually answered. Note that yandex.uz ignores lr and always ranks for Uzbekistan.",
            "default": "yandex.com.tr"
          },
          "startUrls": {
            "title": "Yandex search URLs",
            "type": "array",
            "description": "Paste full Yandex search URLs instead of keywords, for example https://yandex.com/search/?text=pizza&lr=213. The query, region and start page are read from the URL.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region (Yandex lr code)",
            "type": "integer",
            "description": "Yandex region id that decides which regional ranking you get. Verified codes: 225 Russia, 213 Moscow, 2 Saint Petersburg, 65 Novosibirsk, 54 Yekaterinburg, 43 Kazan, 47 Nizhny Novgorod, 39 Rostov-on-Don, 35 Krasnodar, 51 Samara, 187 Ukraine, 143 Kyiv, 149 Belarus, 157 Minsk, 159 Kazakhstan, 163 Astana, 10393 Almaty, 983 Turkey, 11508 Istanbul, 171 Uzbekistan, 10335 Tashkent, 168 Azerbaijan, 167 Armenia, 10262 Yerevan, 169 Georgia, 84 USA, 102 Germany, 95 United Kingdom. Leave empty to let Yandex choose."
          },
          "maxItemsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "How many results to return for each query. Yandex serves about 10-20 per page and this actor pages through automatically.",
            "default": 20
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap across all queries. Every returned result is one charged event, so this is also your budget cap.",
            "default": 100
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Safety stop on how deep to page for one query.",
            "default": 15
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Include Yandex Direct ad slots (type \"ad\"). Their URL is Yandex's click tracker; the advertiser's own domain is in displayedDomain.",
            "default": true
          },
          "includeFeatured": {
            "title": "Include featured blocks",
            "type": "boolean",
            "description": "Include non-organic SERP blocks such as video carousels, image strips, related searches and the AI answer teaser (type \"featured\"). They occupy a rank slot, which matters for rank tracking. Turn off if you only want the ten blue links.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is. Apify datacenter proxy with a new session per request is what keeps Yandex answering; residential proxy is not needed and costs far more. Residential and SERP groups are not offered here — if you select one it is replaced with rotating datacenter addresses and the run tells you so. Your own proxy servers (proxyUrls) are always used exactly as given.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}