# s2ar Symbol Listing (File Skeleton)

> s2ar Symbol Listing (File Skeleton) 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).

Returns a structural skeleton of a source file from a GitHub/GitLab/Codeberg repo — every function, type, and method with their line ranges but without body code.

## Facts

- Endpoint: GET https://api.s2ar.dev/x402/v1/sym/ls?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-listing-file-skeleton-916e24bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T2LO2ODAdDLXfDOmTrcm_

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-listing-file-skeleton-916e24bb
```

Example prompt: Give me a skeleton of the file `src/parser/lexer.py` in the repo `pallets/jinja` — I want to see all the functions, types, and methods with their line ranges, but not the actual code bodies.

## When to prefer this

Use this endpoint when you need a high-level structural overview of a source file before fetching individual symbol bodies. It is ideal for code navigation, pre-indexing a file before targeted symbol lookups, or understanding a large file's layout without incurring the cost of downloading full implementations. Prefer this over full-file fetch when token budget is a concern, and over semantic or name-based search when you want a complete inventory of all symbols in a specific file.

## Known failure modes

- Repository not found or is private — returns an error indicating the repo is inaccessible
- File path does not exist in the repository at the given ref — returns a not-found error
- Ref (branch/tag/commit) does not exist — returns a reference resolution error
- File is not a recognized source code format — may return empty or partial results
- Rate limits or payment failure — returns a 402 or rate-limit error
- Malformed repo identifier — returns a validation error

## How this service works

File skeleton from a GitHub repo — every function, type and method with line ranges, no bodies. GET ?repo=&file=

## Output

A structured skeleton of the specified source file listing every function, type, class, and method definition with their start and end line ranges, but without body/implementation code. Useful for understanding file layout and navigating to specific symbols.

## 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",
      "file"
     ],
     "properties": {
      "ref": {
       "type": "string",
       "description": "branch, tag or commit; the default branch when omitted"
      },
      "file": {
       "type": "string",
       "description": "path inside the repository"
      },
      "repo": {
       "type": "string",
       "description": "a public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL"
      }
     },
     "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-listing-file-skeleton-916e24bb/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)
