Using the Serp API
The main endpoint for the Serp API is/search
. You can make requests to this endpoint to scrape search engine results pages (SERPs) like Google. The following parameters are supported:
- q (required) - the search query to scrape the SERP for. You can use anything that you would use in a regular Google search. e.g. inurl:, site:, intitle:. We also support advanced search query parameters such as as_dt and as_eq. See the full list of supported advanced search query parameters.
- location (optional) - Parameter defines from where you want the search to originate. If several locations match the location requested, we’ll pick the most popular one. If location is omitted, the search may take on the location of the proxy.
- google_domain - The Google domain to use for the search. e.g. google.com, google.co.uk, google.fr, etc.
- device - Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser (currently using iPhones).
- output - Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.