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.
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.
| Type | Returns | Options |
|---|---|---|
search | Up to 10 web results, plus AI overview, knowledge panel, related questions, map pack, ads and related searches when the results page shows them | All options |
news | Up to 10 news articles | country, language, page |
shopping | Up to 100 shopping offers with prices | country, language, page |
places | Up to 10 places from map search | country, language |
autocomplete | Up to 10 query suggestions | country, language |
scholar | Up to 10 scholarly publications | language, page |
ai_mode | An AI search answer with its references. See AI answers and AI overviews | country, 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,gborde. The default isus. - Language: the interface language, such as
en,deorpt-BR. - Location: a city or region name, such as
Austin,Texas,United States, or an encoded location token inuule. - Device:
desktopormobile. - Time range: the last
hour,day,week,monthoryear. - More:
page(1 to 10),safe_search,domain(the country site, such asco.uk) andautocorrect.
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.
$50 buys 20,000 successful searches. Proxy traffic, fetches and MCP tool calls use the same balance.
Get an API key All API pricingQuestions
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.
Use cases
What people build with PacketStream.
SEO and SERP rank tracking
Track search rankings by country, city and device as JSON, and check your own localized pages through residential proxies.
See the setupPrice monitoring
Check public prices from the country you care about, and pull shopping search offers as JSON from the same balance.
See the setupAd verification
Follow your tracking links and landing pages from each country, and check your search text ads as JSON.
See the setupCompare
How PacketStream compares.
PacketStream vs. SerpApi
$2.50 per 1,000 searches with no plan, versus monthly plans at $9.17 to $25 per 1,000.
Read comparisonPacketStream vs. Firecrawl
Pay only for successful calls, with no plan and a balance that does not expire, instead of monthly credit plans.
Read comparisonPacketStream Search API vs. DeepSeek Search API
Live results from the top search engine with news, shopping, places and AI answers, versus a list of pages from DeepSeek's own search engine.
Read comparisonPacketStream Fetch API vs. DeepSeek Fetch API
Residential IPs, country targeting, paging and the final URL and status, versus a URL in and a title and Markdown out.
Read comparison