Sourcebot Search & Navigation API

Code search and symbol navigation endpoints.

Operations 3

POST /api/find_definitions Find symbol definitions #
POST /api/find_references Find symbol references #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sourcebot-search-navigation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sourcebot-search-navigation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sourcebot Public Enterprise (EE) Enterprise (EE) Search & Navigation API
  version: v5.1.3
  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:
- url: https://app.sourcebot.dev
  description: Base URL declared by the provider in apis.yml (roadmap#122).
security:
- bearerToken: []
- apiKeyHeader: []
- {}
tags:
- name: Search & Navigation
  description: Code search and symbol navigation endpoints.
paths:
  /api/search:
    post:
      operationId: search
      tags:
      - Search & Navigation
      summary: Search code
      description: Executes a blocking code search and returns all matching file chunks.
      x-mint:
        content: '## Usage


          The `query` field supports literal, regexp, and symbol searches with filters for repository, file, language, branch, and more. See the [search syntax reference](https://docs.sourcebot.dev/docs/features/search/syntax-reference) for the full query language.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicSearchRequest'
      responses:
        '200':
          description: Search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicSearchResponse'
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
        '500':
          description: Unexpected search failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
  /api/find_definitions:
    post:
      operationId: findDefinitions
      tags:
      - Search & Navigation
      summary: Find symbol definitions
      description: Returns all locations in the codebase where the given symbol is defined.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicFindSymbolsRequest'
      responses:
        '200':
          description: Symbol definition 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'
  /api/find_references:
    post:
      operationId: findReferences
      tags:
      - Search & Navigation
      summary: Find symbol references
      description: Returns all locations in the codebase where the given symbol is referenced.
      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:
    PublicSearchResponse:
      type: object
      properties:
        stats:
          type: object
          properties:
            actualMatchCount:
              type: number
            totalMatchCount:
              type: number
            duration:
              type: number
            fileCount:
              type: number
            filesSkipped:
              type: number
            contentBytesLoaded:
              type: number
            indexBytesLoaded:
              type: number
            crashes:
              type: number
            shardFilesConsidered:
              type: number
            filesConsidered:
              type: number
            filesLoaded:
              type: number
            shardsScanned:
              type: number
            shardsSkipped:
              type: number
            shardsSkippedFilter:
              type: number
            ngramMatches:
              type: number
            ngramLookups:
              type: number
            wait:
              type: number
            matchTreeConstruction:
              type: number
            matchTreeSearch:
              type: number
            regexpsConsidered:
              type: number
            flushReason:
              type: string
          required:
          - actualMatchCount
          - totalMatchCount
          - duration
          - fileCount
          - filesSkipped
          - contentBytesLoaded
          - indexBytesLoaded
          - crashes
          - shardFilesConsidered
          - filesConsidered
          - filesLoaded
          - shardsScanned
          - shardsSkipped
          - shardsSkippedFilter
          - ngramMatches
          - ngramLookups
          - wait
          - matchTreeConstruction
          - matchTreeSearch
          - regexpsConsidered
          - flushReason
        files:
          type: array
          items:
            type: object
            properties:
              fileName:
                type: object
                properties:
                  text:
                    type: string
                  matchRanges:
                    type: array
                    items:
                      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:
                - text
                - matchRanges
              webUrl:
                type: string
              externalWebUrl:
                type: string
              repository:
                type: string
              repositoryId:
                type: number
              language:
                type: string
              chunks:
                type: array
                items:
                  type: object
                  properties:
                    content:
                      type: string
                    matchRanges:
                      type: array
                      items:
                        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
                    contentStart:
                      type: object
                      properties:
                        byteOffset:
                          type: number
                        lineNumber:
                          type: number
                        column:
                          type: number
                      required:
                      - byteOffset
                      - lineNumber
                      - column
                    symbols:
                      type: array
                      items:
                        type: object
                        properties:
                          symbol:
                            type: string
                          kind:
                            type: string
                          parent:
                            type: object
                            properties:
                              symbol:
                                type: string
                              kind:
                                type: string
                            required:
                            - symbol
                            - kind
                        required:
                        - symbol
                        - kind
                  required:
                  - content
                  - matchRanges
                  - contentStart
              branches:
                type: array
                items:
                  type: string
              content:
                type: string
            required:
            - fileName
            - webUrl
            - repository
            - repositoryId
            - language
            - chunks
        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
        isSearchExhaustive:
          type: boolean
      required:
      - stats
      - files
      - repositoryInfo
      - isSearchExhaustive
    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
    PublicSearchRequest:
      type: object
      properties:
        query:
          type: string
        matches:
          type: number
        contextLines:
          type: number
        whole:
          type: boolean
        isRegexEnabled:
          type: boolean
        isCaseSensitivityEnabled:
          type: boolean
      required:
      - query
      - matches
    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.
    PublicFindSymbolsRequest:
      type: object
      properties:
        symbolName:
          type: string
        language:
          type: string
        revisionName:
          type: string
        repoName:
          type: string
      required:
      - symbolName
  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.'