Search API
1 endpoint. Request and response schemas are described on the schemas page; the other tags are listed in the API index.
Endpoints
GET /api/v1/search
Search packages and repositories
Search the packages of the repositories the caller can read, and the names of those repositories. Matching is a case-insensitive literal substring match; results are ordered best match first (exact name, then prefix, then other substring matches, newest first within each). A query matching more than 10000 packages is rejected with 400 query_too_broad. limit and offset apply to the packages and repositories lists independently.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | no | Search query: free text plus optional name:, format:, repo: and sha256: qualifiers. Required unless checksum is given or flagged=true. |
format | query | string | no | Filter by format |
repo | query | string | no | Filter by repository name |
group | query | string | no | Set to package to return one package entry per repository, format and name (its latest version) instead of one per version or file. One of: package. |
limit | query | integer | no | Maximum results to return. Minimum: 1. Maximum: 100. |
offset | query | integer | no | Offset for pagination. Minimum: 0. |
flagged | query | boolean | no | true keeps the packages whose scans found a critical or high vulnerability or a secret, or that are quarantined (the latest scan of each type counts). Repositories are not returned. |
checksum | query | string | no | Find the files whose stored checksum equals this value: a full lowercase-hex SHA-256 (64 characters), SHA-1 (40) or MD5 (32), exact match only. SHA-256 matches every format; SHA-1 matches maven, npm and conan, MD5 maven, conan and conda (the other formats store no such digest). Replaces the search: q, format, repo, group and flagged are ignored, limit and offset page the hits, and the response is the ChecksumResult shape. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Search results (SearchResult), or with checksum the files that carry it | application/json: any |
400 | Invalid request: missing_q, invalid_limit, invalid_offset, invalid_filter, invalid_group, invalid_flagged, invalid_checksum, or query_too_broad (more than 10000 matching packages, or a checksum shared by more than 500 files; add filters) | - |