Requêtes de base de l'API Bing SERP
Requête minimale
Section intitulée « Requête minimale »curl "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=shoes"import requests
params = { "engine": "bing", "api_key": "YOUR_API_KEY", "q": "shoes",}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: 'bing', api_key: 'YOUR_API_KEY', q: 'shoes',});const data = await (await fetch(url)).json();console.log(data.organic_results.slice(0, 3));Recherche mobile localisée
Section intitulée « Recherche mobile localisée »curl "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=pizzeria&location=Rome%2C+Italy&cc=IT&setLang=it-IT&device=mobile"params = { "engine": "bing", "api_key": "YOUR_API_KEY", "q": "pizzeria", "location": "Rome, Italy", "cc": "IT", "setLang": "it-IT", "device": "mobile",}r = requests.get("https://serp.shifter.io/v1", params=params)const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'bing', api_key: 'YOUR_API_KEY', q: 'pizzeria', location: 'Rome, Italy', cc: 'IT', setLang: 'it-IT', device: 'mobile',});Pagination
Section intitulée « Pagination »Bing effectue la pagination avec first (décalage des résultats) et count (résultats par page, 10 par défaut).
# Page 1 (results 1-10)curl "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=news&first=1&count=10"
# Page 2 (results 11-20)curl "https://serp.shifter.io/v1?engine=bing&api_key=YOUR_API_KEY&q=news&first=11&count=10"