# com.emdashcms.experimental.aggregator.searchPackages

> Published by [emdashcms.com](https://lexicon.garden/identity/did:plc:ilznslhspsvk6naatedr66pi)

✓ This is the authoritative definition for this NSID.

## Description

Search the aggregator's index of plugin packages by free-text query and optional filters. EXPERIMENTAL.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ilznslhspsvk6naatedr66pi/com.emdashcms.experimental.aggregator.searchPackages)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ilznslhspsvk6naatedr66pi/com.emdashcms.experimental.aggregator.searchPackages/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ilznslhspsvk6naatedr66pi/com.emdashcms.experimental.aggregator.searchPackages/examples)

## Definitions

### `com.emdashcms.experimental.aggregator.searchPackages`

**Type**: `query`

Returns a paginated list of packages matching the query and filters. Results that are subject to a hard-enforcement label (e.g. !takedown, security:yanked) from a trusted labeller the request accepts are filtered out; other label state is hydrated on each result.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `capability` | `string` | No | Optional filter: only return packages that declare this access category (e.g. 'email', 'network'). Compares against the latest release's declaredAccess top-level keys. |
| `cursor` | `string` | No | Pagination cursor from a previous response. |
| `limit` | `integer` | No | Max results to return. |
| `q` | `string` | No | Free-text search query. An exact handle, DID, or identity/slug pair searches that publisher or package. Other values match against name, description, keywords, and authors. Empty or absent returns all packages. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | Cursor to fetch the next page. Absent when there are no more results. |
| `packages` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Returns a paginated list of packages matching the query and filters. Results that are subject to a hard-enforcement label (e.g. !takedown, security:yanked) from a trusted labeller the request accepts are filtered out; other label state is hydrated on each result.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "description": "Cursor to fetch the next page. Absent when there are no more results.",
              "maxLength": 1024,
              "type": "string"
            },
            "packages": {
              "items": {
                "ref": "com.emdashcms.experimental.aggregator.defs#packageView",
                "type": "ref"
              },
              "maxLength": 100,
              "type": "array"
            }
          },
          "required": [
            "packages"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "capability": {
            "description": "Optional filter: only return packages that declare this access category (e.g. 'email', 'network'). Compares against the latest release's declaredAccess top-level keys.",
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "cursor": {
            "description": "Pagination cursor from a previous response.",
            "maxLength": 1024,
            "type": "string"
          },
          "limit": {
            "default": 25,
            "description": "Max results to return.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "q": {
            "description": "Free-text search query. An exact handle, DID, or identity/slug pair searches that publisher or package. Other values match against name, description, keywords, and authors. Empty or absent returns all packages.",
            "maxLength": 256,
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "Search the aggregator's index of plugin packages by free-text query and optional filters. EXPERIMENTAL.",
  "id": "com.emdashcms.experimental.aggregator.searchPackages",
  "lexicon": 1
}
```
