Searchcode Code Analyze API

The Code Analyze API from Searchcode — 1 operation(s) for code analyze.

GitHub OpenAPI

Operations 1

POST /api/v1/code_analyze Instant repo overview — languages, complexity, file count, tech stack, code… #

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/searchcode-com:searchcode-com-code-analyze-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

searchcode-com-code-analyze-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository. This REST API mirrors the MCP tool endpoints for non-MCP clients.
  title: searchcode REST Code Analyze API
  version: 1.0.0
servers:
- description: Production
  url: https://api.searchcode.com
tags:
- name: Code Analyze
paths:
  /api/v1/code_analyze:
    post:
      operationId: code_analyze
      parameters:
      - $ref: '#/components/parameters/client'
      requestBody:
        content:
          application/json:
            schema:
              properties:
                detail_level:
                  description: Controls response verbosity. summary returns top 20 across all languages; full returns top 20 per language. Use summary for portfolio reviews, hiring assessments, and high-level overviews. Use full for deep per-language audits or when you need granular per-file breakdowns within a specific language.
                  enum:
                  - summary
                  - full
                  type: string
                include_all_dirs:
                  default: false
                  description: Include dependency/build/cache directories that are excluded by default (vendor, node_modules, third_party, target, build, dist, Pods, generated, etc.). Set to true if you need to analyze generated/vendored code.
                  type: boolean
                language:
                  description: Filter results to a specific language (e.g. "Java", "Go", "Python").
                  type: string
                path:
                  description: Subdirectory to scope analysis to (e.g. 'src', 'clang/lib'). Only files under this path are walked and analyzed — use this for large monorepos where full analysis is too slow or when the user's question is about a specific component. Omit to analyze the entire repository.
                  type: string
                repository:
                  description: 'Full git URL of ONE public remote repository, e.g. "https://github.com/redis/redis". Required. There is no cross-repository or global search: this API analyses one repository per call, cloning it on demand. Wildcards and placeholders ("*", "all", "global", a bare host like "github.com") are rejected — if you do not have a specific repository URL, ask for one rather than guessing.'
                  type: string
                scan_test_files:
                  default: false
                  description: Older spelling of tests="include", honoured when tests is not set. Prefer tests.
                  type: boolean
                tests:
                  default: exclude
                  description: 'Findings in TEST files (*_test.go, test/, tests/, spec/, __tests__/, testdata/, *.test.ts, *.spec.js, *Test.java, *Tests.cs, test_*.py, conftest.py, *_spec.rb and the like). "exclude", the default, leaves them out of code_quality_summary and security_summary and counts them in tests_excluded; "include" adds them, each marked test: true; "only" returns just them. They are kept, not deleted: a credential committed in a test fixture is still a real credential, and include reaches it.'
                  enum:
                  - exclude
                  - include
                  - only
                  type: string
              required:
              - repository
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Bad request (invalid params or missing client)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Repository or file not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Rate limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Internal server error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Bad gateway (upstream clone failure)
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Service unavailable (clone queue full)
      summary: Instant repo overview — languages, complexity, file count, tech stack, code…
      tags:
      - Code Analyze
components:
  schemas:
    APIError:
      properties:
        error:
          properties:
            code:
              description: Machine-readable error code
              type: string
            message:
              description: Human-readable error message
              type: string
            retry_after_seconds:
              description: Seconds to wait before retrying (for rate-limited requests)
              type: integer
            suggestion:
              description: Suggested action to resolve the error
              type: string
          required:
          - code
          - message
          type: object
      type: object
  parameters:
    client:
      description: Client identifier for your application (e.g. 'my-app-v1'). Required for all REST API requests.
      in: query
      name: client
      required: true
      schema:
        type: string