Overview
The Search API block retrieves search engine results pages (SERPs) for a query through SearchAPI.io. Use it to pull organic results, related searches, and other SERP data into a workflow. Choose Google or Bing and target a specific country.Configuration
Search Query (Required)
The text to search for. Example:{{step_1.output}}
Search Engine
Select which search engine to query. Default: Google Search Options:Country
Choose which country to search from. Results reflect local ranking and language for that market. Default: United States (us)
You can switch the country to a variable for dynamic mapping. The system auto-maps country names and codes.
Example: {{step_1.output.country}}
Page
Which page of results to return. Default: 1 Increase the page number to fetch deeper results. Page 2 returns the next set of organic results after page 1. Example:2
Error Handling
Define what happens if the block fails to retrieve results. Options:- Terminate Workflow: Stop execution immediately.
- Continue Execution: Proceed to the next step despite the error.
Output Data
The block returns the raw SERP JSON from the provider, with internal metadata fields removed. The exact keys depend on the search engine and query.organic_results
An array of organic result objects, each with atitle, link, and snippet.
Example: {{step_1.output.organic_results[0].link}}
related_searches
Related query suggestions returned by the engine, when available.Sample Output
Best Practices
- Extract URLs from
organic_results[].linkbefore looping over them. - Set the country to match your target market for accurate local rankings.
- Reference previous step output in the query to run dynamic searches.
- Increase the page number to collect more results across multiple runs.
- Pair with a Code block to flatten
organic_resultsinto a clean URL list.
Common Use Cases
What’s Next
- Scrape result pages with the Web Scrape Block
- Compare with the Google Search Block
- Process multiple results in a Loop Block
- Analyze results in the LLM Block
- Learn about Variable Referencing