s2ar

sym find

/v1/sym/find · $0.005 a call · 10 keyless calls a day · paid by x402, credits, mpp

Where a name is defined across a public git repository: every definition whose leaf name or qualified path equals `name` (or starts with it when `prefix` is true), with kind, file and line range. Grep finds mentions; this finds the definition.

Call it

curl 'https://api.s2ar.dev/v1/sym/find?repo=BurntSushi%2Fripgrep&ref=14.1.1&name=Glob'
curl -X POST https://api.s2ar.dev/v1/sym/find \
  -H 'content-type: application/json' \
  -d '{"repo": "BurntSushi/ripgrep", "ref": "14.1.1", "name": "Glob"}'

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/find; 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_find_repo at https://api.s2ar.dev/mcp.

Parameters

parametertyperequiredwhat
repostringyesa public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL
refstringbranch, tag or commit; the default branch when omitted
namestringyes
prefixbooleanmatch names starting with `name`

The answer

{
 "ok": true,
 "text": "crates/globset/src/glob.rs:75-80  struct  Glob\n…",
 "tokens_est": 122,
 "charged_usd": 0.005,
 "repo": "https://github.com/BurntSushi/ripgrep",
 "ref": "14.1.1",
 "receipt": {
  "evidence_hash": "sha256:94abfed2…",
  "cost_usd": 0.005,
  "what": "find",
  "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.

A worked example

read the function: the call, its answer and its record, re-derived.

The errors are the same on every route.