# search_components

**Credits:** 0 per call. **Plan:** All plans.

Semantic search over the public library. Your query is embedded and matched against component descriptions; results are ranked by similarity blended with the quality score (see [Scores & ranking](/docs/scores)). Results carry metadata, scores, licence and a GitHub permalink, but no source code: pull the one you want with `get_component`.

## Parameters

| parameter | type | required | default |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `limit` | integer | no | `8` |
| `category` | string | no |  |
| `min_composite` | number | no | `0.0` |
| `language` | string | no |  |
| `license` | string | no | `"any"` |
| `offset` | integer | no | `0` |
| `max_per_repo` | integer | no | `3` |
| `exclude_vulnerable` | boolean | no | `false` |

- `query`: a short, concrete description of the job and the stack, for example `"express jwt auth middleware"`.
- `limit`: results per page (default 8, at most 50).
- `category`: one function tag, from `list_categories`. Common ones: `ai`, `ui`, `auth`, `database`, `payments`, `pos`, `crm`, `voice`, `email`, `infra`, `integration`, `automation`, `analytics`, `files`, `realtime`, `scraping`, `dev-tools`, `testing`, `security`, `search`, `chat`, `cli`.
- `min_composite`: drop results whose composite score is below this (0 to 10).
- `language`: one of `c`, `cpp`, `csharp`, `dart`, `go`, `java`, `javascript`, `kotlin`, `php`, `python`, `ruby`, `rust`, `shell`, `sql`, `svelte`, `swift`, `typescript`, `vue`.
- `license`: `permissive` (MIT, BSD, Apache-2.0, ISC and similar), `commercial-safe` (permissive plus weak copyleft such as MPL-2.0), `open-source`, or `any` (the default). The public library never serves strong copyleft, so `open-source` and `any` both return permissive and weak-copyleft code. Use `permissive` when the code goes into a closed product.
- `offset`: paging. Pages stop after offset 450.
- `max_per_repo`: at most this many results from one source repository (0 = no cap).

Language, licence and minimum-score filters are applied inside the database query, so a filtered search still returns full pages.

## Example call

```json
{
  "name": "search_components",
  "arguments": {
    "query": "python stripe webhook signature verify",
    "limit": 5,
    "license": "permissive",
    "min_composite": 6
  }
}
```

## What it returns

`{"results": [...]}`. Each result has `id`, `name`, `description`, `repo`, `path`, `loc`, `language`, `tags`, `source_url` (GitHub permalink), `similarity`, `scores` (`completeness`, `code_quality`, `deployability`, `reusability`, `strategic_value`, `composite`), `license` (SPDX), `license_kind` (`permissive` or `weak-copyleft`) and `attribution` (`repo_url`, `license_spdx`, `resell_class`, `copyright_holder`, `copyleft_flag`, `text`). Some results also carry [`security_advisories`](/docs/security-advisories). A `null` composite means the component has not been scored yet, not that it scored badly.

## See also

[Tool reference](/docs/tools) (all tools on one page), [Error codes](/docs/errors), [Credits & plans](/docs/credits). Other tools: [`check_component_security`](/docs/tools/check-component-security), [`get_component`](/docs/tools/get-component), [`find_similar`](/docs/tools/find-similar), [`list_categories`](/docs/tools/list-categories), [`library_stats`](/docs/tools/library-stats), [`list_licenses`](/docs/tools/list-licenses), [`get_component_bundle`](/docs/tools/get-component-bundle), [`compose_starter`](/docs/tools/compose-starter), [`licence_report`](/docs/tools/licence-report).
