# PrismCrawl Google Search API (`prismcrawl/prismcrawl-google-search-api`) Actor

Run live Google searches through the PrismCrawl API and receive normalized search results, SERP features, and pagination metadata.

- **URL**: https://apify.com/prismcrawl/prismcrawl-google-search-api.md
- **Developed by:** [Doug K.](https://apify.com/prismcrawl) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does PrismCrawl Google Search API do?

**PrismCrawl Google Search API** runs **live Google searches** through the [PrismCrawl API](https://www.prismcrawl.com/) and saves the **normalized JSON response** to an Apify dataset: ranked results, **SERP features** (featured snippets, People also ask, knowledge panels, news, shopping, local results, AI summaries, and more when Google shows them), and **pagination metadata**.

This Actor is a thin integration between Apify and PrismCrawl. It does not scrape Google itself: every search is executed by PrismCrawl's [Google Search endpoint](https://www.prismcrawl.com/docs), and the Actor passes your parameters through and stores what PrismCrawl returns. PrismCrawl searches are **live and uncached**: each successful request runs against Google, and PrismCrawl does not serve a cached keyword database.

Running it on Apify adds scheduling, API access, webhooks and integrations, run monitoring, and dataset exports on top of PrismCrawl.

- 🌐 PrismCrawl website: [www.prismcrawl.com](https://www.prismcrawl.com/)
- 📖 Full API reference: [www.prismcrawl.com/docs](https://www.prismcrawl.com/docs)

### Why use PrismCrawl Google Search API?

- **Rank tracking and SERP monitoring**: schedule the same keyword with fixed location, language, and device, and compare positions over time.
- **SEO and competitor research**: see which pages rank and which SERP features appear for a keyword set.
- **Local and international search**: search as if from a country, a named city, or exact coordinates, on any supported Google domain, in any supported interface language.
- **AI agents and research tools**: give an agent current search results with titles, snippets, and source URLs. The Actor also supports Apify's Standby mode for low-latency HTTP calls.
- **No infrastructure**: PrismCrawl handles retrieval and parsing, so you don't run browsers, proxies, or parsers.

### You need a PrismCrawl API key

This Actor uses **your own PrismCrawl account**. To get a key:

1. Create a free account at [prismcrawl.com](https://www.prismcrawl.com/auth). New accounts get **100 free credits** and don't need a credit card.
2. Copy your API key from the PrismCrawl dashboard.
3. Paste it into the **PrismCrawl API key** field of this Actor.

The key field is a **secret input**: Apify stores it encrypted, and the Actor never logs it or writes it to the dataset. It is only sent to `api.prismcrawl.com` in the `x-api-key` header.

### How much does it cost to search Google with PrismCrawl?

There are two separate costs:

- **PrismCrawl credits** (billed by PrismCrawl to your PrismCrawl account). **Each successful search costs one credit**, including a completed search that returns no results. Each additional results page is a separate search. **Failed searches are free**: invalid requests, authentication errors, rate limits, and server errors don't use credits. PrismCrawl sells prepaid credit packages with no subscription. See [PrismCrawl pricing](https://www.prismcrawl.com/serp-api/pricing) for current packages and rates.
- **Apify platform usage** (billed by Apify) for the Actor's compute time. The Actor only makes HTTP calls, so a run is short and uses very little memory.

With **Maximum result pages** set to 1 (the default), one run uses at most one PrismCrawl credit.

### How to use PrismCrawl Google Search API

1. Open the Actor's **Input** tab.
2. Paste your **PrismCrawl API key**.
3. Enter a **Search query**, for example `best coffee shops in Baltimore`.
4. Optionally set a country, language, location, device, search tab, or time filter.
5. Click **Start**. When the run finishes, open the **Output** tab to see the results, SERP features, or full PrismCrawl responses.

You can also start the Actor through the [Apify API](https://docs.apify.com/api/v2), schedule it, or connect it to webhooks and integrations.

### Input

All fields other than the API key and query are optional. Parameter names in parentheses are the PrismCrawl API names, so you can look each one up in the [PrismCrawl API reference](https://www.prismcrawl.com/docs).

| Field | PrismCrawl parameter | What it does |
| --- | --- | --- |
| PrismCrawl API key | `x-api-key` header | Your secret PrismCrawl key. Required. |
| Search query | `query` | The Google search. Required, up to 8,192 UTF-8 bytes. |
| Maximum result pages | – | Pages to fetch (1–10, default 1). The Actor stops early when there is no next page. Each page uses one credit. |
| Start offset | `start` | Zero-based result offset for the first page. |
| Country | `gl` | Two-letter result country (default `us`). Boosts results from that country. |
| Interface language | `hl` | Google interface language (default `en-US`). |
| Google domain | `google_domain` | For example `google.co.uk` (default `google.com`). |
| Location | `location` | A named place such as `Baltimore,Maryland,United States` ([Google geo-target](https://developers.google.com/google-ads/api/data/geotargets) Canonical Name). |
| Latitude / Longitude | `coordinates` | Search from exact coordinates. |
| Radius | `radius` | Meters around the coordinates (1–199 for desktop, up to 1,000 for mobile or tablet). |
| Device | `device` | `desktop`, `mobile`, or `tablet`. |
| Search vertical | `tbm` | News, Videos, Images, Shopping, Local, or Books. |
| Search tab | `udm` | Local, Images, Forums, Videos, News, Web, Shopping, Books, or AI Mode. |
| Time and advanced filters | `tbs` | For example `qdr:d` (past day), `qdr:w` (past week), or `cdr:1,cd_min:8/1/2026,cd_max:8/12/2026`. |
| SafeSearch | `safe` | `active` or `off`. |
| Restrict to languages / countries | `lr` / `cr` | For example `lang_fr\|lang_de` or `countryUS\|countryCA`. |
| Encoded location | `uule` | A raw Google-encoded location, for advanced users. |
| Spelling correction, duplicate filtering, personalization | `nfpr`, `filter`, `pws` | Google's native 0/1 controls. |
| Zero trace | `zero_trace` | PrismCrawl won't store the source HTML or parsed JSON; only audit and billing metadata is kept. |

Some fields can't be combined. Use only one of location, coordinates, or UULE. Radius requires coordinates. Use either a search vertical or a search tab, not both. The Actor checks these rules before sending anything, so an invalid combination fails immediately and costs nothing.

#### Example input

```json
{
    "prismcrawlApiKey": "<YOUR_PRISMCRAWL_API_KEY>",
    "query": "best coffee shops in Baltimore",
    "gl": "us",
    "hl": "en-US",
    "location": "Baltimore,Maryland,United States",
    "device": "mobile",
    "maxPages": 2
}
```

### Output

The Actor stores **one dataset item per results page**. Each item is the **PrismCrawl response exactly as returned**, plus two fields added by the Actor:

- `page`: the page number within this run (1, 2, …)
- `credits_remaining`: your remaining PrismCrawl credits, from the `X-Credits-Remaining` response header

The **Output** tab has three views of the same data:

- **Search results**: one row per ranked result (rank, type, title, URL, snippet, domain, source)
- **SERP features**: one row per feature (type, title, text, items, links)
- **Pages**: one row per PrismCrawl request with the complete response

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Example output item

Shortened; live values vary.

```json
{
    "page": 1,
    "credits_remaining": 99,
    "success": true,
    "request_id": "66ca8deb-1dc2-4017-865f-c4fb0e3c7c0d",
    "data": {
        "format": "json",
        "content": {
            "search_parameters": {
                "q": "best espresso machines",
                "type": "search",
                "engine": "google",
                "device": null,
                "google_domain": "google.com",
                "gl": "us",
                "hl": "en-US",
                "location": null,
                "tbs": null,
                "tbm": null,
                "udm": null
            },
            "has_next_page": true,
            "results": [
                {
                    "id": "s_972c538a8734a8b7",
                    "rank": 1,
                    "type": "organic",
                    "title": "The 14 Best Espresso Machines, Tested & Reviewed",
                    "url": "https://www.seriouseats.com/best-espresso-machines-5185482",
                    "display_url": "seriouseats.com › best-espresso-machines-5185482",
                    "snippet": "Our favorite espresso machine is the Breville Bambino Plus.",
                    "domain": "seriouseats.com",
                    "favicon": "https://seriouseats.com/favicon.ico",
                    "source_name": "Serious Eats",
                    "position": { "absolute": 1 },
                    "engine": "google",
                    "domain_info": { "tld": "com", "sld": "seriouseats", "category": null },
                    "classification": null
                }
            ],
            "serp_features": [
                {
                    "id": "f_5236e4e73b2337d4",
                    "engine": "google",
                    "type": "people_also_ask",
                    "title": "People also ask",
                    "text": null,
                    "items": [
                        { "title": "Which espresso machine brand is most reliable?", "text": "Which espresso machine brand is most reliable?", "link": null }
                    ],
                    "links": [],
                    "source_result_ids": ["s_972c538a8734a8b7"],
                    "position": { "absolute": 1 },
                    "confidence": 0.8,
                    "extracted_at": "2026-07-01T16:45:24Z"
                }
            ]
        }
    }
}
```

#### Main data fields

| Field | Description |
| --- | --- |
| `request_id` | PrismCrawl request ID. Use it to find the request in your PrismCrawl request history or when contacting support. |
| `data.content.search_parameters` | The parameters PrismCrawl used for the search. |
| `data.content.results[]` | Ranked results: `rank`, `type` (e.g. `organic`, `ad`, `news`, `shopping`), `title`, `url`, `display_url`, `snippet`, `domain`, `source_name`, `position`, `domain_info`. |
| `data.content.serp_features[]` | SERP features: `type` (e.g. `featured_snippet`, `people_also_ask`, `knowledge_panel`, `ai_summary`), `title`, `text`, `items`, `links`, `source_result_ids`, `confidence`. |
| `data.content.has_next_page` | Whether Google shows another results page. |

The full, authoritative schema is in the [PrismCrawl API reference](https://www.prismcrawl.com/docs).

### Tips and advanced options

- **Control cost with Maximum result pages.** Each page is one credit. Start with 1 page and increase only if you need deeper results.
- **Keep targeting fixed for rank tracking.** Compare runs that use the same country, language, location, and device.
- **Use a time filter for fresh results**, for example `qdr:d` for the past day, or pick the News vertical (`tbm`) or tab (`udm`).
- **Use Zero trace for sensitive queries.** PrismCrawl then keeps only audit and billing metadata. Results still appear in your Apify dataset.
- **Standby (HTTP) mode.** For low-latency calls from your own code, use the Actor's Standby URL: `POST /` with the same JSON fields as the input (without `prismcrawlApiKey` and `maxPages`), and send your PrismCrawl key in the `x-prismcrawl-api-key` header. The response is the PrismCrawl response body and status code, unchanged. Each call fetches one page.
- **Source HTML** (`html`, `rewrite_links`), pre-encoded queries (`query_encoded`), and `color_scheme` are PrismCrawl parameters that this Actor doesn't expose, because they don't change the normalized results. Use the [PrismCrawl API](https://www.prismcrawl.com/docs) directly if you need them.

### Errors and retries

The Actor reports PrismCrawl errors in the run's status message and log, including the PrismCrawl **request ID**:

| HTTP status | Meaning | Retried? |
| --- | --- | --- |
| 400 | Invalid request parameters | No |
| 401 | Missing, invalid, expired, or revoked API key | No |
| 402 | No PrismCrawl credits remaining | No |
| 429 | Rate limit exceeded | Yes, up to 3 times, waiting until the reported reset time (max 60 s) |
| 5xx | PrismCrawl could not complete the request | Yes, up to 3 times with exponential backoff |

Connection failures that never reached PrismCrawl (DNS errors, refused connections) are also retried. Retries only happen for failed requests, which PrismCrawl doesn't charge for, so a retry doesn't cause a duplicate charge. If a request times out, the Actor does **not** retry, because the search may have completed on PrismCrawl's side. Check your PrismCrawl request history before running again. If an error happens after some pages were saved, the run fails but the saved pages stay in the dataset.

### FAQ, disclaimers, and support

**Is this an independent Google scraper?** No. All searches are performed by the PrismCrawl API under your PrismCrawl account and subject to [PrismCrawl's terms](https://www.prismcrawl.com/terms). This Actor forwards your parameters and stores the response.

**Are results cached?** No. PrismCrawl runs a live search for every successful request.

**Which SERP features will I get?** It depends on the query, market, and device. Features appear only when Google shows them and PrismCrawl recognizes them.

**Where can I learn more?** The [PrismCrawl API documentation](https://www.prismcrawl.com/docs) covers every parameter and response field. PrismCrawl also offers other endpoints (Bing, DuckDuckGo, Google Maps, Google Shopping, Amazon, app stores, and reviews) at [prismcrawl.com](https://www.prismcrawl.com/).

**Support.** For problems with this Actor, open an issue in the **Issues** tab. For account, credit, or API questions, contact PrismCrawl at support@prismcrawl.com and include the request ID.

Make sure your use of search data complies with applicable laws and the terms of the services involved.

# Actor input Schema

## `prismcrawlApiKey` (type: `string`):

Your PrismCrawl API key, sent to PrismCrawl as the <code>x-api-key</code> header. Create or rotate it in the <a href="https://www.prismcrawl.com/" target="_blank">PrismCrawl dashboard</a>; new accounts get 100 free credits. The key is stored encrypted by Apify and is never logged or written to the dataset.

## `query` (type: `string`):

What to search for on Google, exactly as you would type it into the search box. Search operators such as <code>site:</code> work as usual. Limited to 8,192 UTF-8 bytes.

## `maxPages` (type: `integer`):

How many Google result pages to fetch. The Actor stops early when PrismCrawl reports there is no next page. <strong>Each page is a separate PrismCrawl search and uses one credit.</strong>

## `start` (type: `integer`):

Zero-based result offset for the first page (for example <code>10</code> starts at the second page). Leave empty to start at the first result. Later pages advance the offset by 10.

## `gl` (type: `string`):

Two-letter Google result-country code. Results from this country are boosted rather than strictly filtered. To restrict results to documents from a country, use <strong>Restrict to countries (cr)</strong>.

## `hl` (type: `string`):

Google interface language. It can also influence which results are chosen for international queries. To restrict results to documents in a language, use <strong>Restrict to languages (lr)</strong>.

## `google_domain` (type: `string`):

The Google domain to search, for example <code>google.co.uk</code>. This is independent of country, language, and location.

## `location` (type: `string`):

Search as if from a named place, for example <code>Baltimore,Maryland,United States</code>. The value must be an active <em>Canonical Name</em> from <a href="https://developers.google.com/google-ads/api/data/geotargets" target="_blank">Google's geo-target list</a>. Cannot be combined with coordinates or UULE.

## `latitude` (type: `number`):

Searcher latitude, for example <code>39.2904</code>. Set together with longitude. Cannot be combined with location or UULE.

## `longitude` (type: `number`):

Searcher longitude, for example <code>-76.6122</code>. Set together with latitude.

## `radius` (type: `integer`):

Bias results to within this many meters of the coordinates; results outside it may still appear. Requires latitude and longitude. Maximum 199 for desktop or no device, 1,000 for mobile or tablet.

## `device` (type: `string`):

Search as a desktop, mobile, or tablet device. Rankings and SERP features can differ by device. Leave empty for PrismCrawl's default.

## `tbm` (type: `string`):

Search a Google vertical instead of the regular results page. Leave empty for regular web results. Cannot be combined with <strong>Search tab (udm)</strong>.

## `udm` (type: `string`):

Select a Google search tab by its numeric <code>udm</code> value, for example <em>Web</em> (links only) or <em>AI Mode</em>. Availability varies by market. Cannot be combined with <strong>Search vertical (tbm)</strong>.

## `tbs` (type: `string`):

Google's native advanced-filter string. Common time filters: <code>qdr:h</code> (past hour), <code>qdr:d</code> (past day), <code>qdr:w</code> (past week), <code>qdr:m</code> (past month), <code>qdr:y</code> (past year); add a number for multiples, e.g. <code>qdr:m6</code>. Custom range: <code>cdr:1,cd\_min:8/1/2026,cd\_max:8/12/2026</code>. Sort by date (News): <code>sbd:1</code>. Supported filters vary by vertical and market.

## `safe` (type: `string`):

Turn Google's SafeSearch filtering on or request unfiltered results. Leave empty for Google's default.

## `lr` (type: `string`):

Only return documents in these languages, using <code>lang\_\<code></code> syntax. Separate alternatives with <code>|</code>, e.g. <code>lang\_fr|lang\_de</code>.

## `cr` (type: `string`):

Only return documents from these countries, using <code>country\<CC></code> syntax. Separate alternatives with <code>|</code>, e.g. <code>countryUS|countryCA</code>.

## `uule` (type: `string`):

A raw Google-encoded location (starting with <code>w+</code> or <code>a+</code>), forwarded unchanged. Google may ignore unsupported values. Prefer <strong>Location</strong> unless you already have UULE strings. Cannot be combined with location or coordinates.

## `nfpr` (type: `string`):

Whether Google may automatically correct the spelling of your query.

## `filter` (type: `string`):

Request Google's duplicate-result filtering on or off. Google does not guarantee this for regular search pages.

## `pws` (type: `string`):

Ask Google to turn personalization off or permit it. This does not disable location, language, or device effects.

## `zero_trace` (type: `boolean`):

When enabled, PrismCrawl does not store the source HTML or parsed JSON for these searches; only audit and billing metadata is kept. Results still appear in this Actor's dataset.

## Actor input object example

```json
{
  "query": "best coffee shops in Baltimore",
  "maxPages": 1,
  "gl": "us",
  "hl": "en-US",
  "google_domain": "google.com",
  "zero_trace": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `responses` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "best coffee shops in Baltimore"
};

// Run the Actor and wait for it to finish
const run = await client.actor("prismcrawl/prismcrawl-google-search-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "query": "best coffee shops in Baltimore" }

# Run the Actor and wait for it to finish
run = client.actor("prismcrawl/prismcrawl-google-search-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "best coffee shops in Baltimore"
}' |
apify call prismcrawl/prismcrawl-google-search-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,prismcrawl/prismcrawl-google-search-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/FHd6pL9BF6ULJhzkU/builds/2Z906wK1JyPL2BHWH/openapi.json
