LangChain Reserp
A minimal LangChain tool for the Reserp Google Search API v2.
The tool accepts a complete Google Search URL, makes one request to POST /v2/serp/search, and returns the public JSON payload unchanged. Its results[] array is flat, page ordered, and deduplicated, with optional visible text for each URL. The package adds no retries, timeout policy, concurrency management, caching, queues, result conversion, or automatic pagination.
Installation
pip install langchain-reserp
Usage
import os
from langchain_reserp import ReserpSearchTool
os.environ["RESERP_API_KEY"] = "your-api-key"
tool = ReserpSearchTool()
result = tool.invoke(
{"url": "https://www.google.com/search?q=photonic+computing&gl=us&hl=en"}
)
if result["ok"]:
for item in result["results"]:
print(item.get("text"), item["url"])
Every successful response includes pagination.next_url. Submit that value in a later tool call to advance; its presence does not prove another page contains results. Do not infer pagination from len(result["results"]).
The surrounding application owns retries, timeouts, task queues, concurrency, observability, and pagination. When the API reports retryable, this package exposes that field and takes no action itself.
Migrating
From 0.2, replace /v2/serp/urls with /v2/serp/search and urls[] with results[]. When migrating directly from v1, other notable field renames are url → request.url, finalUrl → page.url, pagination.nextUrl → pagination.next_url, and billingSource → billing_source.
For typed, page-ordered SERP blocks and explicit positions, call the structured v2 endpoint directly or use an official Reserp SDK.
API contract
License
MIT
Metadata
Release files for langchain-reserp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_reserp-0.3.0.tar.gz | 112.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_reserp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 116.6 kB
Release files / langchain_reserp-0.3.0.tar.gz
| Download URL | langchain_reserp-0.3.0.tar.gz |
|---|---|
| Size | 112.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b2857add0e4416f61b69c8e15e5a4a356fb0be33ddf7cdf0ca6afa8864b06df
|
|
BLAKE2b-256 checksum How to use checksums |
99b8bcf1c15884b087b3326f195640056ee2fa982ebf8fdc4d6103d6e2361531
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / langchain_reserp-0.3.0-py3-none-any.whl
| Download URL | langchain_reserp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1828e7c2ef315299b7737f3deb798361513ce96f5c96d3465d673468094744da
|
|
BLAKE2b-256 checksum How to use checksums |
3a4763d3860f6b92a94e84958c569c4f8bdca364be5405487906bda1eecbdcd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|