Search API

Web Search API.
JSON or Markdown.

Send one HTTP request and get live results from the world’s most-used search engine back as clean JSON or Markdown, as people in the country you choose see them. Search the web, news, shopping, places, autocomplete, scholarly papers or AI answers. $2.50 per 1,000 successful searches.

Failed searches are free No subscription One key for Search, Fetch & MCP

Your first request

Create an API key on your dashboard, then send a query. Only query is required.

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

The response lists up to 10 web results, plus any extra blocks the results page showed, such as an AI overview, related questions or related searches:

{
  "request_id": "6f1c2b9e-3d4a-4f7b-9c1e-2a5b8d0e7f13",
  "search": {
    "engine": "google",
    "type": "search",
    "query": "coffee grinders",
    "country": "us",
    "page": 1
  },
  "results": [
    {
      "position": 1,
      "title": "The Best Coffee Grinders of 2026",
      "url": "https://www.example.com/coffee-grinders",
      "snippet": "We tested 20 burr and blade grinders for consistency and noise.",
      "displayed_url": "https://www.example.com › reviews › coffee-grinders"
    }
  ],
  "people_also_ask": [{ "question": "Are burr grinders worth it?" }],
  "result_count": 1,
  "charged_units": 1,
  "balance_remaining_usd": 12.3456,
  "processing_time_ms": 2140
}

Add "format": "markdown" to get the same search as Markdown. It is ready to paste into a language-model prompt, and text from web pages is escaped so it cannot inject HTML or links.

Seven kinds of results, one endpoint

Set type to choose what to search. Every type costs the same.

TypeReturnsOptions
searchUp to 10 web results, plus AI overview, knowledge panel, related questions, map pack, ads and related searches when the results page shows themAll options
newsUp to 10 news articlescountry, language, page
shoppingUp to 100 shopping offers with pricescountry, language, page
placesUp to 10 places from map searchcountry, language
autocompleteUp to 10 query suggestionscountry, language
scholarUp to 10 scholarly publicationslanguage, page
ai_modeAn AI search answer with its references. See AI answers and AI overviewscountry, language

An option that a type does not accept returns 400 unsupported_option before any charge. The API never drops an option silently. See parameters and request types.

Search from where your users are

  • Country: a two-letter code such as us, gb or de. The default is us.
  • Language: the interface language, such as en, de or pt-BR.
  • Location: a city or region name, such as Austin,Texas,United States, or an encoded location token in uule.
  • Device: desktop or mobile.
  • Time range: the last hour, day, week, month or year.
  • More: page (1 to 10), safe_search, domain (the country site, such as co.uk) and autocorrect.

Search operators such as site: work inside the query.

Up to 10 searches in one request

POST /v1/search/batch runs 1 to 10 searches at the same time. Each item is billed only if it succeeds, and each one reports its own status.

curl -s https://api.packetstream.io/v1/search/batch \
  -H "Authorization: Bearer $PACKETSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"searches": [
        {"query": "coffee grinders"},
        {"query": "coffee grinders", "type": "shopping"},
        {"query": "coffee grinders", "type": "news"}
      ]}'

Python

import os
import requests

response = requests.post(
    "https://api.packetstream.io/v1/search",
    headers={"Authorization": f"Bearer {os.environ['PACKETSTREAM_API_KEY']}"},
    json={"query": "coffee grinders", "type": "news"},
    timeout=35,
)
response.raise_for_status()
for result in response.json()["results"]:
    print(result["position"], result["title"], result["url"])

The server finishes or gives up within 25 seconds, so use a client timeout of at least 35 seconds.

Pricing

Pay for results, not for tries.

Each successful search costs $0.0025. Searches draw from your prepaid PacketStream balance, the same balance as proxy bandwidth.

  • Failed searches are free. Validation errors, rate limits, balance errors and upstream failures cost nothing.
  • One price. Every type and option costs the same. A search that finds nothing is still billed, because it ran.
  • No subscription. $50 minimum purchase. Nothing renews.
  • 20 requests per second per key, with bursts of 200.

Questions

Is this a SERP API?

Yes. It runs a live search on the top search engine for each request and returns the results page as structured data: organic results, rich blocks and ads in JSON, or the same results as Markdown.

Can AI agents use it?

Yes. The same key works with the PacketStream MCP server, which gives Claude Code, Codex, Cursor and other clients a search tool and a page-reading tool. The Fetch API reads any result as Markdown.

I use the Custom Search JSON API. Can I switch?

Yes. The top search engine is closing that API to existing customers on January 1, 2027. The migration guide maps each Custom Search parameter to ours and says which ones have no equivalent.

Do you store my queries?

No. For billing and support we record each request’s ID, type, outcome, latency and charge. We do not store your query text or the results.

How do I check my balance?

GET /v1/account returns your balance, the price and your usage counts. It is free. The dashboard also shows daily usage and spend.

Live search results.
One request away.