Code by meaning in a public git repository: a semantic search over an index of every definition, built once per checkout, plus a name match. Use it when you do not know the name of what you are looking for. A repository's first call may answer 202 while its index builds; that call is not charged.
curl 'https://api.s2ar.dev/v1/sym/where?repo=BurntSushi%2Fripgrep&ref=14.1.1&query=how+are+glob+overrides+applied'
curl -X POST https://api.s2ar.dev/v1/sym/where \
-H 'content-type: application/json' \
-d '{"repo": "BurntSushi/ripgrep", "ref": "14.1.1", "query": "how are glob overrides applied"}'
With a key: add -H 'Authorization: Bearer $S2AR_KEY'. Over x402, while sales are open: the same call at https://api.s2ar.dev/x402/v1/sym/where; unpaid, it answers 402 with the accepts[] to sign, then send the payment as PAYMENT-SIGNATURE (or X-PAYMENT). Sales are paused since 2026-10-16, and the mirror answers 410. From an agent: the MCP tool sym_where_repo at https://api.s2ar.dev/mcp.
| parameter | type | required | what |
|---|---|---|---|
repo | string | yes | a public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL |
ref | string | branch, tag or commit; the default branch when omitted | |
query | string | yes | |
k | integer | hits to return (default 8) (minimum 1, maximum 32) |
{
"ok": true,
"text": "crates/ignore/src/overrides.rs:…",
"tokens_est": 400,
"charged_usd": 0.01,
"repo": "https://github.com/BurntSushi/ripgrep",
"ref": "14.1.1",
"receipt": {
"evidence_hash": "sha256:94abfed2…",
"cost_usd": 0.01,
"what": "where",
"determinism": "replayable",
"witnesses": [
"embedder"
],
"issued_at": "2026-10-10T00:00:00Z",
"refund_rule": "failed calls are never charged",
"charter": "https://api.s2ar.dev/charter"
}
}
Every paid answer carries its receipt; a record's sha256 re-verifies free at /v1/verify/{sha256}. A call that fails is never charged.
read the function: the call, its answer and its record, re-derived.
The errors are the same on every route.