Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Search API
    • All guides
      • General connection procedure
      • Query testing
      • Authentication with the API
      • Requesting limits
      • Performing search queries
      • Mobile search results
  • Access management
  • Pricing policy
  • Audit Trails events
  1. Step-by-step guides
  2. API v1
  3. Mobile search results

Getting mobile search results using API v1

Written by
Yandex Cloud
Updated at December 27, 2024

Mobile search results differ from default search results by the ranking formula and presence of links to websites optimized for mobile devices.

To get mobile search results:

  1. Add to your request a header entitled user-agent containing the device and browser description. Here is an example:

    cURL
    Python
    curl \
      --header 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \
      '<GET request>'
    
    import subprocess
    
    MOBILE_HEADER = 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
    URL = f'<GET request>'
    with open('mob.xml', 'w') as f:
       subprocess.run(['curl', '-H', MOBILE_HEADER, URL], stdout=f)
    

    Note

    The above example uses a GET request. If using a POST request, add a similar header.

  2. Set the remaining request parameters based on the specification and send the request.

Mobile search results will be different from default search results by the website ranking, total number of results found, and some other parameters.

Was the article helpful?

Previous
Performing search queries
Next
Performing search queries in synchronous mode
Yandex project
© 2025 Yandex.Cloud LLC