RAG without the plumbing. Cited answers, real URLs, no hallucinated sources.
POST /v1/search/answer·10 + 5/source·Search & Discovery
An end-to-end RAG pipeline behind one POST. We do the search, fetch the top sources, hand them to our answer model with a strict citation prompt, and stream back a clean answer with numbered citations pointing to real URLs. No hallucinated sources: every [n] resolves to a result we actually fetched.
The hard part
Standing up your own RAG pipeline is half a weekend: a search call, a fetcher, an LLM key, a citation enforcer, a fallback for hallucinated URLs, and a way to keep your answers from leaning on whichever source got summarised first. One POST replaces all of that with cited answers that point at real, fetched pages.
What it does
Numbered [1][2] citations that resolve to real fetched URLs.
Returns the answer plus the full citation list (index, url, title, snippet).
Fast-fail on slow sources so one bad fetch doesn't drag the whole answer.
Send a call
curl -X POST https://scrapenest.dev/v1/search/answer \
-H "Authorization: Bearer sn_••••" \
-H "Content-Type: application/json" \
-d '{
"query": "is matcha actually better than coffee for focus?",
"num_results": 8,
"max_sources": 5
}'
import httpx
r = httpx.post(
"https://scrapenest.dev/v1/search/answer",
headers={"Authorization": "Bearer sn_••••"},
json={"query": "is matcha actually better than coffee for focus?", "num_results": 8, "max_sources": 5},
timeout=60,
)
body = r.json()
print(body["answer"])
for c in body["citations"]:
print(c["index"], c["url"])
{
"query": "is matcha actually better than coffee for focus?",
"max_sources": 5
}
Response shape
{
"query": "is matcha actually better than coffee for focus?",
"answer": "Matcha delivers caffeine with L-theanine, which smooths the energy curve [1][3] …",
"citations": [
{
"index": 1,
"url": "https://examine.com/supplements/l-theanine/",
"title": "L-Theanine · Examine",
"snippet": "L-theanine is an amino acid found in tea …"
},
{
"index": 3,
"url": "https://nccih.nih.gov/health/green-tea",
"title": "Green Tea · NCCIH",
"snippet": "Most studies on green tea …"
}
],
"took_ms": 4200,
"cache_hit": false,
"credits_charged": 35
}
What it costs
5 credits for the search, 5 credits per source actually fetched, plus 5 credits for the AI answer step. Formula: 5 + 5 × sources fetched + 5 (the answer step is waived when the model can't ground an answer). Cache hits: 1 credit.