Данные должны быть отправлены в виде массива JSON. Каждый элемент должен содержать следующие поля.
Ограничение
Массив JSON может содержать 100 элементов, поэтому за один вызов можно создать 100 отпечатков SERPs.
post
https://api.semscraper.com/v1/serp/google
https://api.semscraper.com/v1/serp/google
Разрешения : Bearer {api_key}
Параметры
search_engine
Требуется
string
Выбор поисковой системы:
Поиск Google (значение: google_search)
keyword
Требуется
string
Ключевые слова для поиска в поисковой системе
device
Требуется
string
Выбор подложки:
Компьютер (значение: настольный)
Мобильный (значение: мобильный)
depth
Требуется
integer
Глубина страницы, мы получаем результаты Google SERP с пагинацией. Этот параметр должен быть в диапазоне от 1 (примерно 10 результатов) до 10 (примерно 100 результатов).
location
Требуется
string
Код местоположения поисковой системы
language
Требуется
string
Язык поисковых систем
geolocation
string
Позволяет определить геолокацию SERP Google. Например, вы можете указать город, район или страну, разделив их запятой.
priority
integer
Используется для определения приоритета ваших запросов, которые обрабатываются в порядке убывания приоритета. Значение от 1 до 10.
callback_url
string
Позволяет указать URL-адрес, на который мы отправим вам результаты по ключевому слову после его обработки.
Список идентификаторов (ID) для завершенных SERP, которые вы еще не извлекли.
Этот метод позволяет получить идентификаторы всех SERP, которые уже обработаны, но еще не извлечены. Затем вы можете вызвать метод получения SERPs Google, используя эти идентификаторы.
},
{
"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 ..."
}
Восстановление SERP с помощью URL-адреса обратного вызова
Вы можете получить результат SERP непосредственно на URL, который вы предоставляете нам при создании запроса. Все, что вам нужно сделать, это получить ключ HMAC, связанный с используемым ключом API.
Код
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
};
Просматривайте количество SERP в зависимости от их статуса:
Завершено и результаты получены пользователем (status=done, fetched=true)
Завершено, но результаты не получены пользователем (status=done, fetched=false)
В процессе (статус=обработка)
Ожидание (status=pending)