Les données doivent être envoyées dans un tableau JSON. Chaque élément doit contenir les champs suivants.
Limite
Le tableau JSON peut contenir 100 éléments, vous pouvez donc créer 100 scrapes de SERPs en un seul appel.
post
https://api.semscraper.com/v1/serp
https://api.semscraper.com/v1/serp
Autorisations : Bearer {api_key}
Paramètres
search_engine
Requis
string
Choix du moteur de recherche :
Google Recherche (valeur : google_search)
keyword
Requis
string
Mots-clés à rechercher sur le moteur de recherche
device
Requis
string
Choix du support :
Ordinateur (valeur : desktop)
Mobile (valeur : mobile)
depth
Requis
integer
Profondeur de pages, nous récupérons les SERPs Google avec pagination. Ce paramètre doit être compris entre 1 (environ 10 résultats) et 10 (environ 100 résultats).
location
Requis
string
Code de localisation du moteur de recherche
language
Requis
string
Langue du moteur de recherche
geolocation
string
Permet de géolocaliser une SERP Google. Vous pouvez par exemple indiquer la ville, département, pays, séparer par une virgule.
priority
integer
Permet de prioriser vos demandes, elles sont traitées par priorité décroissante. Valeur entre 1 (low) et 10 (high).
callback_url
string
Permet d'indiquer une URL sur laquelle nous allons vous envoyer les résultats du mot-clé une fois celui-ci traité.
Types de blocs de résultats
Valeurs possibles du champ type. Un bloc n'est présent dans la réponse que si Google l'affiche pour le mot-clé demandé.
Résultats et annonces
organic
Résultat naturel
Résultat naturel de la recherche.
sitelinks
Liens de site
Lien secondaire rattaché à un résultat naturel.
paid_top
Annonce en haut
Annonce payante au-dessus des résultats naturels.
paid_bottom
Annonce en bas
Annonce payante sous les résultats naturels.
Blocs enrichis
featured_snippet
Position zéro
Extrait mis en avant au-dessus des résultats naturels.
knowledge_graph
Panneau de connaissance
Élément du panneau affiché à droite de la SERP.
images
Images
Vignette du bloc d'images.
videos
Vidéos
Vidéo du bloc vidéos.
top_stories
Actualités
Article du bloc actualités.
shopping
Shopping
Produit du carrousel Google Shopping.
recipes
Recettes
Recette du bloc recettes.
local_pack
Bloc local
Établissement du bloc local, issu de Google Maps.
visual_digest
Résumé visuel
Élément du résumé visuel généré par Google.
Suggestions et rebonds
people_also_ask
Autres questions posées
Question du bloc Autres questions posées.
related_searches
Recherches associées
Recherche associée proposée en bas de page.
find_results_on
Trouver des résultats sur
Lien du bloc Trouver des résultats sur.
location_sites
Sites de localisation
Site listé dans un bloc lié à une localisation.
AI Overview
ai_overview_citation
Citation
Marque citée dans le texte généré par l'IA.
ai_overview_citation_source
Source de citation
Source d'une citation, visible au survol de celle-ci.
Les données doivent être envoyées dans un tableau JSON. Chaque élément doit contenir les champs suivants.
Limite
Le tableau JSON peut contenir 100 éléments, vous pouvez donc créer 100 scrapes de SERPs en un seul appel.
post
https://api.semscraper.com/v1/serp
https://api.semscraper.com/v1/serp
Autorisations : Bearer {api_key}
Paramètres
search_engine
Requis
string
Choix du moteur de recherche :
Google Maps (valeur : google_maps)
keyword
Requis
string
Mots-clés à rechercher sur le moteur de recherche
depth
Requis
integer
Profondeur de pages, nous récupérons les SERPs Google avec pagination. Ce paramètre doit être compris entre 1 (environ 10 résultats) et 10 (environ 100 résultats).
location
Requis
string
Code de localisation du moteur de recherche
language
Requis
string
Langue du moteur de recherche
geolocation
string
Permet de géolocaliser une SERP Google. Vous pouvez par exemple indiquer la ville, département, pays, séparer par une virgule.
priority
integer
Permet de prioriser vos demandes, elles sont traitées par priorité décroissante. Valeur entre 1 (low) et 10 (high).
callback_url
string
Permet d'indiquer une URL sur laquelle nous allons vous envoyer les résultats du mot-clé une fois celui-ci traité.
Liste des identifiants (ID) des SERP terminées que vous n'avez pas encore récupérés.
Cette méthode vous permet d’obtenir les IDs de toutes les SERP déjà traitées mais encore jamais récupérées. Vous pourrez ensuite appeler la méthode de récupération des SERP en utilisant ces IDs.
Choix du format de sortie :
JSON (valeur : json)
HTML (valeur : html)
Format de résultat
Google Search
Google Maps
type
string
Type de bloc de résultat (organic, videos, images, people_also_ask, local_pack...)
rank_type
integer
Position de l'élément au sein de son propre type de bloc (ex : 3ème résultat organique = 3)
rank_serp
integer
Position absolue dans la SERP complète, tous blocs confondus, selon la position verticale réelle sur la page (au pixel)
page
integer
Numéro de page de la SERP où apparaît l'élément
pixel
integer
Position verticale de l'élément sur la page, en pixels depuis le haut
domain
string
Domaine de l'URL
url
string
URL du résultat
title
string
Titre affiché du résultat
description
string
Description / extrait affiché du résultat
brand
string
Marque citée ou libellé de la source tel que Google l'affiche. Uniquement sur les blocs ai_overview_citation, ai_overview_citation_source et ai_overview_panel. Sur une citation, l'URL est souvent vide : la marque est alors la seule information de l'élément.
visible
boolean
Élément affiché d'emblée dans l'AI Overview (true) ou visible seulement après dépliage (false). Uniquement sur les blocs AI Overview. Toujours false pour ai_overview_citation_source, qui n'apparaît qu'au survol d'une citation.
rank_type
integer
Position de l'élément au sein de son propre type de bloc (ex : 3ème résultat organique = 3)
rank_serp
integer
Position absolue dans la SERP complète, tous blocs confondus, selon la position verticale réelle sur la page (au pixel)
page
integer
Numéro de page de la SERP où apparaît l'élément
pixel
integer
Position verticale de l'élément sur la page, en pixels depuis le haut
title
string
Titre affiché du résultat
cid
string
Identifiant Google (CID) de la fiche établissement
reviews
integer
Nombre d'avis
rating
float
Note moyenne sur 5
website
string
Site web de l'établissement
type
string
Catégorie de l'établissement (ex : Restaurant)
address
string
Adresse postale
status_label
string
Statut d'ouverture (ex : Ouvert, Fermé)
status_detail
string
Détail du statut (ex : horaires)
comment
string
Commentaire / extrait affiché
images
array
Liste des images de la fiche
Requête
Réponse réussie
Réponse d’erreur
Status: 200 OK
{
"status": "success",
"request_ms": 41,
"count": 1,
"data": [
{
"id": "SERP_ID",
"status": "done",
"keyword": "example keyword",
"device": "desktop",
"location": "fr",
"language": "fr",
"depth": 1,
"geolocation": false,
"priority": 1,
"callback_url": "",
"cost": "0.00002",
"created_at": "2025-09-10T12:32:56Z",
"scraped_at": "2025-09-10T12:33:02Z",
"duration_ms": 5403,
"serp_info": {
"result_count": 1500000000
},
"results": [
{
"type": "people_also_ask",
"items": [
{
"rank_type": 1,
"rank_serp": 4,
"page": 1,
"pixel": 806,
"domain": "guides.lib.uh.edu",
"url": "https://guides.lib.uh.edu/c.php?g\\x3d1249281",
"title": "What is a keyword example?",
"description": ""
},
{
"rank_type": 2,
"rank_serp": 5,
"page": 1,
"pixel": 858,
"domain": "toolsqa.com",
"url": "https://toolsqa.com/cucumber/data-driven-testing-using-examples-keyword/",
"title": "What is the example keyword used for?",
"description": ""
},
{
"rank_type": 3,
"rank_serp": 6,
"page": 1,
"pixel": 911,
"domain": "www.editage.com",
"url": "https://www.editage.com/insights/how-to-create-keywords-for-a-research-paper",
"title": "How do you write keywords examples?",
"description": ""
},
{
"rank_type": 4,
"rank_serp": 7,
"page": 1,
"pixel": 964,
"domain": "libguides.lvc.edu",
"url": "https://libguides.lvc.edu/c.php?g\\x3d1152118\\x26ampp\\x3d8409030",
"title": "What is an example of a keyword search?",
"description": ""
}
]
},
{
"type": "videos",
"items": [
{
"rank_type": 1,
"rank_serp": 1,
"page": 1,
"pixel": 223,
"domain": "www.youtube.com",
"url": "https://www.youtube.com/watch?v=H-B5oFJjL8I",
"title": "What are Keywords and How to Choose Them? 1.1. SEO ...",
"description": ""
},
{
"rank_type": 2,
"rank_serp": 2,
"page": 1,
"pixel": 374,
"domain": "www.youtube.com",
"url": "https://www.youtube.com/watch?v=TTlEVVB75wo&pp=2AEAkAIB",
"title": "What Are Keywords? Everything You Need To Know (and more)",
"description": ""
},
{
"rank_type": 3,
"rank_serp": 3,
"page": 1,
"pixel": 526,
"domain": "www.youtube.com",
"url": "https://www.youtube.com/watch?v=OMJQPqG2Uas",
"title": "Keyword Research Tutorial: From Start to Finish",
"description": ""
}
]
},
{
"type": "organic",
"items": [
{
"rank_type": 1,
"rank_serp": 8,
"page": 1,
"pixel": 1077,
"domain": "www.seoquantum.com",
"url": "https://www.seoquantum.com/en/blog/6-types-keywords-organic-seo",
"title": "The 6 Types of Keywords in Organic SEO",
"description": "2 mars 2024 — I will introduce you to 6 types of keywords that you absolutely need to know. We will start with the most common ones such as long-tail keywords and then move ..."
},
{
"rank_type": 2,
"rank_serp": 9,
"page": 1,
"pixel": 1223,
"domain": "storychief.io",
"url": "https://storychief.io/blog/seo-keyword-research-examples",
"title": "10 Clever SEO Keyword Research Examples",
"description": "Let's say you run a food blog. Some potential SEO keywords could be: quick weeknight dinners easy dinner recipes 30 minute meals one pot dinners"
},
{
"rank_type": 3,
"rank_serp": 10,
"page": 1,
"pixel": 1369,
"domain": "www.indeed.com",
"url": "https://www.indeed.com/career-advice/career-development/types-of-keywords",
"title": "19 Types of Keywords",
"description": "6 juin 2025 — 19 types of keywords and how to use them for marketing · 1. Market segment keywords · 2. Customer-defining keywords · 3. Product-defining ..."
},
{
"rank_type": 4,
"rank_serp": 11,
"page": 1,
"pixel": 1515,
"domain": "www.usg.edu",
"url": "https://www.usg.edu/galileo/skills/unit04/primer04_07.phtml",
"title": "Keyword Search",
"description": "In this case, the phrase alternative fuels and automobiles are the significant keywords."
},
{
"rank_type": 5,
"rank_serp": 12,
"page": 1,
"pixel": 1639,
"domain": "guides.lib.uh.edu",
"url": "https://guides.lib.uh.edu/c.php?g=1249281",
"title": "What are keywords and why are they important? - Guides",
"description": "You probably used the title of the film and the word “showtimes” as your keywords to bring up the results you needed. Keywords in academic research are similar."
},
{
"rank_type": 6,
"rank_serp": 13,
"page": 1,
"pixel": 1785,
"domain": "www.tactee.fr",
"url": "https://www.tactee.fr/seo/strategie-seo/keyword-seo/",
"title": "Qu'est ce qu'un keyword SEO ? [Définition & conseil]",
"description": "13 juil. 2024 — Commerciale : l'utilisateur compare des produits ou des services, par exemple « meilleur smartphone 2024 ». Identifier l'intention de recherche ..."
},
{
"rank_type": 7,
"rank_serp": 14,
"page": 1,
"pixel": 1931,
"domain": "backlinko.com",
"url": "https://backlinko.com/types-of-keywords",
"title": "10 Types of Keywords with Examples (+ How to Find Them)",
"description": "15 mai 2025 — 10 Types of Keywords with Examples (+ How to Find Them) · 1. Seed Keywords · 2. Informational Keywords · 3. Commercial Keywords · 4."
},
{
"rank_type": 8,
"rank_serp": 15,
"page": 1,
"pixel": 2077,
"domain": "learn.microsoft.com",
"url": "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/",
"title": "C# Keywords and contextual keywords - C# reference",
"description": "17 avr. 2025 — For example, @if is a valid identifier, but if isn't because if is a keyword. The first table in this article lists keywords that are ..."
}
]
},
{
"type": "images",
"items": [
{
"rank_type": 1,
"rank_serp": 16,
"page": 1,
"pixel": 2311,
"domain": "searchfacts.com",
"url": "https://searchfacts.com/what-are-keywords-in-seo/",
"title": "",
"description": ""
},
{
"rank_type": 2,
"rank_serp": 17,
"page": 1,
"pixel": 2311,
"domain": "backlinko.com",
"url": "https://backlinko.com/hub/seo/seo-keywords",
"title": "",
"description": ""
},
{
"rank_type": 3,
"rank_serp": 18,
"page": 1,
"pixel": 2311,
"domain": "ahrefs.com",
"url": "https://ahrefs.com/blog/what-are-keywords/",
"title": "",
"description": ""
}
]
}
]
}
]
}
{
"status": "success",
"request_ms": 41,
"count": 1,
"data": [
{
"id": "SERP_ID",
"status": "done",
"keyword": "example keyword",
"device": "desktop",
"location": "fr",
"language": "fr",
"depth": 1,
"geolocation": false,
"priority": 1,
"callback_url": "",
"cost": "0.00002",
"created_at": "2025-09-10T12:32:56Z",
"scraped_at": "2025-09-10T12:33:02Z",
"duration_ms": 5403,
"serp_info": {
"result_count": 1500000000
},
"results": [
{
"type": "people_also_ask",
"items": [
{
"rank_type": 1,
"rank_serp": 4,
"page": 1,
"pixel": 806,
"domain": "guides.lib.uh.edu",
"url": "https://guides.lib.uh.edu/c.php?g\\x3d1249281",
"title": "What is a keyword example?",
"description": ""
},
{
"rank_type": 2,
"rank_serp": 5,
"page": 1,
"pixel": 858,
"domain": "toolsqa.com",
"url": "https://toolsqa.com/cucumber/data-driven-testing-using-examples-keyword/",
"title": "What is the example keyword used for?",
"description": ""
},
{
"rank_type": 3,
"rank_serp": 6,
"page": 1,
"pixel": 911,
"domain": "www.editage.com",
"url": "https://www.editage.com/insights/how-to-create-keywords-for-a-research-paper",
"title": "How do you write keywords examples?",
"description": ""
},
{
"rank_type": 4,
"rank_serp": 7,
"page": 1,
"pixel": 964,
"domain": "libguides.lvc.edu",
"url": "https://libguides.lvc.edu/c.php?g\\x3d1152118\\x26ampp\\x3d8409030",
"title": "What is an example of a keyword search?",
"description": ""
}
]
},
{
"type": "videos",
"items": [
{
"rank_type": 1,
"rank_serp": 1,
"page": 1,
"pixel": 223,
"domain": "www.youtube.com",
"url": "https://www.youtube.com/watch?v=H-B5oFJjL8I",
"title": "What are Keywords and How to Choose Them? 1.1. SEO ...",
"description": ""
},
{
"rank_type": 2,
"rank_serp": 2,
"page": 1,
"pixel": 374,
"domain": "www.youtube.com",
"url": "https://www.youtube.com/watch?v=TTlEVVB75wo&pp=2AEAkAIB",
"title": "What Are Keywords? Everything You Need To Know (and more)",
"description": ""
},
{
"rank_type": 3,
"rank_serp": 3,
"page": 1,
"pixel": 526,
"domain": "www.youtube.com",
"url": "https://www.youtube.com/watch?v=OMJQPqG2Uas",
"title": "Keyword Research Tutorial: From Start to Finish",
"description": ""
}
]
},
{
"type": "organic",
"items": [
{
"rank_type": 1,
"rank_serp": 8,
"page": 1,
"pixel": 1077,
"domain": "www.seoquantum.com",
"url": "https://www.seoquantum.com/en/blog/6-types-keywords-organic-seo",
"title": "The 6 Types of Keywords in Organic SEO",
"description": "2 mars 2024 — I will introduce you to 6 types of keywords that you absolutely need to know. We will start with the most common ones such as long-tail keywords and then move ..."
},
{
"rank_type": 2,
"rank_serp": 9,
"page": 1,
"pixel": 1223,
"domain": "storychief.io",
"url": "https://storychief.io/blog/seo-keyword-research-examples",
"title": "10 Clever SEO Keyword Research Examples",
"description": "Let's say you run a food blog. Some potential SEO keywords could be: quick weeknight dinners easy dinner recipes 30 minute meals one pot dinners"
},
{
"rank_type": 3,
"rank_serp": 10,
"page": 1,
"pixel": 1369,
"domain": "www.indeed.com",
"url": "https://www.indeed.com/career-advice/career-development/types-of-keywords",
"title": "19 Types of Keywords",
"description": "6 juin 2025 — 19 types of keywords and how to use them for marketing · 1. Market segment keywords · 2. Customer-defining keywords · 3. Product-defining ..."
},
{
"rank_type": 4,
"rank_serp": 11,
"page": 1,
"pixel": 1515,
"domain": "www.usg.edu",
"url": "https://www.usg.edu/galileo/skills/unit04/primer04_07.phtml",
"title": "Keyword Search",
"description": "In this case, the phrase alternative fuels and automobiles are the significant keywords."
},
{
"rank_type": 5,
"rank_serp": 12,
"page": 1,
"pixel": 1639,
"domain": "guides.lib.uh.edu",
"url": "https://guides.lib.uh.edu/c.php?g=1249281",
"title": "What are keywords and why are they important? - Guides",
"description": "You probably used the title of the film and the word “showtimes” as your keywords to bring up the results you needed. Keywords in academic research are similar."
},
{
"rank_type": 6,
"rank_serp": 13,
"page": 1,
"pixel": 1785,
"domain": "www.tactee.fr",
"url": "https://www.tactee.fr/seo/strategie-seo/keyword-seo/",
"title": "Qu'est ce qu'un keyword SEO ? [Définition & conseil]",
"description": "13 juil. 2024 — Commerciale : l'utilisateur compare des produits ou des services, par exemple « meilleur smartphone 2024 ». Identifier l'intention de recherche ..."
},
{
"rank_type": 7,
"rank_serp": 14,
"page": 1,
"pixel": 1931,
"domain": "backlinko.com",
"url": "https://backlinko.com/types-of-keywords",
"title": "10 Types of Keywords with Examples (+ How to Find Them)",
"description": "15 mai 2025 — 10 Types of Keywords with Examples (+ How to Find Them) · 1. Seed Keywords · 2. Informational Keywords · 3. Commercial Keywords · 4."
},
{
"rank_type": 8,
"rank_serp": 15,
"page": 1,
"pixel": 2077,
"domain": "learn.microsoft.com",
"url": "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/",
"title": "C# Keywords and contextual keywords - C# reference",
"description": "17 avr. 2025 — For example, @if is a valid identifier, but if isn't because if is a keyword. The first table in this article lists keywords that are ..."
}
]
},
{
"type": "images",
"items": [
{
"rank_type": 1,
"rank_serp": 16,
"page": 1,
"pixel": 2311,
"domain": "searchfacts.com",
"url": "https://searchfacts.com/what-are-keywords-in-seo/",
"title": "",
"description": ""
},
{
"rank_type": 2,
"rank_serp": 17,
"page": 1,
"pixel": 2311,
"domain": "backlinko.com",
"url": "https://backlinko.com/hub/seo/seo-keywords",
"title": "",
"description": ""
},
{
"rank_type": 3,
"rank_serp": 18,
"page": 1,
"pixel": 2311,
"domain": "ahrefs.com",
"url": "https://ahrefs.com/blog/what-are-keywords/",
"title": "",
"description": ""
}
]
}
]
}
]
}
Vous pouvez recevoir le résultat d'un SERP directement sur une URL que vous nous fournissez lors de la création d'une requête, il vous suffit de récupérer la clé de HMAC liée à la clé API utilisée.
Code
PHP
Python
Javascript
Ruby
Java
C#
GO
// 1) Read the raw body (JSON)
$raw = file_get_contents('php://input');
// Middleware to parse JSON and keep raw body for HMAC verification
app.use(express.json({
verify: (req, res, buf) => {
req.rawBody = buf.toString(); // Save raw body for signature check
}
}));
app.post("/callback", (req, res) => {
// 1) Read the raw body (JSON)
const raw = req.rawBody;
// Use timing-safe comparison to avoid timing attacks
if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature))) {
return res.status(401).type("text").send("Invalid signature");
}
// 4) Decode the JSON (Express already did it in req.body)
let data;
try {
data = req.body;
} catch (err) {
return res.status(400).type("text").send("Invalid JSON");
}
// 5) Process the data
// data contains what the client sent in the payload
// For example: data.id, data.results, etc.
// 6) Respond in JSON (optional, we log these responses for tracking purposes)
res.status(200).json({
status: "ok",
received_at: new Date().toISOString(),
echo: data.id || null
});
});
// 4) Decode the JSON
Map data;
try {
data = new com.fasterxml.jackson.databind.ObjectMapper().readValue(raw, Map.class);
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST)
.contentType(MediaType.TEXT_PLAIN)
.body("Invalid JSON");
}
// 5) Process the data
// data contains what the client sent in the payload
// For example: data.get("id"), data.get("results"), etc.
// 6) Respond in JSON (optional, we log these responses for tracking purposes)
Map response = new HashMap<>();
response.put("status", "ok");
response.put("received_at", Instant.now().toString());
response.put("echo", data.get("id"));
// Helper method: secure string comparison (to avoid timing attacks)
private boolean secureCompare(String a, String b) {
if (a == null || b == null || a.length() != b.length()) {
return false;
}
int result = 0;
for (int i = 0; i < a.length(); i++) {
result |= a.charAt(i) ^ b.charAt(i);
}
return result == 0;
}
// Helper method: convert bytes to hex string
private String bytesToHex(byte[] bytes) {
StringBuilder hexString = new StringBuilder(2 bytes.length);
for (byte b : bytes) {
String hex = Integer.toHexString(0xff & b);
if (hex.length() == 1) hexString.append('0');
hexString.append(hex);
}
return hexString.toString();
}
}
PHP
Python
Javascript
Ruby
Java
C#
GO
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
const string SHARED_SECRET = "HMAC_KEY";
app.MapPost("/callback", async (HttpRequest request, HttpResponse response) =>
{
// 1) Read the raw body (JSON)
using var reader = new StreamReader(request.Body);
var raw = await reader.ReadToEndAsync();
// 2) Retrieve the headers
var signature = request.Headers["X-Signature"].FirstOrDefault() ?? "";
// 3) (Optional) Verify the HMAC signature
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(SHARED_SECRET));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(raw));
var expected = Convert.ToHexString(hash).ToLowerInvariant();
// 5) Process the data
// data contains what the client sent in the payload
// For example: data["id"], data["results"], etc.
// 6) Respond in JSON (optional, we log these responses for tracking purposes)
var jsonResponse = new
{
status = "ok",
received_at = DateTime.UtcNow.ToString("o"), // ISO 8601
echo = data != null && data.ContainsKey("id") ? data["id"] : null
};
Permet de voir le nombre de SERPs en fonction de leurs statuts :
Terminées et résultats récupérés par l'utilisateur (status=done, fetched=true)
Terminées et résultats non récupérés par l'utilisateur (status=done, fetched=false)
En cours de traitement (status=processing)
En attente (status=pending)