canonical: https://jentic.com/apis/searchcode.com/searchcode

# searchcode REST API

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. The API exposes 6 endpoints.

## For AI agents

Programmatically instant repo overview - languages, complexity, file count, tech stack, code qual, list files and directories in any public git repo. supports fuzzy file search (q. Covers 6 operations.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Instant repo overview - languages, complexity, file count, tech stack, code qual
- List files and directories in any public git repo. Supports fuzzy file search (q
- Get code from a remote public git repository - either a specific function/class
- Fast code search across any public git repo. Returns file paths, line numbers, a
- Monitor searchcode REST API operational status and events

## Use cases

### Developer Tools Operations

Use the searchcode REST API to perform developer tools operations programmatically. The API provides 6 endpoints covering core functionality including instant repo overview - languages, complexity, file count, tech stack, code qual, list files and directories in any public git repo. supports fuzzy file search (q, get code from a remote public git repository - either a specific function/class .

Example prompt: Call POST `/api/v1/code_analyze` to instant repo overview - languages, complexity, file count, tech stack, code qual

### Automated API Management

Automate API operations by combining multiple searchcode REST API endpoints. Agents can list files and directories in any public git repo. supports fuzzy file search (q and then get code from a remote public git repository - either a specific function/class  in a single workflow.

Example prompt: Call POST `/api/v1/code_file_tree` to list files and directories in any public git repo. supports fuzzy file search (q, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call searchcode REST API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle none tokens manually.

Example prompt: Search Jentic for 'instant repo overview - languages, complexity, file count, tech stack, code qual', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/v1/code_analyze` | Instant repo overview - languages, complexity, file count, tech stack, code qual |
| POST | `/api/v1/code_file_tree` | List files and directories in any public git repo. Supports fuzzy file search (q |
| POST | `/api/v1/code_get_file` | Get code from a remote public git repository - either a specific function/class |
| POST | `/api/v1/code_get_files` | Get contents of multiple files from a remote public git repository in a single c |
| POST | `/api/v1/code_get_findings` | Get detailed code quality findings from a remote public git repository. Returns |
| POST | `/api/v1/code_search` | Fast code search across any public git repo. Returns file paths, line numbers, a |

## Key resources

- **api** — Operations related to api

## Why Jentic

- **Setup:** Wiring the searchcode REST API by hand means reading its docs to learn the POST shapes for code search, file trees, and findings, then building the request bodies and handling responses yourself. Through Jentic you install once, import searchcode from the API Directory, and your agent calls it.
- **Permission scoping:** The searchcode REST API is unauthenticated and its operations carry the query in the request body rather than a resource in the URL path, so scope by operation: limit the agent to the operations it needs, such as code_search or code_get_file, and leave analysis or findings calls out unless you add them.
- **Credential handling:** The searchcode REST API needs no credential, so there is no secret to store, and nothing sensitive enters the agent's prompt, logs, or context. Jentic still injects any request configuration at execution time.
- **Discovery method:** Agents search Jentic by intent such as 'search public source code' or 'get the contents of a file', and Jentic returns the matching searchcode operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the searchcode REST API use?

The searchcode REST API uses no authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I instant repo overview - languages, complexity, file count, tech stack, code qual with the searchcode REST API?

Yes. Use the POST `/api/v1/code_analyze` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the searchcode REST API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I instant repo overview - languages, complexity, file count, tech stack, code qual through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'instant repo overview - languages, complexity, file count, tech stack, code qual'. Jentic returns the matching searchcode REST API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the searchcode REST API have?

The searchcode REST API exposes 6 endpoints covering API operations.

### Can I limit what my agent is allowed to do with the searchcode REST API?

Yes. Because you run Jentic One yourself, your own rules decide which searchcode operations the agent may call, and you scope by operation since the API is unauthenticated and passes the query in the request body rather than in the URL path. For example, you can allow only code_search and code_get_file while leaving code_analyze and code_get_findings out unless you add them. The agent can invoke nothing you have not granted.
