Custom Connector

SERP API

Global

The SerpAPI Connector enables seamless access to SerpAPI services, providing search results, location data, account information, and archived search results. It supports querying search results, retrieving supported locations, fetching account details, and accessing archived searches — including basic and detailed location lookups.

Type
SaaS & APIs
Runs on
Google Compute Engine
Last update
24 Oct 2024
Category
Integration
Overview

Integration Overview

This document provides a detailed guide for each endpoint, its purpose, configuration, and workflow support using the SerpAPI Connector. The connector forwards HTTP GET requests to SerpAPI, handling query parameters and headers, optionally appending an API key from environment variables.

  • get_search_results. Retrieves search results based on a query and optional parameters.
  • get_locations. Retrieves supported locations for geolocation-based searches.
  • get_account_info. Retrieves account details for a given API key.
  • get_search_archive. Retrieves archived search results for a specific search ID.
Documentation

Detailed Integration Documentation

Search Results Retrieval

Actionget_search_results
EndpointGET /search
PurposeRetrieves search results from SerpAPI based on a query and optional parameters — engine, location, language, and pagination.
ParametersRequired:
q (e.g. “coffee shops Stockholm”); api_key (or CONNECTOR_ENV_SERPAPI_API_KEY). Optional:
engine (e.g. google); location; google_domain; hl; gl; tbm; num; start; async.
ConfigurationRun the app with the correct base URL; optionally set CONNECTOR_ENV_SERPAPI_BASE_URL, CONNECTOR_ENV_SERPAPI_API_KEY, and CONNECTOR_ENV_PORT (default 8081).
OutputSuccessful: JSON with organic results, related searches, or local business data. Failure: 400 / 401 / 500.
Workflow exampleExecute GET /search with q=coffee shops Stockholm and api_key, then display results.

Locations Retrieval

Actionget_locations
EndpointGET /locations.json
PurposeRetrieves a list of supported locations for geolocation-based searches, filtered by query and limit.
ParametersOptional:
q (e.g. Stockholm); limit (e.g. 5); api_key.
OutputSuccessful: JSON with supported locations — city, country, and geolocation details. Failure: 400 / 401 / 500.
Workflow exampleExecute GET /locations.json with q=Stockholm and limit=5 to populate a location dropdown.

Account Info Retrieval

Actionget_account_info
EndpointGET /account
PurposeRetrieves account details for a given API key — usage limits, plan type, and account status.
ParametersRequired:
api_key (or CONNECTOR_ENV_SERPAPI_API_KEY).
OutputSuccessful: JSON with remaining searches, plan type, and status. Failure: 400 / 401 / 500.
Workflow exampleExecute GET /account with api_key, then display details in an admin dashboard to monitor usage.

Archived Search Retrieval

Actionget_search_archive
EndpointGET /searches/{search_id}.json
PurposeRetrieves archived search results for a specific search ID — access to previously executed searches.
ParametersRequired:
search_id (e.g. 12345); api_key.
OutputSuccessful: JSON with the original query, results, and metadata. Failure: 400 / 401 / 500.
Workflow exampleExecute GET /searches/12345.json with api_key to display historical search data for analysis.

Example Workflow: Search & Location Integration

Retrieve locationsExecute get_locations with q=Stockholm and limit=5 to populate a location picker.
Perform searchExecute get_search_results with q=coffee shops Stockholm and location=Stockholm, Sweden.
Monitor accountExecute get_account_info to ensure sufficient API quota.
Access archivesExecute get_search_archive with search_id=12345 to analyze historical trends.

Use Case

A digital marketing platform integrates the SerpAPI GCP Connector to deliver real-time, geolocated search insights. Using get_search_results, the platform fetches localized Google results for competitor analysis and SEO reporting; get_locations helps tailor campaigns to regional trends; get_account_info tracks and bills API usage; and get_search_archive supports historical trend analysis — all within a scalable, cloud-native workflow.

Support

For technical support, contact custom-connectors-support@isolutions.sa.

free consultation

Schedule a Free Consultation With Our Specialists

Book a free demo
request

Begin Your Adventure With Experienced Professionals

Send request
help desk

Do You Have Questions or Want More Information? Call Now.

Contact support