Build web-aware AI apps with SRCX.
SRCX gives developers a fast API to search the web, extract clean content, and generate structured context for LLMs and agents.
Quickstart
1. Get a key
New accounts receive 3,000 developer credits for real testing.
2. Search
Use Search for ranked web sources with freshness and quality signals.
3. Give agents context
Use Context or MCP tools to pass cited source blocks into your AI workflow.
Authentication
Send your API key as a Bearer token or X-API-Key.
Authorization: Bearer lmsk_YOUR_API_KEY
Search API
Use Search for source discovery. SRCX ranking adapts to entities, freshness, tutorials, comparisons, and multilingual queries.
| Parameter | Description |
|---|---|
q | Query text, 1-500 chars. |
limit | 1-20 results. |
language | Optional language filter. |
freshness | day, week, month, year. |
mode | web (default) or news. News requires a published date; day means the last 24 hours. |
News mode returns fewer results rather than filling the response with undated or unrelated pages. Check freshness_applied, warnings, and each result's published_at.
News response contract
{
"ok": true,
"data": {
"results": [{
"url": "https://example.com/article",
"title": "...",
"excerpt": "...",
"published_at": "2026-09-14T06:30:00Z",
"language": "en",
"source_quality": 0.92,
"source_tier": "authoritative_media",
"relevance_score": 0.88,
"freshness_hours": 3.2
}],
"result_count": 1,
"mode": "news",
"freshness_requested": "day",
"freshness_applied": "day",
"warnings": ["仅找到 1 条高相关来源"],
"fallback": null,
"index_version": "2026-09-14"
},
"request_id": "..."
}
When no article satisfies the requested window and quality gate, results is empty and warnings explains why; SRCX does not silently substitute old reference pages.
Extract API
Extract one URL into markdown and plain text. Every URL passes SSRF and robots checks.
Context API
Context returns deduplicated, cited source blocks designed for models, agents, and RAG workflows.
Context accepts the same mode and freshness controls as Search. Its sources entries include publication time, language, quality tier, and content fingerprints.
MCP / Agent Tools
For Claude Desktop, Cursor-style agents, local models, and workflow builders, use the SRCX MCP server template. It exposes srcx_search, srcx_extract, and srcx_context as callable tools.
Credits
| Action | Credits |
|---|---|
/v1/search | 1 |
/v1/extract | 2 |
/v1/context | 5 |
New accounts receive 3,000 one-time developer credits. Paid plans refresh monthly.
Errors
All API responses use the same JSON envelope.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | bad_request | Malformed request or unsupported operation. |
| 401 | unauthorized | Missing or invalid API key. |
| 402 | insufficient_credits | Account credit balance is too low. |
| 422 | validation_error | Invalid or missing parameters (for example, q). |
| 429 | rate_limited | Retry after the rate-limit window; do not retry in a tight loop. |
| 500 | internal_error | Unexpected server failure; include request_id when contacting support. |
{
"ok": false,
"data": null,
"error": {
"code": "unauthorized",
"message": "Invalid API key",
"details": null
},
"request_id": "..."
}