Tài liệu API hiện chỉ có bằng tiếng Anh.

Yandex Search

Get Yandex web search results.

GET/api/v1/yandex/search

Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.

Parameters

Search parameters

ParameterTypeDescription
yandex_domain"yandex.com" | "yandex.ru" | "yandex.by" | "yandex.kz" | "yandex.uz" | "yandex.com.tr"Yandex domain to search.Default: yandex.com.
family_mode"0" | "1" | "2"Safe search: 0 off, 1 moderate, 2 strict.Default: 1.
pintegerPage number, starting at zero.Default: 0.Minimum: 0.
textrequiredstringSearch query, including Yandex query operators.Up to 400 characters.
langstringSearch language code; defaults to en on yandex.com.
lrintegerCountry or region ID; defaults to the selected domain's region.Minimum: 0.
fix_typobooleanAutomatically correct spelling.Default: true.
groups_on_pageintegerMaximum result groups per page.Default: 20.Minimum: 1.
sort_mode"relevance" | "date"Sort results by relevance or date.Default: relevance.
period"all" | "day" | "last_two_weeks" | "month"Time period for results.Default: all.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result data: organic_results. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/yandex/search?text=python+documentation" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "text": "python documentation"
});
const res = await fetch(`https://serpfast.com/api/v1/yandex/search?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "text": "python documentation"
}
res = requests.get(
    "https://serpfast.com/api/v1/yandex/search",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())