Web Search
curl --request GET \
--url https://scrapebadger.com/v1/yandex/search \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/yandex/search"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/yandex/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yandex/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yandex/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yandex/search")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yandex/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query": "<string>",
"domain": "<string>",
"region_lr": 123,
"lang": "<string>",
"page": 123,
"search_url": "<string>",
"total_results": 123,
"spellcheck": "<string>",
"result_count": 123,
"organic_results": [
{
"position": 123,
"title": "<string>",
"url": "<string>",
"displayed_url": "<string>",
"domain": "<string>",
"snippet": "<string>",
"favicon": "<string>",
"sitelinks": [
{}
]
}
],
"ads": [
{}
],
"inline_images": [
{}
],
"inline_videos": [
{}
],
"knowledge_graph": {},
"related_searches": [
"<string>"
],
"pagination": {}
}Search
Web Search
Search the Yandex web SERP — organic results, ads, inline images and videos, related searches and pagination.
GET
/
v1
/
yandex
/
search
Web Search
curl --request GET \
--url https://scrapebadger.com/v1/yandex/search \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/yandex/search"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/yandex/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yandex/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yandex/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yandex/search")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yandex/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"query": "<string>",
"domain": "<string>",
"region_lr": 123,
"lang": "<string>",
"page": 123,
"search_url": "<string>",
"total_results": 123,
"spellcheck": "<string>",
"result_count": 123,
"organic_results": [
{
"position": 123,
"title": "<string>",
"url": "<string>",
"displayed_url": "<string>",
"domain": "<string>",
"snippet": "<string>",
"favicon": "<string>",
"sitelinks": [
{}
]
}
],
"ads": [
{}
],
"inline_images": [
{}
],
"inline_videos": [
{}
],
"knowledge_graph": {},
"related_searches": [
"<string>"
],
"pagination": {}
}Search Yandex’s web SERP. Organic results carry the resolved destination URL
(Yandex’s
/r?u= tracking redirects are decoded), displayed URL, domain,
snippet, favicon and sitelinks.
Credits: 7
Authorization
Query Parameters
Yandex domain:
tr (yandex.com.tr, the default — reliably clears anti-bot),
com, ru, by, kz, uz. com/ru have a lower success rate. See
/markets.Response
Ads served for this query, when present (
position, title, url, displayed_url, domain, snippet, sitelinks).Video results shown inline (
title, url, source, channel, duration, views, date, thumbnail).Example
curl "https://scrapebadger.com/v1/yandex/search?query=coffee+machine&domain=tr" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/yandex/search?" +
new URLSearchParams({ query: "coffee machine", domain: "tr" }),
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/yandex/search",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"query": "coffee machine", "domain": "tr"},
)
data = res.json()
Response
{
"query": "coffee machine",
"domain": "tr",
"region_lr": 11508,
"lang": "tr",
"page": 1,
"search_url": "https://yandex.com.tr/search/?text=coffee+machine",
"total_results": 14000000,
"spellcheck": null,
"result_count": 10,
"organic_results": [
{
"position": 1,
"title": "Coffee Machines — Buyer's Guide",
"url": "https://www.example.com/coffee-machines",
"displayed_url": "example.com › coffee-machines",
"domain": "example.com",
"snippet": "Compare drip, espresso and bean-to-cup machines...",
"favicon": "https://favicon.yandex.net/favicon/example.com",
"sitelinks": []
}
],
"ads": [],
"inline_images": [],
"inline_videos": [],
"knowledge_graph": null,
"related_searches": ["best coffee machine", "espresso machine"],
"pagination": { "current": 1, "next_url": "https://yandex.com.tr/search/?text=coffee+machine&p=1", "other_pages": {} }
}
Anti-bot
Keep
domain=tr. yandex.com and yandex.ru serve SmartCaptcha far more
often and return 422 (not billed). The scraper retries on a fresh exit, but
the tr domain clears most reliably.
