{
  "openapi": "3.0.1",
  "info": {
    "title": "Yandex Search Engine Scraper - SERP Results by Region",
    "description": "Yandex SERP scraper: search results by keyword or URL, ranked for the region you pick with Yandex's lr code. Each row has the rank, organic rank, title, URL, domain, snippet, sitelinks and whether it is organic, an ad or a featured block. $3.40 per 1,000 results. Парсер выдачи Яндекса.",
    "version": "0.1",
    "x-build-id": "lVph0aMOkgJSccWM0"
  },
  "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 Yandex handles. Russian, Turkish, English, Kazakh. A query goes to Yandex exactly as you type it, operators included; in our tests Yandex did not serve queries with site: in them, so expect a free notice row instead of results for those.",
            "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. yandex.com.tr honours the lr region code, which is why it is the default. If the host you pick does not serve the query, the run asks yandex.com.tr instead, 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. To pick up a deep search where it stopped, add &p= to the address: Yandex counts pages from 0, so &p=4 starts on page 5. The search options below apply to these URLs too.",
            "items": {
              "type": "string"
            }
          },
          "regionPreset": {
            "title": "Region (pick by name)",
            "enum": [
              "225",
              "213",
              "2",
              "65",
              "54",
              "43",
              "47",
              "39",
              "35",
              "51",
              "187",
              "143",
              "149",
              "157",
              "159",
              "163",
              "10393",
              "983",
              "11508",
              "171",
              "10335",
              "168",
              "167",
              "10262",
              "169",
              "84",
              "102",
              "95"
            ],
            "type": "string",
            "description": "The region whose ranking you want, picked by name. If you also type a code into the field below, the code wins. Leave both empty to let Yandex choose."
          },
          "region": {
            "title": "Region (Yandex lr code)",
            "type": "integer",
            "description": "Yandex region id that decides which regional ranking you get. Any lr code works here, and a code typed here wins over the name picked above. 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."
          },
          "timeRange": {
            "title": "Published within",
            "enum": [
              "any",
              "day",
              "twoWeeks",
              "month"
            ],
            "type": "string",
            "description": "Only pages Yandex dates within this window: the last day, the last two weeks or the last month. These are the three windows Yandex offers. If Yandex still lists a page whose own date is older than that, the row is left out and not charged. Pages that show no date are kept. A query with nothing that fresh comes back as a free NO_RESULTS row.",
            "default": "any"
          },
          "sortByDate": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Order the results by date, newest first, instead of by relevance. Ranks then mean freshness, so leave it off for rank tracking.",
            "default": false
          },
          "resultsLanguage": {
            "title": "Page language",
            "type": "array",
            "description": "Only pages written in these languages. Pick one or more. These are the languages Yandex's own search form offers.",
            "items": {
              "type": "string",
              "enum": [
                "ru",
                "en",
                "tr",
                "uk",
                "be",
                "kk",
                "tt",
                "de",
                "fr",
                "id"
              ],
              "enumTitles": [
                "Russian",
                "English",
                "Turkish",
                "Ukrainian",
                "Belarusian",
                "Kazakh",
                "Tatar",
                "German",
                "French",
                "Indonesian"
              ]
            }
          },
          "safeSearch": {
            "title": "Family filter",
            "type": "boolean",
            "description": "Turn on Yandex's strict family filter, which drops adult pages. Off means Yandex's usual setting.",
            "default": false
          },
          "noAutocorrect": {
            "title": "Search the exact spelling",
            "type": "boolean",
            "description": "When a query looks misspelt, Yandex quietly searches its own correction and the correctedQuery field says so. Turn this on to make Yandex search exactly what you typed.",
            "default": false
          },
          "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. 100 results cost about $0.34 on the Free plan, a little less on paid plans.",
            "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 and image strips (type \"featured\"). They occupy a rank slot, which matters for rank tracking. Yandex's AI answer box is left out and never charged. Turn off if you only want the ten blue links.",
            "default": true
          },
          "adsOnly": {
            "title": "Ads only",
            "type": "boolean",
            "description": "Return the ad slots and nothing else. Organic and featured rows are dropped before anything is charged, so you pay only for ads. Many queries carry no ads at all; those come back as a free NO_RESULTS row.",
            "default": false
          },
          "includeRelatedSearches": {
            "title": "Add related searches",
            "type": "boolean",
            "description": "Add one row per query with the searches Yandex suggests at the bottom of the page, as a list in relatedSearches. The row costs the same as one result and does not count toward Max results per query. It does count toward Max results in total, so leave room there or it is left out.",
            "default": false
          },
          "includeEntityCard": {
            "title": "Add the knowledge card",
            "type": "boolean",
            "description": "When Yandex shows a card beside the results for a person, place or thing, add it as one row: its title, Yandex's summary, the facts it lists and the sites it cites. The row costs the same as one result and does not count toward Max results per query. It does count toward Max results in total, so leave room there or it is left out.",
            "default": false
          },
          "failIfEmpty": {
            "title": "Fail the run when nothing comes back",
            "type": "boolean",
            "description": "Off by default. Turn it on and a run that delivers no results ends as failed, so a schedule or webhook watching run status can tell you. Either way, the run summary is saved as the OUTPUT record in the run's key-value store.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional, and not needed for a normal run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}