Search API · AI answers

AI search answers
and AI overviews, as data.

Track what the top search engine’s AI answers say and which sources they cite. The PacketStream Search API returns its AI search answers and AI overviews as JSON or Markdown, with their references. $0.0025 per successful search.

AI search answers

Set type to ai_mode. You can add country and language; other options return 400 unsupported_option before any charge.

curl -s https://api.packetstream.io/v1/search \
  -H "Authorization: Bearer $PACKETSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "how does a burr coffee grinder work", "type": "ai_mode", "country": "us"}'

A live response, shortened. The answer is in ai_mode: text_blocks hold the text, and references list the sources the answer cited.

{
  "request_id": "6d6a0eb6-3252-4f31-b78c-461fef48f795",
  "search": {
    "engine": "google",
    "type": "ai_mode",
    "query": "how does a burr coffee grinder work",
    "country": "us",
    "page": 1
  },
  "ai_mode": {
    "text_blocks": [
      {
        "type": "paragraph",
        "text": "A burr coffee grinder works by crushing and cutting coffee beans between two revolving abrasive surfaces (called burrs) with a tightly controlled gap, …"
      },
      {
        "type": "list",
        "items": [
          "Feeding: Whole coffee beans drop from the hopper into the chamber between the two burrs.",
          "Crushing/Breaking: One burr stays stationary while the other spins …",
          …
        ]
      },
      …
    ],
    "references": [
      {
        "title": "Deep Dive: Coffee Grinder Burrs",
        "url": "https://counterculturecoffee.com/blogs/counter-culture-coffee/deep-dive-coffee-grinder-burrs",
        "source": "Counter Culture Coffee"
      },
      …
    ]
  },
  "result_count": 5,
  "charged_units": 1,
  "processing_time_ms": 4208
}
  • An ai_mode response has no results list. result_count is the number of references.
  • Each text block is a paragraph or heading with its text, or a list with its items. There are up to 40 blocks and 20 references, and each text value is at most 2,000 bytes.
  • The search engine sometimes answers without sources. references is then empty and result_count is 0. The search is still billed, because it ran.

AI overviews

AI overviews come with a normal web search. Send a search request (the default type). When the results page shows an AI overview, the response has an ai_overview block next to the web results, with the same shape as ai_mode.

curl -s https://api.packetstream.io/v1/search \
  -H "Authorization: Bearer $PACKETSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "how does a burr coffee grinder work", "country": "us"}'

A live response, shortened:

{
  "request_id": "a9ccfd72-a67c-4789-b25e-7e3f36e5b659",
  "search": { "engine": "google", "type": "search", "query": "how does a burr coffee grinder work", "country": "us", "page": 1 },
  "results": [
    {
      "position": 1,
      "title": "How does a coffee grinder work?",
      "url": "https://www.cartwrightcoffee.co.uk/blog/how-does-a-coffee-grinder-work/",
      "snippet": "Flat burr grinders work mainly through centrifugal force. …",
      "displayed_url": "https://www.cartwrightcoffee.co.uk › Blog"
    },
    …
  ],
  "ai_overview": {
    "text_blocks": [
      { "type": "paragraph", "text": "A burr coffee grinder works by crushing and cutting whole coffee beans between two revolving abrasive surfaces (called burrs) separated by a user-adjusted gap. …" },
      { "type": "heading", "text": "The Core Grinding Process" },
      …
    ],
    "references": [
      { "title": "Burr mill - Wikipedia", "url": "https://en.wikipedia.org/wiki/Burr_mill", "source": "Wikipedia" },
      …
    ]
  },
  "people_also_ask": [{ "question": "Which is better, a burr or blade coffee grinder?" }, …],
  "related_searches": […],
  "search_information": { "total_results": 130 },
  "result_count": 5,
  "charged_units": 1,
  "processing_time_ms": 3096
}
  • The block appears only when the results page showed an AI overview and it could be read reliably. Many queries have none, so do not build logic that needs it.
  • Mobile searches ("device": "mobile") usually carry fewer blocks.
  • The search is billed whether or not an AI overview appears.

Markdown for AI pipelines

Add "format": "markdown" to either request. The Markdown output includes the AI overview or AI search answer next to the results, with text from web pages escaped so it cannot inject HTML or links.

What teams use it for

  • AI visibility tracking: see whether your pages appear in the references for the queries you care about.
  • Answer monitoring: record what the AI answer says about a brand or product over time.
  • Market checks: compare answers across countries and languages with country and language.

To run many queries at once, batch searches takes up to 10 searches in one request.

Pricing

Each successful search costs $0.0025, or $2.50 per 1,000, the same for AI answers as for every other type. Failed searches are free. Searches draw from your prepaid PacketStream balance, with a $50 minimum purchase and no subscription. Each key can make 20 requests per second, with bursts of 200. See API pricing.

See what search AI says.
And who it cites.