{
  "openapi": "3.0.1",
  "info": {
    "title": "Yandex Search Scraper - Turkey & Russia SERP, Ads & Rank",
    "description": "Scrape Yandex results for Turkey and Russia (yandex.com.tr and yandex.ru links; Moscow, Saint Petersburg, Istanbul and other regions): rank, title, URL, site name, snippet, sitelinks, saved copy, Yandex ads and blocks. Track your domains' positions and compare each run with the last.",
    "version": "0.1",
    "x-build-id": "zG2ARcxaUcmvulyAk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~yandex-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-yandex-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/topapi~yandex-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-yandex-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/topapi~yandex-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-yandex-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",
        "properties": {
          "queries": {
            "title": "Search queries or Yandex search links",
            "type": "array",
            "description": "One search per line: words in any language (kahve makinesi, iphone 15 fiyat, купить диван) or a yandex.com.tr or yandex.ru search link (https://yandex.com.tr/search/?text=pizza&lr=11508 - its words, region, page and filters are used). A yandex.ru link is read through yandex.com.tr with its own region number (Russia, 225, when the link has none), which returns that Russian region's results. Each line is searched separately and every row names the search it answered. Links for the other Yandex sites (yandex.kz, yandex.by, yandex.com...) are skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region (lr)",
            "minimum": 1,
            "type": "integer",
            "description": "Yandex's own region number. Turkey: 983 = Türkiye, 11508 = İstanbul, 11503 = Ankara, 11505 = İzmir, 11511 = Antalya, 11504 = Bursa, 11501 = Adana. Russia: 225 = Russia, 213 = Moscow, 2 = Saint Petersburg, 54 = Yekaterinburg, 65 = Novosibirsk, 43 = Kazan, 47 = Nizhny Novgorod. It changes which results and ads come back (local results rank higher); it does not translate them. Empty = Yandex's default for a visitor in Turkey. Or pick one by name below."
          },
          "regionPreset": {
            "title": "Region by name",
            "enum": [
              "983",
              "11508",
              "11503",
              "11505",
              "11511",
              "11504",
              "11501",
              "11510",
              "11507",
              "225",
              "213",
              "2",
              "54",
              "65",
              "43",
              "47",
              "35",
              "51",
              "172",
              "50",
              "193"
            ],
            "type": "string",
            "description": "The same region number picked by name. A number typed in Region (lr) wins."
          },
          "maxResultsPerQuery": {
            "title": "Results per search",
            "minimum": 0,
            "type": "integer",
            "description": "How many rows to deliver for each search (organic results, plus ads and Yandex blocks when they are on). 0 = every page Yandex serves, up to 25 pages.",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Optional: stop after this many results pages for each search (about 10 organic results a page). Empty = as many as Results per search needs, up to 25."
          },
          "startPage": {
            "title": "Start page",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Optional: begin at this results page (1 = the first). Positions then count from that page (page 3 starts at position 21)."
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 1,
            "type": "integer",
            "description": "Optional: stop the whole run after this many rows, across every search. Every delivered row is one charged result, so this is also a budget cap."
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Deliver Yandex Direct ads (type ad) with their label, the advertiser's site (domain), the shown address and Yandex's click link. Off = organic results and blocks only.",
            "default": true
          },
          "includeFeatured": {
            "title": "Include Yandex blocks",
            "type": "boolean",
            "description": "Deliver Yandex's own blocks between the results (type featured): product tiles, the AI answer, images, video, services, places. They take a position on the page, which matters for rank tracking.",
            "default": true
          },
          "includeSidebar": {
            "title": "Include right column",
            "type": "boolean",
            "description": "Also deliver the blocks of the right-hand column (entity card, places) as featured rows with inSidebar = true (no position). Pages are then read to the end.",
            "default": false
          },
          "includeQuerySummary": {
            "title": "Add a free summary row per search",
            "type": "boolean",
            "description": "One free row per search (type querySummary): pages read and refused, rows delivered, organic results, ads and blocks seen, Yandex's spelling correction, the right column and your tracked domains' positions. Always added when Track domains is set.",
            "default": false
          },
          "timeRange": {
            "title": "Time window",
            "enum": [
              "any",
              "day",
              "twoWeeks",
              "month"
            ],
            "type": "string",
            "description": "Only pages Yandex dates within this window (the search form's own three windows).",
            "default": "any"
          },
          "sortByDate": {
            "title": "Newest first",
            "type": "boolean",
            "description": "Order the results by date instead of relevance (Yandex's how=tm). Ranks then mean freshness: leave it off for rank tracking.",
            "default": false
          },
          "resultsLanguage": {
            "title": "Results language",
            "type": "array",
            "description": "Optional: only pages in these languages, as two-letter codes (tr, en, ru, de, fr). Yandex's lang filter.",
            "items": {
              "type": "string"
            }
          },
          "safeSearch": {
            "title": "Family filter",
            "type": "boolean",
            "description": "Yandex's strict family filter (drops adult pages). Off = Yandex's usual setting.",
            "default": false
          },
          "noAutocorrect": {
            "title": "No autocorrect",
            "type": "boolean",
            "description": "When a query looks misspelt Yandex searches its correction and correctedQuery says so. On = search exactly what you typed (Yandex's noreask).",
            "default": false
          },
          "trackDomains": {
            "title": "Track domains",
            "type": "array",
            "description": "Optional: your domains and your competitors' (one per line). Their rows get isTracked = true, and the free summary row of each search lists the best position each one holds (null = not in the pages read).",
            "items": {
              "type": "string"
            }
          },
          "excludeDomains": {
            "title": "Exclude domains",
            "type": "array",
            "description": "Optional: one domain per line; rows from these sites (and their subdomains) are dropped before delivery and not charged. Positions still count them.",
            "items": {
              "type": "string"
            }
          },
          "dedupeAcrossQueries": {
            "title": "Each address once across searches",
            "type": "boolean",
            "description": "Deliver an organic address only for the first search that finds it.",
            "default": false
          },
          "monitorMode": {
            "title": "Compare with the last run",
            "type": "boolean",
            "description": "Tag every result with its change since the last run of the same searches: changeType new (not seen before), moved (organic rank changed by Minimum move or more, with previousPosition) or same. Every result is delivered and charged as usual, so a scheduled run is a rank history. Only-new delivery is not offered.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Comparison memory name",
            "type": "string",
            "description": "Name of the memory kept between runs; use a different name to keep separate histories for the same searches.",
            "default": "yandex-search-monitor"
          },
          "monitorMinPositionChange": {
            "title": "Minimum move",
            "minimum": 1,
            "type": "integer",
            "description": "An organic result is tagged moved when its organic rank changed by at least this many places since the last run.",
            "default": 3
          },
          "compact": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Fewer fields per row: type, query, page, position, organicPosition, title, url, domain, snippet, isTracked, changeType, servedDomain, region, searchKey, scrapedAt.",
            "default": false
          },
          "failIfEmpty": {
            "title": "Fail when empty",
            "type": "boolean",
            "description": "A run that delivers nothing ends FAILED (for schedules and webhooks that watch the run status). Off = it ends with a message that says why.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Searches at once",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches are read at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional, and not needed. By default each page is asked on a fresh Apify datacenter address, then on Apify residential addresses in Turkey; an address Yandex refuses is never asked again. Give your own proxy URLs to use those instead."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}