Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Search API
  • Getting started
    • All guides
    • Text search in synchronous mode
    • Text search in deferred mode
    • Searching by text description
    • Searching by image
    • Location-based search
    • Mobile search results
  • Access management
  • Pricing policy
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Location-based search

Location-based text search

Written by
Yandex Cloud
Updated at January 20, 2026

By default, Yandex Search API results are not linked to the user's location because queries are sent from Yandex Cloud servers. For geolocation-dependent search results, as in a browser, specify in the query parameters the IP address of the user you are going to use to get your search results.

Note

The IP address must be valid and public. Private subnet addresses do not affect search results.

API
  1. Add the X-Forwarded-For-Y field to the request body in the metadata.fields section:

    body.json

    ...
    "metadata": {
      "fields": {
        "X-Forwarded-For-Y": "<user_IP_address>"
      }
    },
    ...
    

    Where X-Forwarded-For-Y is the user's IP address.

  2. Set the other request body parameters according to the specification.

  3. Send the request and get the result. For more information, see Performing text search queries in deferred mode.

Was the article helpful?

Previous
Searching by image
Next
Mobile search results
© 2026 Direct Cursus Technology L.L.C.