# Search api

Your real-time SERP API solution. Mastering proxy management, CAPTCHAs, and JSON parsing for seamless web data extraction.

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 5
- **Triggers:** 0
- **Slug:** `SEARCH_API`
- **Version:** 00000000_00

## Tools

### Get Account Info

**Slug:** `SEARCH_API_GET_ACCOUNT_INFO`

Tool to retrieve account usage statistics including monthly usage, remaining credits, hourly limits, and subscription period information. Use when you need to check current account status or usage limits.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `zero_retention` | boolean | No | Enterprise-only feature. When set to true, disables all logging and persistent storage for this request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Cached Search by ID

**Slug:** `SEARCH_API_GET_CACHED_SEARCH_BY_ID`

Tool to retrieve cached search results by search ID in JSON format. Use when you need to access previously executed search results without re-running the query. The search ID is found in the search_metadata.id or search_metadata.json_url field from initial search responses. Cached results are available for 90 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `search_id` | string | Yes | The unique identifier for a previously executed search, formatted as 'search_[alphanumeric]'. This ID is found in the 'id' or 'json_url' field of the search_metadata from initial search responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Cached Search HTML by ID

**Slug:** `SEARCH_API_GET_CACHED_SEARCH_HTML_BY_ID`

Tool to retrieve cached search results by search ID in HTML format. Use when you need to access the raw HTML snapshot of a previous search execution. The search ID is available in the search_metadata.id or search_metadata.html_url field from initial search responses.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `search_id` | string | Yes | The unique identifier for a previously executed search. This ID is found in the 'id' or 'html_url' field of the search_metadata from initial search responses. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Locations

**Slug:** `SEARCH_API_GET_LOCATIONS`

Tool to get available locations for geo-localized search queries. Use when you need to find location identifiers for targeting Google searches to specific geographic areas. Returns location metadata including identifiers, names, coordinates, and population reach.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `q` | string | Yes | Search query for location lookup. The location name you want to search for (e.g., 'new york', 'london', 'tokyo'). |
| `limit` | integer | No | Maximum number of results to return. Default is 10, maximum allowed is 100. |
| `zero_retention` | boolean | No | Enterprise feature only. When set to true, disables logging of the request. Only available for enterprise accounts. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search

**Slug:** `SEARCH_API_SEARCH`

Tool to perform unified search across 40+ search engines including Google, Bing, Yahoo, DuckDuckGo, YouTube, Amazon, and more. Use when you need to retrieve search results with rich structured data including organic results, ads, knowledge graphs, local listings, images, videos, and related searches. Supports advanced filtering by location, language, date, device type, and SafeSearch settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `q` | string | Yes | Search query terms with support for operators and advanced filters. |
| `cr` | string | No | Restricts results by country via TLD or IP geolocation. |
| `gl` | string | No | Country code for results (default: us). Two-letter country code. |
| `hl` | string | No | Interface language code (default: en). Two-letter language code. |
| `lr` | string | No | Restricts results by document language (format: lang_xx). |
| `num` | integer | No | Number of results per page. Note: Google now returns a constant 10 results regardless of this parameter. |
| `nfpr` | integer | No | Set to 1 to exclude auto-corrected results. |
| `page` | integer | No | Results page number for pagination (default: 1). |
| `safe` | string | No | SafeSearch setting: 'active' to filter explicit content or 'off' to disable (default: off). |
| `uule` | string | No | Google-encoded location parameter. Cannot be used together with location parameter. |
| `kgmid` | string | No | Knowledge Graph identifier for entity-specific searches. |
| `device` | string | No | Device type for search results: desktop, mobile, or tablet (default: desktop). |
| `engine` | string | Yes | Specifies the search engine to use. Supported engines include: google, bing, yahoo, duckduckgo, youtube, google_maps, google_shopping, google_jobs, google_hotels, amazon_search, ebay_search, walmart_search, apple_app_store, baidu, yandex, naver, and many more. |
| `filter` | integer | No | Enable (1) or disable (0) duplicate content filters (default: 1). |
| `location` | string | No | Canonical search location for geo-targeted results (e.g., 'United States', 'London,England,United Kingdom'). |
| `time_period` | string | No | Filter results by date: last_hour, last_day, last_week, last_month, or last_year. |
| `google_domain` | string | No | Google domain to search (default: google.com). |
| `zero_retention` | boolean | No | Enterprise-only feature. When set to true, disables all logging and persistent storage for this request. |
| `time_period_max` | string | No | Custom date range end in MM/DD/YYYY format. |
| `time_period_min` | string | No | Custom date range start in MM/DD/YYYY format. |
| `optimization_strategy` | string | No | Search optimization strategy: 'performance' or 'ads' (default: performance). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
