Agent web search & research API — structured query, news, and multi-source research with citations
Project description
SearchLane
Agent web search & research API — structured hits, news search, and multi-source research briefs with citations.
Part of Talocode — open tools people trust; hosted power under docs.talocode.site.
| Cloud API | https://api.talocode.site → /v1/searchlane/* |
| Python | pip install talocode-searchlane (this package) |
| Node | npm install @talocode/searchlane |
| Repo | github.com/talocode/searchlane |
| License | MIT |
Why SearchLane?
Agents and apps need search as a product, not a one-off scrape:
- Structured JSON — title, URL, snippet, score, provider (easy for tools / MCP)
- Three actions — web query, news, multi-source research with citations
- Provider cascade — Brave / Serper when keys exist; free DuckDuckGo path otherwise
- Credit metering — predictable cost on Talocode Cloud (5 / 8 / 30 credits)
- Same contract — npm SDK, Python client, CLI, and HTTP share one API surface
SearchLane is not a full browser (see Agent Browser) and research v0.1 is extractive (ranked sources + brief), not a giant offline LLM.
Install
pip install talocode-searchlane
# or upgrade
pip install -U talocode-searchlane
Requires Python 3.10+. Stdlib only (no extra runtime deps).
Quickstart
import os
from searchlane import SearchLaneClient
client = SearchLaneClient(
api_key=os.environ["TALOCODE_API_KEY"],
# base_url defaults to https://api.talocode.site
)
# Structured web search (5 credits)
hits = client.query(query="MCP agent tools", limit=5)
for r in hits.get("results", []):
print(r["position"], r["title"], r["url"])
# News-biased search (8 credits)
news = client.news(query="AI agents", limit=5)
# Research brief + citations (30 credits)
brief = client.research(query="What is llms.txt?", fetch_pages=True)
print(brief.get("answer"))
for c in brief.get("citations", []):
print(c["index"], c["title"], c["url"])
Environment
| Variable | Default | Purpose |
|---|---|---|
TALOCODE_API_KEY |
— | Bearer token (required for POST) |
TALOCODE_BASE_URL |
https://api.talocode.site |
API host |
export TALOCODE_API_KEY=your_key
export TALOCODE_BASE_URL=https://api.talocode.site
If base_url already ends with /searchlane (edge-style hosts), paths like /v1/searchlane/query are rewritten to /query automatically.
CLI
After install, the searchlane console script is available:
export TALOCODE_API_KEY=...
searchlane health
searchlane pricing
searchlane capabilities
searchlane query --query "open source AI tools" --limit 5
searchlane news --query "AI agents"
searchlane research --query "agent-native APIs" --fetch-pages
Or: python -m searchlane query -q "...".
API routes & credits
| Method | Path | Credits | Description |
|---|---|---|---|
GET |
/v1/searchlane/health |
— | Health, version, endpoint list |
GET |
/v1/searchlane/pricing |
— | Credit map |
GET |
/v1/searchlane/capabilities |
— | Providers, limits, outputs |
POST |
/v1/searchlane/query |
5 | Ranked web search hits |
POST |
/v1/searchlane/news |
8 | News-biased search |
POST |
/v1/searchlane/research |
30 | Multi-source research + citations |
Auth: Authorization: Bearer $TALOCODE_API_KEY or X-Api-Key.
Example response (query)
{
"query": "MCP agent tools",
"results": [
{
"title": "...",
"url": "https://...",
"snippet": "...",
"score": 0.92,
"source": "duckduckgo-html",
"position": 1
}
],
"provider": "duckduckgo-html",
"count": 5,
"durationMs": 900,
"engine": "searchlane",
"version": "0.1.0",
"usage": { "credits": 5, "action": "searchlane.query" }
}
Research responses also include answer and citations[].
cURL
curl -s https://api.talocode.site/v1/searchlane/health
curl -s -X POST https://api.talocode.site/v1/searchlane/query \
-H "Authorization: Bearer $TALOCODE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"MCP agent tools","limit":5}'
How search works (hosted)
Provider chain (automatic):
- Brave — when the host sets
BRAVE_API_KEY - Serper — when the host sets
SERPER_API_KEY - DuckDuckGo — Instant Answer + HTML (no key)
- mock — offline / fallback demo hits
Safety: public http/https only; localhost and private ranges blocked. Research may peek a few result pages for richer snippets (optional fetch_pages=False to skip).
Client API reference
from searchlane import SearchLaneClient, SearchLaneError, create_searchlane_client
client = SearchLaneClient(api_key=None, base_url=None, timeout=60.0)
client.health() # dict
client.pricing() # dict
client.capabilities() # dict
client.query(query=..., limit=None)
client.news(query=..., limit=None)
client.research(query=..., limit=None, fetch_pages=None)
SearchLaneError— raised on HTTP failures (status,codewhen present)create_searchlane_client(...)— factory alias
Node / full product
Same cloud product from JavaScript:
npm install @talocode/searchlane
import { SearchLaneClient } from '@talocode/searchlane'
const search = new SearchLaneClient({ apiKey: process.env.TALOCODE_API_KEY })
await search.query({ query: 'MCP agent tools', limit: 5 })
CLI: npx searchlane query --query "...".
Repo (server, SEA binaries, release assets): github.com/talocode/searchlane
Talocode ecosystem
Open-source workflow layers for builders. Sibling projects:
| Project | What it is |
|---|---|
| SearchLane | Search layer for agents (this package) |
| Tera | AI chat, writing, coding API |
| Codra | Local coding agent |
| StackLane | Cloud control plane (keys, credits) |
| Agent Browser | Browser automation for agents |
| GeoLane | AI visibility / GEO audits |
| InvoiceLane | Invoice & receipt extraction |
| GateLane | MCP gateway |
| ContextLane | Context ingestion |
| MemoryLane | Persistent agent memory |
| Tradia | Trading intelligence |
| ClipLoop | Video / clip engine |
More: github.com/talocode · docs.talocode.site · talocode.site
Links
- PyPI: https://pypi.org/project/talocode-searchlane/
- npm: https://www.npmjs.com/package/@talocode/searchlane
- Source: https://github.com/talocode/searchlane
- Docs: https://docs.talocode.site
- Issues: https://github.com/talocode/searchlane/issues
License
MIT © Talocode
Project details
Release history Release notifications | RSS feed
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 talocode_searchlane-0.1.2.tar.gz.
File metadata
- Download URL: talocode_searchlane-0.1.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fb1b333978019a08708c24a174455b960928d7940265455d42e7e14fba274ab
|
|
| MD5 |
d36685f560e3683f21eb1cb4380d84a5
|
|
| BLAKE2b-256 |
39555e1f4cefaebd86d3eec1f0c12756225bd93a42218c130b83918e37280f39
|
File details
Details for the file talocode_searchlane-0.1.2-py3-none-any.whl.
File metadata
- Download URL: talocode_searchlane-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
368ca5bf519c28bc8ca1df45cc372d6c76649b5e3b3c7dd1caecaba78cf2cc4e
|
|
| MD5 |
e6a649125f00cada1112a115accfe2a2
|
|
| BLAKE2b-256 |
ce811a34cbcb5c9f0f40133916125fb0f1168f934ddf1a6926c4a2e8b19f1fb6
|