Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Every engine is the same GET /search with a different engine value; the engine’s own parameters follow.
- Billing counts each successful uncached search against your monthly quota; cached results (identical search within 1 hour) and the Account and Locations APIs are free.
- Results come as JSON; search_metadata.status goes Processing then Success or Error, and search_metadata.id is the archive id.
Endpoints
Google search
- Each successful uncached search counts as one search against your monthly quota; repeated identical searches within an hour are served from cache and are free.
- Paging is by start offset, not page number. num is not documented on this page, so it is left out.
- With async=true the call returns search_metadata.id; poll serpapi.archive.get until its status is Success.
Google News search
- Each successful uncached search counts as one search against your monthly quota.
- q cannot be combined with topic_token, publication_token, section_token, story_token or kgmid.
Google Maps search
- Each successful uncached search counts as one search against your monthly quota.
- ll, location, lat/lon with z or m, and nearby give other ways to set the origin; see the docs page for their combination rules.
Google Play search
- Each successful uncached search counts as one search against your monthly quota.
YouTube search
- Each successful uncached search counts as one search against your monthly quota.
- Pages continue by sp token rather than page number.
Get a search from the archive
- Status is Queued, Processing, Success or an error. Searches stay retrievable for 31 days after completion.
- Poll this after a search made with async=true.
Get account usage
- Free and not counted toward your monthly quota.
Search supported locations
- Free. Use a result’s canonical_name as location in a search.