Requêtes de base de l'API SERP Yandex
Requête minimale
Section intitulée « Requête minimale »curl "https://serp.shifter.io/v1?engine=yandex&api_key=YOUR_API_KEY&q=proxy"import requests
params = { "engine": "yandex", "api_key": "YOUR_API_KEY", "q": "proxy",}r = requests.get("https://serp.shifter.io/v1", params=params)print(r.json()["organic_results"][:3])import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'yandex', api_key: 'YOUR_API_KEY', q: 'proxy',});const data = await (await fetch(url)).json();console.log(data.organic_results.slice(0, 3));Recherche ciblée en russe à Saint-Pétersbourg
Section intitulée « Recherche ciblée en russe à Saint-Pétersbourg »curl "https://serp.shifter.io/v1?engine=yandex&api_key=YOUR_API_KEY&q=рестораны&lr=2&lang=ru"params = { "engine": "yandex", "api_key": "YOUR_API_KEY", "q": "рестораны", "lr": 2, "lang": "ru",}r = requests.get("https://serp.shifter.io/v1", params=params)const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'yandex', api_key: 'YOUR_API_KEY', q: 'рестораны', lr: 2, lang: 'ru',});Pagination
Section intitulée « Pagination »Yandex effectue la pagination avec p (numéro de page indexé à partir de 0).
# Page 1 (résultats 1-10)curl "https://serp.shifter.io/v1?engine=yandex&api_key=YOUR_API_KEY&q=news&p=0"
# Page 2 (résultats 11-20)curl "https://serp.shifter.io/v1?engine=yandex&api_key=YOUR_API_KEY&q=news&p=1"