The symbol skeleton of one file in a public git repository: what is defined where, with line ranges and signatures, without the bodies (tree-sitter; Rust, Python, TypeScript/TSX, JavaScript, Go, Lua, C, C++, Java, Ruby). Read this before reading the file.
curl 'https://api.s2ar.dev/v1/sym/ls?repo=BurntSushi%2Fripgrep&ref=14.1.1&file=crates%2Fcore%2Fmain.rs'
curl -X POST https://api.s2ar.dev/v1/sym/ls \
-H 'content-type: application/json' \
-d '{"repo": "BurntSushi/ripgrep", "ref": "14.1.1", "file": "crates/core/main.rs"}'
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/ls; 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_ls_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 | |
file | string | yes | path inside the repository |
{
"ok": true,
"text": " 42-61 fn main()\n 63-118 fn run(…)\n…",
"tokens_est": 210,
"charged_usd": 0.005,
"repo": "https://github.com/BurntSushi/ripgrep",
"ref": "14.1.1",
"receipt": {
"evidence_hash": "sha256:94abfed2…",
"cost_usd": 0.005,
"what": "ls",
"determinism": "replayable",
"witnesses": [
"sym"
],
"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.