Basic API Requests
Web scraping Yandex Search results is now as easy as sending a GET request to our API. We handle the SERP results scraping, you handle the data we extract.
Last updated
Web scraping Yandex Search results is now as easy as sending a GET request to our API. We handle the SERP results scraping, you handle the data we extract.
Last updated
The SERP API is the engine on which our Yandex Scraping API is running. Being an extension of the SERP API, the Yandex API only accepts GET requests. There are mainly three required you need to pass to the official SERP API endpoint in order to extract real time Yandex results:
api_key
- Your , used to authenticate your requests
engine
- always set to yandex
for this API
text
- The keyword you are targeting
The most basic URL example for an authorised request on our Yandex API is:
https://serpapi.webscrapingapi.com/v1?engine=yandex&api_key=<YOUR_API_KEY>&text=<KEYWORD>
The text
parameter might need to be URL encoded, depending on the technologies used in your Yandex scraping project.
curl --request GET --url "https://serpapi.webscrapingapi.com/v1?engine=yandex&api_key=YOUR_API_KEY&text=rocket"
const http = require("https");
const options = {
"method": "GET",
"hostname": "serpapi.webscrapingapi.com",
"port": null,
"path": "/v1?engine=yandex&api_key=YOUR_API_KEY&text=rocket",
"headers": {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
import requests
API_KEY = '<YOUR_API_KEY>'
SCRAPER_URL = 'https://serpapi.webscrapingapi.com/v1'
PARAMS = {
"api_key":API_KEY,
"engine":"bing",
"q":"shoes"
}
response = requests.get(SCRAPER_URL, params=PARAMS)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://serpapi.webscrapingapi.com/v1?engine=bing&api_key=YOUR_API_KEY&q=shoes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/ioutil"
)
func main() {
url := "https://serpapi.webscrapingapi.com/v1?engine=bing&api_key=YOUR_API_KEY&q=shoes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://serpapi.webscrapingapi.com/v1?engine=bing&api_key=YOUR_API_KEY&q=shoes")
.asString();
var client = new RestClient("https://serpapi.webscrapingapi.com/v1?engine=bing&api_key=YOUR_API_KEY&q=shoes");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://serpapi.webscrapingapi.com/v1?engine=bing&api_key=YOUR_API_KEY&q=shoes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
{
"search_parameters": {
"yandex_url": "https://yandex.com/search/?text=rocket&sourceid=chrome&ie=UTF-8",
"engine": "yandex",
"yandex_domain": "yandex.com",
"device": "desktop",
"query": "rocket"
},
"search_information": {
"organic_results_state": "Results for exact spelling",
"total_results": 4,
"query_displayed": "rocket"
},
"organic_results": [
{
"title": "Rocket Skywalker - YouTube",
"link": "https://www.youtube.com/channel/UCGG0SdDxTN-44ZSYULxoiyA",
"displayed_link": "youtube.com",
"snippet": "Канал \"Rocket Skywalker\" на YouTube. ROCKET SKYWALKER. THE ONE AND ONLY.",
"position": 1
},
{
"title": "ROCKET — ВКонтакте",
"link": "https://vk.com/rocketskywalker",
"displayed_link": "vk.com",
"snippet": "Subscribers295 thsdAbout«Ego Trippin'» OUT NOW Apple Music apple.co/2ETMnku BOOM vk.cc/8OYLZK Spotify spoti.fi/2ZjZfrh YouTube Music...Read more",
"position": 2
},
{
"title": "ROCKET — Instagram",
"link": "https://www.instagram.com/rocketskywalker/",
"displayed_link": "instagram.com",
"snippet": "Subscribers309 thsdAboutmgmt: rckt@harvestx.pro",
"position": 3
},
{
"title": "Rocket - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Rocket",
"displayed_link": "en.wikipedia.org",
"position": 4
},
{
"title": "Videos matching \"rocket\"",
"link": "//yandex.com/video/search?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs",
"position": 5
},
{
"title": "Rocket: музыка, видео, статистика и фотографии | Last.fm",
"link": "https://www.last.fm/ru/music/Rocket",
"displayed_link": "last.fm",
"position": 6
},
{
"title": "ROCKET",
"link": "https://rocketskywalker.one/",
"displayed_link": "rocketskywalker.one",
"position": 7
},
{
"title": "Rocket cкачать бесплатно в mp3 | слушать музыку онлайн...",
"link": "https://musify.club/artist/rocket-207644",
"displayed_link": "musify.club",
"position": 8
},
{
"title": "Rocket - слушать все песни бесплатно - mp3ha.org",
"link": "https://mp3ha.org/collection/artist/rocket",
"displayed_link": "mp3ha.org",
"position": 9
},
{
"title": "Rocket – биография, фото рэпера, песни, личная жизнь...",
"link": "https://artchange.ru/publ/photo_biography/musical_artists/rocket/16-1-0-632",
"displayed_link": "artchange.ru",
"position": 10
},
{
"title": "Rocket: 2712 песен скачать бесплатно в mp3 и слушать...",
"link": "https://z2.fm/artist/204650",
"displayed_link": "z2.fm",
"position": 11
}
],
"inline_videos": [
{
"link": "//yandex.com/video/preview/?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs&filmId=222669878257216078",
"title": "Every SpaceX rocket landing attempt | Facebook",
"position": 1
},
{
"link": "//yandex.com/video/preview/?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs&filmId=3659939306700612868",
"title": "A Career at Rocket Lab",
"position": 2
},
{
"link": "//yandex.com/video/preview/?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs&filmId=1257084277439210976",
"title": "Cotic Rocket",
"position": 3
},
{
"link": "//yandex.com/video/preview/?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs&filmId=13414693666768194210",
"title": "Rocket Espresso - Extraction in Rocket Espresso Milano",
"position": 4
},
{
"link": "//yandex.com/video/preview/?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs&filmId=10226751937303661598",
"title": "\"how hard can it be\" Hybrid Rocket - whole show in HD",
"position": 5
},
{
"link": "//yandex.com/video/search?text=rocket&path=wizard&parent-reqid=1628172846889623-3699467565859716215-man1-2688-c8b-man-l7-balancer-8080-BAL-5643&wiz_type=v4thumbs",
"position": 6
}
],
"knowledge_graph": {
"title": "Rocket",
"source": {
"link": "https://www.youtube.com/c/rocketskywalker",
"title": "YouTube"
},
"genre": "Russian hip hop",
"participants": "Ray Rock",
"cast": [
{
"link": "/search/?text=Rocket%20Rocket&lr=21411&noreask=1&ento=0oCgp5YW0wMjU3MjU4EhB5YW0xNzc2MzA1Mjpwcm9qGANCBnJvY2tldJQ1tFU",
"image": "//avatars.mds.yandex.net/get-entity_search/1731127/390187414/S76x76Smart_2x",
"name": "Rocket"
},
{
"link": "/search/?text=BOMB%20Rocket&lr=21411&noreask=1&ento=0oCgx5YW0wMTQ1NTQ1MjISEHlhbTE3NzYzMDUyOnByb2oYA0IGcm9ja2V0puidaA",
"image": "//avatars.mds.yandex.net/get-entity_search/2338423/484748732/S76x76Smart_2x",
"name": "BOMB"
},
{
"link": "/search/?text=Lost%20Rocket&lr=21411&noreask=1&ento=0oCgt5YW0wNzkwMDIxMxIQeWFtMTc3NjMwNTI6cHJvahgDQgZyb2NrZXSUWFv7",
"image": "//avatars.mds.yandex.net/get-entity_search/2340476/445781500/S76x76Smart_2x",
"name": "Lost"
},
{
"link": "/search/?text=Interstellar%20Rocket&lr=21411&noreask=1&ento=0oCgt5YW0wNDUyMjkxMhIQeWFtMTc3NjMwNTI6cHJvahgDQgZyb2NrZXQKIH-7",
"image": "//avatars.mds.yandex.net/get-entity_search/372318/289051224/S76x76Smart_2x",
"name": "Interstellar"
},
{
"link": "/search/?text=Giants%20Rocket&lr=21411&noreask=1&ento=0oCgx5YW0wMTM3NjYzNzISEHlhbTE3NzYzMDUyOnByb2oYA0IGcm9ja2V0lx44cw",
"image": "//avatars.mds.yandex.net/get-entity_search/1580443/482139470/S76x76Smart_2x",
"name": "Giants"
},
{
"link": "/search/?text=Gravity%20G.%20Van%20Offenbeek&lr=21411&noreask=1&ento=0oCgx5YW0wMTQ1MTgyNDESEHlhbTE3NzYzMDUyOnByb2oYA0IGcm9ja2V0-7L7Nw",
"image": "//avatars.mds.yandex.net/get-entity_search/1667736/484728778/S76x76Smart_2x",
"name": "Gravity"
},
{
"link": "/search/?text=Iceberg%20Rocket&lr=21411&noreask=1&ento=0oCgt5YW0wMjg0MjQyNhIQeWFtMTc3NjMwNTI6cHJvahgDQgZyb2NrZXSrcLa3",
"image": "https://yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif",
"name": "Iceberg"
},
{
"link": "/search/?text=Spirit%20TySavage&lr=21411&noreask=1&ento=0oCgt5YW0wOTgwNTQ1NBIQeWFtMTc3NjMwNTI6cHJvahgDQgZyb2NrZXRl2TLI",
"image": "https://yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif",
"name": "Spirit"
},
{
"link": "/search/?text=Breeze%20LILDRUGHILL&lr=21411&noreask=1&ento=0oCgx5YW0wMTA2NTQ1NjcSEHlhbTE3NzYzMDUyOnByb2oYA0IGcm9ja2V0XAaDXw",
"image": "https://yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif",
"name": "Breeze"
},
{
"link": "/search/?text=Attention%20Zo&lr=21411&noreask=1&ento=0oCgx5YW0wMTcwNDA0ODMSEHlhbTE3NzYzMDUyOnByb2oYA0IGcm9ja2V0l1j-kw",
"image": "https://yastatic.net/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif",
"name": "Attention"
},
{
"link": "/search/?text=rocket%20albums&lr=21411&noreask=1&ento=0oEhB5YW0xNzc2MzA1Mjpwcm9qGANCBnJvY2tldNpVzVk"
}
]
},
"pagination": {
"other_pages": {
"": "https://yandex.com/search/?text=rocket&lr=21411&p=4"
},
"next": "https://yandex.com/search/?text=rocket&lr=21411&p=1",
"current": null
},
"searchdata_pagination": {
"current": null,
"next": "https://serpapi.webscrapingapi.com/v1?text=rocket&lr=21411&p=1",
"other_pages": {
"": "https://serpapi.webscrapingapi.com/v1?text=rocket&lr=21411&p=4"
}
}
}