> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcebot.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Find symbol references

> Returns all locations in the codebase where the given symbol is referenced.



## OpenAPI

````yaml /api-reference/sourcebot-public.openapi.json post /api/find_references
openapi: 3.0.3
info:
  title: Sourcebot Public API
  version: v5.0.4
  description: >-
    OpenAPI description for the public Sourcebot REST endpoints used for search,
    repository listing, and file browsing. Authentication is instance-dependent:
    API keys are the standard integration mechanism, OAuth bearer tokens are
    EE-only, and some instances may allow anonymous access.
servers: []
security:
  - bearerToken: []
  - apiKeyHeader: []
  - {}
tags:
  - name: Search & Navigation
    description: Code search and symbol navigation endpoints.
  - name: Repositories
    description: Repository listing and metadata endpoints.
  - name: Git
    description: Git history, diff, and file content endpoints.
  - name: System
    description: System health and version endpoints.
  - name: Enterprise (EE)
    description: Enterprise endpoints for user management and audit logging.
paths:
  /api/find_references:
    post:
      tags:
        - Search & Navigation
      summary: Find symbol references
      description: >-
        Returns all locations in the codebase where the given symbol is
        referenced.
      operationId: findReferences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicFindSymbolsRequest'
      responses:
        '200':
          description: Symbol reference locations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicFindSymbolsResponse'
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
        '500':
          description: Unexpected failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
components:
  schemas:
    PublicFindSymbolsRequest:
      type: object
      properties:
        symbolName:
          type: string
        language:
          type: string
        revisionName:
          type: string
        repoName:
          type: string
      required:
        - symbolName
    PublicFindSymbolsResponse:
      type: object
      properties:
        stats:
          type: object
          properties:
            matchCount:
              type: number
          required:
            - matchCount
        files:
          type: array
          items:
            type: object
            properties:
              fileName:
                type: string
              repository:
                type: string
              repositoryId:
                type: number
              webUrl:
                type: string
              language:
                type: string
              matches:
                type: array
                items:
                  type: object
                  properties:
                    lineContent:
                      type: string
                    range:
                      type: object
                      properties:
                        start:
                          type: object
                          properties:
                            byteOffset:
                              type: number
                            lineNumber:
                              type: number
                            column:
                              type: number
                          required:
                            - byteOffset
                            - lineNumber
                            - column
                        end:
                          type: object
                          properties:
                            byteOffset:
                              type: number
                            lineNumber:
                              type: number
                            column:
                              type: number
                          required:
                            - byteOffset
                            - lineNumber
                            - column
                      required:
                        - start
                        - end
                  required:
                    - lineContent
                    - range
            required:
              - fileName
              - repository
              - repositoryId
              - webUrl
              - language
              - matches
        repositoryInfo:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              codeHostType:
                type: string
                enum:
                  - github
                  - gitlab
                  - gitea
                  - gerrit
                  - bitbucketServer
                  - bitbucketCloud
                  - genericGitHost
                  - azuredevops
              name:
                type: string
              displayName:
                type: string
              webUrl:
                type: string
            required:
              - id
              - codeHostType
              - name
      required:
        - stats
        - files
        - repositoryInfo
    PublicApiServiceError:
      type: object
      properties:
        statusCode:
          type: number
        errorCode:
          type: string
        message:
          type: string
      required:
        - statusCode
        - errorCode
        - message
      description: Structured error response returned by Sourcebot public API endpoints.
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API key.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-Sourcebot-Api-Key
      description: >-
        Header of the form `X-Sourcebot-Api-Key: <token>`, where `<token>` is
        your API key.

````