# s2ar Symbol Finder — Code Search by Name in GitHub Repo

> s2ar Symbol Finder — Code Search by Name in GitHub Repo is a paid API for AI agents from api.s2ar.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Searches a public GitHub, GitLab, or Codeberg repository for every definition of a named symbol, returning file paths and line ranges for all matches.

## Facts

- Endpoint: GET https://api.s2ar.dev/x402/v1/sym/find?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/s2ar-symbol-finder-code-search-by-name-in-github-repo-76b6a785
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OeT76fKfB5Bkz_vMj_COU

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability s2ar-symbol-finder-code-search-by-name-in-github-repo-76b6a785
```

Example prompt: Find every definition of the symbol `parseRequest` in the repo github.com/acme/backend — show me the file paths and line numbers for each one.

## When to prefer this

Use this endpoint when you need to find all locations where a specific named symbol (function, class, method, variable, type) is defined within a public repository, especially when you know the exact name or a name prefix. Prefer it over semantic/meaning-based search when the symbol name is already known. It is more precise than a full-text grep because it understands code structure and returns definition sites rather than all usages.

## Known failure modes

- Repository not found or is private — returns an error indicating the repo is inaccessible
- Symbol name not found in the repository — returns an empty result set
- Invalid repository format — error if owner/repo or URL is malformed
- Rate limits or payment failure — 402 response if x402 payment is not completed
- Branch/tag/commit ref does not exist — error or fallback to default branch

## How this service works

Code search by name in a GitHub repo — every definition of a symbol with file and lines. GET ?repo=&name=

## Output

A list of all definitions for the requested symbol name found in the specified repository, each entry including the file path and the line range (start and end lines) where the definition appears. Optionally filtered to a specific branch, tag, or commit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "repo",
      "name"
     ],
     "properties": {
      "ref": {
       "type": "string",
       "description": "branch, tag or commit; the default branch when omitted"
      },
      "name": {
       "type": "string"
      },
      "repo": {
       "type": "string",
       "description": "a public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL"
      },
      "prefix": {
       "type": "string",
       "description": "match names starting with `name`"
      }
     },
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/s2ar-symbol-finder-code-search-by-name-in-github-repo-76b6a785/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.s2ar.dev](https://www.zero.xyz/host/api.s2ar.dev/llms.txt)
