Skip to content

Yandex Search API

Yandex Search API for localized SERP capture.

Capture the Yandex result page produced for a specific region, language, device, page, and time window. The API returns request metadata and the source SERP HTML payload in a JSON envelope for your application to process.

Server-side GET API · Start with api_key + engine=yandex + q · Talk to a data expert

  • Regional context Yandex location region ID
  • Page controls Language, device, and page
  • Time filter Documented within values
  • Source response HTML payload in JSON
Web data workflow · yandex searchReady

Pin the observation

query pizza

region Moscow

lang ru

fielddevice desktop
stackKeep the page explicit
stackJSON envelope
figurerequest context
figurelr 213
{
  "search_parameters": {
    "search_engine": "yandex",
    "query": "pizza"
  },
  "search_results":
    "<html>...</html>"
}
Illustrative regional capture—not customer data or a guarantee about a returned page. It shows request context traveling with the source SERP HTML payload.

A capture contract buyers can evaluate

Know the page context, payload, and ownership boundary before you integrate.

Yandex Search API gives product and data teams a documented request surface for localized page capture. Your team retains control of the extraction model and how each observation enters downstream workflows.

01

Regional intent stays visible

Keep the Yandex region ID and language beside the captured page so later comparisons retain their market context.

02

Presentation is deliberate

Choose the documented device profile and page number rather than treating every Yandex response as interchangeable.

03

The response boundary is explicit

Plan for a JSON envelope containing the source SERP HTML payload instead of assuming a downstream record model.

04

Schema decisions stay with you

Extract only the fields your workflow needs, version that schema, and decide how page changes should be handled.

  1. 01

    Engine yandex

  2. 02

    Query pizza

  3. 03

    Region lr 213

  4. 04

    Language ru

  5. 05

    Device desktop

  6. 06

    Page p 0

  7. 07

    Window within 77

Documented Yandex surface

Capture the result page defined by your regional and presentation context.

The Yandex endpoint accepts one search query plus optional context. Start with representative requests for the countries, languages, devices, pages, and time windows your application will actually use.

Region

Yandex location ID

Use the region identifier expected by Yandex to influence the result page for the intended location.

Request context · lr

Language

Search language

Attach the documented language value to the observation and validate it with the region and query set.

Request context · lang

Presentation

Device profile

Request desktop, mobile, or tablet presentation where the documented device control fits your workflow.

Request context · device

Page window

Page and time filter

Select a zero-based result page and, when needed, a documented time-range value.

Request context · p / within

Domain context

Validate the domain, region, and language together.

The parameters reference also documents optional Yandex domain selection. Treat the complete request combination as the observation fingerprint and verify representative pages before relying on it.

Review Yandex parameters

Request controls

Define the Yandex page your application intends to observe.

The Basic Requests guide uses the query parameter shown below. Add optional context only where it supports a clear product or research requirement.

Search intent

Query

Pass the search text in the documented Basic Requests field and URL-encode spaces or special characters.

q

Localization and presentation

Region, language, and device

Set the Yandex location region ID, search language, and documented desktop, mobile, or tablet profile.

lr lang device

Page window

Pagination and recency

Use p=0 for the first page and add a supported time value such as 77 for the past 24 hours or 1 for the past two weeks.

p within

Implementation note: use api_key, engine=yandex, and q as the server-side starting point. The page number is zero-based; it describes which page was requested, not a universal rank across contexts.

Source-payload response

Receive a JSON envelope, then apply your own extraction contract.

Yandex Search API returns response metadata and the source page representation. Design the consumer around that boundary before adding storage, monitoring, or derived search records.

API response

JSON envelope with the source SERP HTML payload.

The envelope includes search_parameters for submitted-search context and search_results for the source SERP HTML payload.

  • Inspect the HTTP status before reading the body.

  • Store only the request context and source data your workflow needs.

  • Treat page-layout changes as an extraction and schema event.

application/json source payload{ "search_parameters": { "search_engine": "yandex", "yandex_url": "https://www.yandex.com/search/?text=pizza", "query": "pizza" }, "search_results": "<html>...</html>" }Your application

Extraction and schema maintenance

Your application owns extraction from the returned HTML. Your team defines the derived fields, validation rules, schema versions, and maintenance response when Yandex updates its page.

Response boundary

The endpoint delivers page context and source HTML inside JSON. It does not define the customer-facing records, rankings, alerts, or business interpretation your system may derive.

One contextual capture

From a Yandex query to an owned extraction pipeline in three steps.

Your application defines the page and consumes the source payload. WebScrapingAPI operates the supported request path between those two responsibilities.

  1. 01

    Define the page context

    Choose the query and add the documented region, language, device, zero-based page, and time-range inputs your observation needs.

  2. 02

    Send the server-side request

    Call the SERP endpoint with a protected API key and engine set to yandex. Set a timeout and surface unsuccessful HTTP states.

  3. 03

    Validate, extract, and version

    Read the JSON envelope, preserve its request context, and run the source HTML through your team's extraction and schema process.

Integration

Make one safe Yandex request from your server-side stack.

These starting points keep the API key in an environment variable, send the Basic Requests query, use a 120-second client timeout, and make unsuccessful HTTP states explicit.

Request brief

Start with the documented pizza query.

Confirm the source response first. Then add the regional, language, device, page, and time controls required by your product.

Endpoint
/v2
Required
api_key + engine=yandex + q
Secret
WSA_API_KEY stays server-side
Consumer
Check status, then read JSON
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; // engine=yandex; q=pizza var rawApiKey = Environment.GetEnvironmentVariable("WSA_API_KEY"); if (string.IsNullOrWhiteSpace(rawApiKey)) { throw new InvalidOperationException("WSA_API_KEY is required"); } var apiKey = rawApiKey; using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(120) }; var parameters = new Dictionary<string, string> { ["api_key"] = apiKey, ["engine"] = "yandex", ["q"] = "pizza" }; var query = string.Join("&", parameters.Select(item => $"{WebUtility.UrlEncode(item.Key)}={WebUtility.UrlEncode(item.Value)}")); using var response = await client.GetAsync( "https://serpapi.webscrapingapi.com/v2?" + query ); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());

Production-safe starting point

Examples keep credentials server-side, URL-encode parameters, bound the request time, and surface unsuccessful HTTP states.

Product choice

Choose by the response and operating ownership your team needs.

Yandex Search API is the focused option when the source Yandex result page and its request context fit your application. Broaden or shift ownership when your requirement changes.

Production evaluation

Test the regional page matrix your application will depend on.

Use representative captures before choosing a plan. Include ordinary, localized, paginated, time-filtered, layout-changing, and unsuccessful states across the devices and regions in scope.

Estimate the request matrix

Size contexts, pages, and frequency together.

Illustrative Yandex request volume formula

Queries × Regions × Devices × Pages × Frequency

This is an evaluation model, not a billing promise. Use current pricing and plan details as the commercial source of truth.

Evaluation checklist

Context

Regions, languages, and domains

Presentation

Devices and zero-based pages

Payload

Source HTML variations

Consumer

Extraction and schema versions

Operations

Timeouts, errors, retries, storage

Discuss production requirements

FAQ

Yandex Search API questions for a grounded evaluation.

Use these answers for product selection, then treat current Yandex endpoint documentation and representative requests as the implementation source of truth.

Read Basic Requests

What does Yandex Search API return?

Yandex Search API returns a JSON envelope with request metadata and the source SERP HTML payload in search_results. It does not define your downstream record schema.

Which values are required for a Yandex request?

Send your server-side API key, set engine to yandex, and pass the search query in q. URL-encode query text when it contains spaces or special characters.

How do I choose the Yandex region and language?

Use lr for the Yandex location region ID and lang for search language. A Yandex domain can also be selected where documented; validate the combination with representative searches before production use.

How does Yandex pagination work?

Use p for the result page. Page counting starts at 0, so p=0 requests the first page. Keep p with the rest of the request context when comparing captures.

Who maintains extraction from the Yandex payload?

Your application owns extraction from the source SERP HTML payload, and your team owns the derived schema and its maintenance as Yandex page layouts change.

How should my application handle Yandex API errors?

Set an explicit client timeout, inspect the HTTP status before using the response body, retain enough request context to diagnose failures, and apply bounded retries only where they fit your workflow.

Your first Yandex capture

Test one regional page and its source-payload consumer.

Start with the documented pizza request, then add the contexts your product will actually observe.