Getting mobile search results using API v2
Written by
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, add this field to the request body:
REST APIgRPC APIThe
userAgent
contains the description of the device and browser User-Agent header . Here is an example:body.json
{ ... "userAgent": "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" }
The
user_agent
field contains the description of the device and browser User-Agent header . Here is an example:body.json
{ ... "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" }
-
Set the other request body parameters according to the specification.
Mobile search results will be different from default search results by the website ranking, total number of results found, and some other parameters.