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/urls, and returns the public JSON payload unchanged. The v2 URL index is flat, page ordered, and deduplicated, with an optional visible-text field on 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["urls"]:
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["urls"]).
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.1
Version 0.2 moves from the v1 recursive results[] response to the v2 flat urls[] index. Other notable field renames are url → request.url, finalUrl → page.url, pagination.nextUrl → pagination.next_url, and billingSource → billing_source.
For typed result families, SERP features, 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.2.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.2.0.tar.gz | 112.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_reserp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 116.6 kB
Release files / langchain_reserp-0.2.0.tar.gz
| Download URL | langchain_reserp-0.2.0.tar.gz |
|---|---|
| Size | 112.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bce3338eb7e5f814feb4706c7b598cb9df29ab4c652ae17b782f8c55e6a4b48c
|
|
BLAKE2b-256 checksum How to use checksums |
c223f4f5e9fd7747590cd6d0c55694ae3d4c93c3cad477f1a0e9a697c30d5baa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / langchain_reserp-0.2.0-py3-none-any.whl
| Download URL | langchain_reserp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
054187117b1bb623133c0fc0378b295021c165b4823fa6c4cbf7ec5235ddee4d
|
|
BLAKE2b-256 checksum How to use checksums |
aaa6713d5bfeae97c14934ad37977eefc8f857c1c7c4e7069ac6c3c4a1f8e3f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|