Google search results in n8n

In n8n, Google results come from an HTTP Request node: method POST, URL ending in /search, your key sent as the X-API-KEY header through a Header Auth credential, and a JSON body with q, gl and hl. Then split the organic field into items to use each result in the next nodes.

Last updated:

Key takeaways

  • No SDK to install: the built-in HTTP Request node is enough.
  • Send the key in the X-API-KEY header, never in a URL or in browser code.
  • 202 means the search is still running: poll GET /requests/{requestId}.
  • 60 searches per minute per account by default; 429 and 503 are not charged.

Step by step

  1. Create the credential

    In n8n, add a credential of type Header Auth: name X-API-KEY, value your BestSERP key. Keys never appear in the workflow itself.

  2. Configure the HTTP Request node

    Method POST, URL https://api.bestserp.com/search, Authentication: Generic Credential Type > Header Auth (the credential above), Send Body: JSON with the fields below. Use an expression such as {{ $json.keyword }} for q to search a value from a previous node.

    JSON body
    {
      "q": "best running shoes",
      "gl": "us",
      "hl": "en",
      "timeout": 120
    }
  3. One item per result

    Add a Split Out node on the field organic. Each result becomes an item with position, title, link and snippet for the next nodes (a sheet, a database, a message).

  4. Schedule it

    Start the workflow with a Schedule Trigger to run daily: a simple rank or news monitor without code.

Status codes to handle

What the search endpoints answer, and whether the request costs credits.
StatusCodeMeaningCredits
202-Not finished within timeout (or async: true). Poll pollUrl.Reserved
400invalid_requestMalformed body or a parameter out of range.No
400unknown_parameterA field the API does not know (typo?).No
400unsupported_parameterA known field that this endpoint does not support yet (e.g. location).No
401missing_api_key / invalid_api_keyNo key, or the key is wrong or revoked.No
402insufficient_creditsYour balance is too low for this request.No
403account_suspendedThe account is suspended.No
404not_foundUnknown requestId, or it belongs to another account.-
429rate_limitedToo many requests this minute. See Retry-After.No
502search_failedThe search could not be completed (blocked or timed out).Refunded
503busyNo capacity right now. Retry after Retry-After seconds.Refunded

Frequently asked questions

Is there a BestSERP node for n8n?
Not yet. The built-in HTTP Request node is all you need.
How do I search a list of keywords?
Feed the keywords as items (from a sheet or a Code node) into the HTTP Request node and use an expression for q; n8n runs one request per item.
What if the node gets status 202?
The search took longer than timeout. Keep timeout at 120, or add a Wait node and a second HTTP Request to GET /requests/{requestId}.
How many credits does a workflow use?
One per search (per page of 10 results). A daily run over 100 keywords uses about 3,000 credits a month, $1.50.

Start with 3,000 free searches

No credit card. Sign in with Google, create a key, send your first request.