---
title: "Get LSP-style hover info for a definition"
method: GET
path: "/api/v1/code-search/hover"
tags: ["Code Search"]
---

# Get LSP-style hover info for a definition

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

Fetches the full declaration header and leading doc comment for the definition at a file/line from peregrine via entire-api. Used by the code viewer hover card. 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. When org and repoName are sent, forge (gh or et) is required.

## Query parameters

- `repo` string, required
- `path` string, required
- `line` integer, required
- `name` string
- `org` string
- `repoName` string
- `forge` 'gh' | 'et'

## Response `200`

Hover info for the definition

- object
  - `name` string, required
  - `kind` string, required
  - `signature` string, required
  - `docs` string
  - `path` string, required
  - `line` number, required

## Other responses

- `400` — Missing repo, path, or line, or org/repoName without forge
- `404` — Repository, file, or definition not found (or repo not public, for anonymous callers)
- `503` — Code search not configured

## Changes

- **2026-09-22** `42e3894372d3` — 1 info
  - added the new optional `query` request parameter `forge`
- **2026-09-17** `e1f0e2f14d0a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/entire/apis/entire-api/changes/api/v1/code-search/hover/get.md)

---

[API](https://skmtc.dev/entire/apis/entire-api.md) · [All operations](https://skmtc.dev/entire/apis/entire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/entire/apis/entire-api/revisions/d69a682d6e44?raw)
