Skip to main content
For AI agents: a documentation index is available at https://docs.parallel.ai/llms.txt. The full text of all docs is at https://docs.parallel.ai/llms-full.txt. You may also fetch any page as Markdown by appending .md to its URL or sending Accept: text/markdown.
The Parallel Search API is available in the Google Gemini Enterprise Agent Platform as an external grounding provider. Use it to ground Gemini model responses with up-to-date context from the public web. There are two ways to get started: Both paths have the same 200 prompts per minute quota. If a request carries both a Marketplace subscription and an API key, the API key takes precedence. Google classifies Grounding with Parallel as a Separate Offering under your Google Cloud Agreement, so Parallel’s terms govern the search itself. See Google’s Grounding with Parallel documentation for their side of the integration.

Use cases

  • Using web data for information completion or enrichment.
  • Multi-hop agents that require deeper web searches for complex questions.
  • Building APIs that integrate web search data.
  • Employee-facing assistants for up-to-date analysis and reporting.
  • Consumer apps (retail, travel) supporting informed purchase decisions.
  • Automated agents (e.g., news analysis, KYC checks).
  • Vertical agents (sales, coding, finance) fetching the latest context from the web.

Example

Who won the 2025 Las Vegas F1 Grand Prix?

Supported models

The following models support Grounding with Parallel web search:
  • Gemini 2.5 Flash (gemini-2.5-flash)
  • Gemini 2.5 Flash-Lite (gemini-2.5-flash-lite)
  • Gemini 2.5 Pro (gemini-2.5-pro)
  • Gemini 3.1 Pro (gemini-3.1-pro-preview)
  • Gemini 3.1 Flash-Lite (gemini-3.1-flash-lite)
  • Gemini 3.5 Flash (gemini-3.5-flash)

Setup

With either option, Google Cloud sends data such as queries derived and rewritten from the original user prompt to Parallel Web Search for processing. Use of the service is governed by the Google Cloud Marketplace terms for Parallel Web Search if you subscribe through Marketplace, or by Parallel’s terms of use and acceptable use policy if you bring your own key.

Agent Studio

You can also use Parallel as a grounding source directly in Agent Studio — no code required. This requires an active Google Cloud Marketplace subscription.
  1. Open Agent Studio in the Google Cloud Console.
  2. In the side panel under Model settings, find Grounding and turn on Partners (Search results from grounding partners).
  3. Select Parallel Web Search, then click Apply.
  4. Enter your prompt and send it. The model response will be grounded with web results from Parallel.
Agent Studio is a great way to experiment with grounded responses before integrating via the API.

Make a grounded request

Request grounded responses from Gemini by using the Google Gen AI SDK or the REST API. Before running the examples, complete one of the setup options. Replace MODEL_ID with a supported model, such as gemini-3.5-flash. Both setup paths make the same call. Marketplace subscribers send no key; Bring Your Own Key users set the API key on the parallelAiSearch tool, shown commented out in each example.

Google Gen AI SDK

Authenticate with Google Cloud, then set the environment variables the SDK clients read:
GOOGLE_GENAI_USE_ENTERPRISE routes the client to the Gemini Enterprise Agent Platform rather than the Gemini Developer API. Use global for the location unless you have a data residency requirement, in which case set a region such as us-central1.
Install the Google Gen AI SDK for Python:
Configure the search with the tool’s custom_configs field (customConfigs in Java and TypeScript). It accepts the optional parameters in Configuration options, including source_policy, excerpts, max_results, and mode.
enable_zero_data_retention is not exposed by the Gen AI SDKs — ToolParallelAiSearch accepts only the API key and custom configs. To use the ZDR offering, call the REST API directly.

REST API

Send requests to the regional endpoint:
  • PROJECT_ID: Your Google Cloud project ID.
  • LOCATION: The Google Cloud region that processes the request. Regional availability varies by model — check the model’s page in Google’s docs before picking one. To use the global endpoint, drop the region prefix from the hostname (https://aiplatform.googleapis.com) and use global in place of LOCATION in the path. This is unrelated to the location search parameter below.
  • MODEL_ID: The Gemini model to use (for example, gemini-3.5-flash).
No api_key field is needed when using the Marketplace subscription. Set enable_zero_data_retention to true to use the ZDR offering for the request (requires an active ZDR subscription); if unspecified, the standard offering is used:
Execute the request:
For error responses, see Warnings and errors.

Read the grounded response

Grounded responses include a groundingMetadata object alongside the generated text. Use it to render citations and to see which search queries Gemini sent to Parallel. Gemini decides whether to search. If it answers without grounding, groundingMetadata is absent — check for it before rendering citations.
The REST API returns these fields in camelCase. The Gen AI SDKs expose the same fields in snake_case — REST’s groundingMetadata.groundingSupports is grounding_metadata.grounding_supports in Python.

Render inline citations

Each groundingSupports entry carries a segment that locates the cited claim in the answer. Two details matter:
  • startIndex and endIndex are byte offsets, not character positions. Slicing a Python string directly by them misplaces markers in any answer containing non-ASCII text. Splice in byte space instead.
  • The offsets are relative to a single Part, identified by partIndex — not to the whole concatenated answer.
Walk each part’s supports in reverse so that inserting a marker doesn’t shift the offsets you haven’t used yet:

Configuration options

All customConfigs fields are optional. For best performance, use defaults unless you have specific requirements. In addition, the parallelAiSearch object accepts an optional enable_zero_data_retention field (a sibling of customConfigs, not nested inside it). Set it to true to route the request through the ZDR offering for sensitive workloads — this requires an active ZDR subscription on Google Cloud Marketplace and is not available with Bring Your Own Key. Both source_policy lists accept either a full domain (www.example.com) or a domain extension beginning with a period (.gov, .edu, .co.uk). The leading period is required for extensions. The combined number of entries across include_domains and exclude_domains cannot exceed 200. The defaults suit most workloads. Reach for source_policy when you need to restrict sources, mode: advanced when answer quality matters more than latency, and excerpts when you are managing context length. For guidance on writing search queries, see Search API Best Practices.
For a complete working example, see the Gemini demo in the Parallel Cookbook.

Quota

The default quota is 200 prompts per minute. To request higher rate limits, share your use case and requirements with:
  • Google Cloud Marketplace: your Google account team.
  • Bring Your Own Key: support@parallel.ai and your Google account team.

Billing

Using Gemini with Parallel can incur charges for:
  • Gemini token consumption — prompt, thinking, and output tokens.
  • Gemini grounding requests — Google charges per grounded prompt in addition to tokens.
  • Parallel Web Search API usage.
See Google’s Gemini Enterprise Agent Platform pricing for the Google charges. Search API charges depend on your setup path:
  • Google Cloud Marketplace: consolidated into your Google Cloud billing.
  • Bring Your Own Key: billed through Parallel’s pricing.