SerpApi Official icon

SerpApi Official

Get live Google Search data and more from SerpApi's official node

Overview

This node integrates with SerpApi's Google Finance search engine to fetch live financial data from Google Finance. It allows users to query stock symbols, indices, mutual funds, currencies, or futures and retrieve up-to-date market information.

Common scenarios where this node is beneficial include:

  • Automating the retrieval of stock prices and financial metrics for portfolio tracking.
  • Integrating real-time financial data into dashboards or reports.
  • Monitoring currency exchange rates or commodity futures prices programmatically.

For example, a user can input a stock ticker like "GOOGL:NASDAQ" to get current price, historical data, and other financial details about Alphabet Inc. on NASDAQ.

Properties

Name Meaning
Search Query (q) The main query string defining what to search for. Can be a stock symbol, index, mutual fund, currency, or futures identifier. Example: "GOOGL:NASDAQ".
Additional Fields A collection of optional parameters to customize the search:
- Language (hl) Language code for the search results. Options include many languages such as English (en), Spanish (es), French (fr), Chinese Simplified (zh-cn), Japanese (ja), and many others. Defaults to English ("en").
- Time Range (window) Sets the time range for the financial graph data. Options: 1 Day, 5 Days, 1 Month, 6 Months, Year to Date, 1 Year, 5 Years, Maximum.
- Disable Caching (no_cache) Boolean flag to force fetching fresh results instead of using cached data. Cache expires after 1 hour. Default is false (allow cache). Cannot be used together with async.
- Async (async) Boolean flag to perform the search asynchronously. If true, the search is submitted and results must be retrieved later via Search Archive API. Default is false (synchronous). Cannot be used with no_cache or on certain accounts.
- ZeroTrace Mode (zero_trace) Boolean flag to enable ZeroTrace mode (enterprise only), which skips storing search parameters and metadata on SerpApi servers for privacy. Default is false.
- Output (output) Defines the output format. Can be "json" (default) for structured JSON results or "html" for raw HTML response.
- JSON Restrictor (json_restrictor) Allows restricting the JSON response fields to specific parts, e.g., limiting to first 3 organic results with only title and snippet.

Output

The node outputs a JSON object containing the search results from Google Finance via SerpApi. This includes detailed financial data such as:

  • Stock price and changes
  • Historical price data within the selected time range
  • Market summary and statistics
  • Other relevant financial metrics depending on the query

If the output format is set to "html", the raw HTML content of the Google Finance page is returned instead.

No binary data output is produced by this node.

Dependencies

  • Requires an active SerpApi account and a valid API key credential configured in n8n.
  • Internet access to call SerpApi endpoints.
  • No additional external dependencies beyond the SerpApi service.

Troubleshooting

  • Invalid or missing API key: Ensure that the API key credential is correctly set up in n8n and has permissions for SerpApi.
  • Query returns no results: Verify that the search query (e.g., stock symbol) is valid and supported by Google Finance.
  • Conflicting parameters: The no_cache and async options cannot be used together; setting both to true will cause errors.
  • Async usage restrictions: Async mode should not be used on accounts with special speed features enabled; check your account settings.
  • Language codes: Using unsupported language codes may result in defaulting to English or errors.
  • Rate limits: Exceeding SerpApi's rate limits will cause request failures; monitor usage accordingly.

Links and References

Discussion