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
Metadata
Release files for talocode-searchlane 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| talocode_searchlane-0.1.2.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| talocode_searchlane-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / talocode_searchlane-0.1.2.tar.gz
| Download URL | talocode_searchlane-0.1.2.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fb1b333978019a08708c24a174455b960928d7940265455d42e7e14fba274ab
|
|
BLAKE2b-256 checksum How to use checksums |
39555e1f4cefaebd86d3eec1f0c12756225bd93a42218c130b83918e37280f39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / talocode_searchlane-0.1.2-py3-none-any.whl
| Download URL | talocode_searchlane-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
368ca5bf519c28bc8ca1df45cc372d6c76649b5e3b3c7dd1caecaba78cf2cc4e
|
|
BLAKE2b-256 checksum How to use checksums |
ce811a34cbcb5c9f0f40133916125fb0f1168f934ddf1a6926c4a2e8b19f1fb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|