---
title: "List repositories with AI components"
method: POST
path: "/api/v1/sca/ai-inventory/repositories/search"
tags: ["SCA"]
---

# List repositories with AI components

`POST /api/v1/sca/ai-inventory/repositories/search`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/sca/ai-inventory/repositories/search`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

List repositories whose latest AI-bearing scan detected AI components, with per-kind counts.

## Request body

- ListAIInventoryRepositoriesInput
  - `organizationId` string, required
  - `repositoryIds` string[]
  - `branch` string: Read each repository as of its newest finished scan on this branch. Omit for the newest scan on any branch.
  - `cursor` string: Opaque keyset cursor returned by a previous page
  - `limit` integer
  - `kinds` string[]
  - `usages` string[]
  - `tiers` string[]
  - `providers` string[]
  - `detectionSources` string[]
  - `searchQuery` string: Matches component name, provider, manifest path, or file path

## Response `200`

Successful response

- AIInventoryRepositoriesResponse
  - `repositories` AIInventoryRepositoryItem[], required
    - `repositoryId` string, required
    - `repositoryName` string, required
    - `monorepoName` string, nullable
    - `scanType` 'sca' | 'code', required
    - `scanId` string, required
    - `scanFinishedAt` string, date-time, required
    - `totalCount` integer, required
    - `kindCounts` AIInventoryKindCount[], required: Per-kind component counts, ordered by count descending
      - `kind` 'MCP_SERVER' | 'LLM_SDK' | 'AGENT_FRAMEWORK' | 'ML_FRAMEWORK' | 'ML_RUNTIME' | 'VECTOR_DB' | 'GUARDRAILS' | 'AI_OBSERVABILITY' | 'SPEECH_AUDIO' | 'TOKENIZER' | 'MODEL_FILE' | 'DATASET' | 'AGENT_CONFIG' | 'AGENT_INSTRUCTIONS' | 'SKILL' | 'PROMPT_TEMPLATE' | 'LOCAL_MODEL_CONFIG', required
      - `count` integer, required
  - `nextCursor` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api-2.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api-2/revisions/ea6ae4b68cd3?raw)
