Reserp Python SDK
Google Search data, structured for scale.
The official minimal Python client for Reserp, a high-yield Google Search API and SERP API for high-volume, recurring production search workloads.
Reserp returns visible Google Search result blocks as structured JSON, including organic listings, news, carousels, sitelinks, pagination, and nested results in Google's response order. Start for free with no credit card required.
Website · API documentation · OpenAPI 3.1 · Postman · Pricing
Design
This package is a transparent wrapper over POST /v1/serp:
- One client call sends exactly one API request.
- The request dictionary is the public API request body.
- The return value is the native
httpx.Response. - Status codes, response headers, success payloads, and error payloads remain unchanged.
- Native HTTPX request options and caller-configured sync or async clients pass through.
- Typed dictionaries describe the public API contract without changing it at runtime.
The client does not retry, back off, impose its own timeouts, build or validate Google URLs, follow pagination, transform responses, cache data, batch work, or control concurrency. Those decisions remain with the caller and the configured HTTPX transport.
Installation
pip install reserp
Python 3.10 or later is required.
Quick start
import os
from reserp import Reserp
with Reserp(api_key=os.environ["RESERP_API_KEY"]) as reserp:
response = reserp.search(
{"url": "https://www.google.com/search?q=best+pizza+in+dubai&gl=ae&hl=en"}
)
data = response.json()
if not data["ok"]:
print(response.status_code, data["error"], data["retryable"], data["billed"])
else:
for result in data["results"]:
print(result.get("text"), result.get("url"))
Create an API key in the Reserp dashboard. Keep API keys on your server; never embed one in browser or mobile code.
Production workloads at scale
For bulk Google Search, recurring SERP collection, SEO monitoring, market intelligence, competitive research, and other business-critical data pipelines, place the API behind infrastructure that owns durability and throughput:
producer -> durable queue -> workers with controlled concurrency -> Reserp API
Use Cloud Tasks, SQS, BullMQ, Celery, or an equivalent durable queue. Let one layer own retries and backoff, bound worker concurrency, respect Retry-After, persist job state and results, and design for possible duplicate queue delivery. These practices are identical whether a worker uses this transparent client or direct HTTP.
Native transport control
Use an HTTPX client to control transport behavior without an SDK policy layer:
import httpx
limits = httpx.Limits(max_connections=50, max_keepalive_connections=20)
timeout = httpx.Timeout(20.0)
with httpx.Client(limits=limits, timeout=timeout) as transport:
reserp = Reserp(api_key=os.environ["RESERP_API_KEY"], client=transport)
response = reserp.search(
{
"url": "https://www.google.com/search?q=semiconductor+manufacturing&gl=us&hl=en&tbs=qdr:w"
},
headers={"x-request-id": "your-job-id"},
follow_redirects=False,
)
Additional non-conflicting keyword arguments are passed to httpx.Client.post or httpx.AsyncClient.post after the SDK supplies the endpoint, authorization header, content type, and JSON body. If you do not inject a client, normal HTTPX transport defaults apply.
Transport and timeout failures remain native HTTPX exceptions. HTTP error responses do not become SDK exceptions; inspect the native status, headers, and API JSON body.
Async client
import asyncio
import os
import httpx
from reserp import AsyncReserp
async def main() -> None:
async with httpx.AsyncClient() as transport:
reserp = AsyncReserp(
api_key=os.environ["RESERP_API_KEY"],
client=transport,
)
response = await reserp.search(
{"url": "https://www.google.com/search?q=photonic+computing&gl=us&hl=en"}
)
print(response.status_code, response.json())
asyncio.run(main())
Direct HTTP equivalent
The client call is equivalent to this direct API request:
curl https://api.reserp.ai/v1/serp \
--request POST \
--header "Authorization: Bearer $RESERP_API_KEY" \
--header "Content-Type: application/json" \
--data '{"url":"https://www.google.com/search?q=photonic+computing&gl=us&hl=en"}'
Use either interface according to your application. Both expose the same Google Search API contract and leave workload behavior under your control.
Results and pagination
The API preserves visible result blocks and their order rather than forcing every Google SERP feature into a flat organic-results model. A successful response can contain organic listings, news, carousels, sitelinks, and nested children.
Follow the API-provided pagination.nextUrl for the next page instead of deriving pagination from len(data["results"]):
with Reserp(api_key=os.environ["RESERP_API_KEY"]) as reserp:
first_response = reserp.search(
{"url": "https://www.google.com/search?q=photonic+computing&gl=us&hl=en"}
)
first_page = first_response.json()
if first_page["ok"]:
next_response = reserp.search({"url": first_page["pagination"]["nextUrl"]})
next_page = next_response.json()
Standard Google Search parameters such as q, gl, hl, tbm, and tbs belong in the submitted Google URL. See the API documentation for the authoritative request contract.
Errors and billing signals
API errors use stable JSON fields:
{
"ok": false,
"error": "rate_limited",
"retryable": true,
"billed": false
}
The API response is authoritative. Automatically retry only when retryable is true and billed is false, respect Retry-After when present, and avoid blindly retrying an ambiguous transport failure whose billing outcome is unknown. The client does not make those decisions.
API resources
- Google Search API documentation
- OpenAPI 3.1 document
- Postman workspace
- JavaScript and TypeScript client on GitHub
- JavaScript and TypeScript package on npm
- Plans and pricing
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reserp-0.2.0.tar.gz.
File metadata
- Download URL: reserp-0.2.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
431f1f24588302ec2dd4766888dbfd425c61f8288921eb2624f1425559e9d36e
|
|
| MD5 |
d05ee91d56a8f9aff5441463d21b899d
|
|
| BLAKE2b-256 |
183c7b179c92d3d7f3487eaf1a10caf6d74625ed6c97f5bd186812fb15e08b4c
|
File details
Details for the file reserp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: reserp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
960c0ec98af35bd0ce1fb116729dcda43948a94da45f89f5666c2098b9290e42
|
|
| MD5 |
34d9f4af899e7dd3f082974832ce099e
|
|
| BLAKE2b-256 |
0ef49f716ef2d6bed691ec9e9c18d46d52c2f9607cf52491c27cbc52cfb045f5
|