---
title: "Get symbols for a file from peregrine"
method: GET
path: "/api/v1/code-search/symbols"
tags: ["Code Search"]
---

# Get symbols for a file from peregrine

`GET /api/v1/code-search/symbols`

Fetches symbols (definitions, references) for a file from peregrine via entire-api. Used by the code viewer symbol panel. Anonymous callers (no session, no bearer) are served for public repos via entire-api's public-repo path; a private or unknown repo yields 404.

## Response `200`

Symbols in the file

- object
  - `symbols` object[], required
    - `name` string, required
    - `kind` string, required
    - `role` string, required
    - `line` number, required
    - `col_start` number, required
    - `col_end` number, required
    - `parent` string, nullable, required
    - `signature` string, nullable, required
    - `usages_count` number
    - `resolved_to` object
      - `path` string, required
      - `line` number, required

## Other responses

- `400` — Missing repo or path
- `404` — Repository not found (or not public, for anonymous callers)
- `503` — Code search not configured

---

[API](https://skmtc.dev/entire/apis/entire-api.md) · [All operations](https://skmtc.dev/entire/apis/entire-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/entire/entire-api/revisions/c3d737ae064e/schema)
