ProtoScrape’s Google AI Mode API turns a supported search query into a job you can track and a structured result you can use in your application. A successful result contains answer text, available citations and metadata describing the observation.

This is an independent ProtoScrape service, not an official Google API. Google AI Mode is available in early access with United States, English and desktop settings. Check availability before building a collection run, because engine status can change.

Prepare your account and check availability

Create an account in the ProtoScrape workspace, verify your email and generate an API key. Store the key as a server-side secret named PROTOSCRAPE_API_KEY. Do not put it in frontend JavaScript, a public repository or a URL.

The public engine endpoint lists current status and supported options:

curl https://api.protoscrape.com/v1/engines

Find google_ai_mode and confirm that its status is available. The presence of another engine ID in this list does not mean it is enabled; inspect the status field for that engine.

Submit your first query

Run this command from your server or a local shell after setting the environment variable. Change the idempotency key for each intentionally new observation, and keep it unchanged when retrying the same submission.

curl https://api.protoscrape.com/v1/jobs \
  -H "Authorization: Bearer $PROTOSCRAPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: research-ai-mode-001' \
  -d '{
    "engine": "google_ai_mode",
    "query": "What should a small team consider when choosing project management software?",
    "country": "US",
    "language": "en",
    "device": "desktop"
  }'

The response includes an id and status. HTTP 202 means the job was accepted and is still in progress. Save its ID; do not create another job just because the answer is not ready yet.

Follow the job and retrieve its result

Set JOB_ID to the ID returned by your submission. Poll with a delay, increasing the interval between requests while the job is active.

curl "https://api.protoscrape.com/v1/jobs/$JOB_ID" \
  -H "Authorization: Bearer $PROTOSCRAPE_API_KEY"

When status is succeeded, retrieve the result:

curl "https://api.protoscrape.com/v1/jobs/$JOB_ID/result" \
  -H "Authorization: Bearer $PROTOSCRAPE_API_KEY"

Read data.answer_text for the answer and data.citations for returned sources. Each citation has url and title fields. Use metadata.collected_at to identify when the observation completed. A successful answer can have an empty citation list, so your application should handle that case without treating it as a collection error.

If the job is failed, cancelled or expired, stop polling and record that outcome. Those states do not have a successful result to retrieve. The API reference explains errors and request limits.

Choose how your application waits

For a single interactive lookup, add ?wait_seconds=25 to the submission URL. The API waits up to that window before returning a job object. If it is still processing, continue with the same ID. Even when the job succeeds within the window, retrieve the answer through the result endpoint.

For scheduled work, use the default asynchronous behavior and store IDs in your application. The sync and async guide covers this lifecycle in more detail.

Keep an observation useful over time

Save the exact query, settings, timestamp, answer and original source URLs together. Results are retained for approximately seven days; export anything you need for a longer study. A successful Google AI Mode observation currently uses five credits. Re-reading that result does not create a new collection charge.

Begin with a small set of meaningful questions. Once the integration works, the citation analysis guide helps turn those observations into a report with clear definitions and sample sizes.

About ProtoScrape

We provide an independent API for collecting structured AI search observations. These guides explain our public product and workflows you can build with it.

Explore what ProtoScrape provides →