# at.happyproto.registry.searchPackages

> Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.searchPackages)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.searchPackages/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.searchPackages/examples)

## Definitions

### `at.happyproto.registry.searchPackages`

**Type**: `query`

Find packages. Deleted packages are never returned. With `q` the result is ranked by match and capped rather than paged, because the index's substring search takes no cursor; without it the result is paged.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | Ignored when `q` is given. |
| `limit` | `integer` | No |  |
| `pluginType` | `string` | No | Only packages whose latest active release is this type. |
| `q` | `string` | No | Substring of the package name. Omit to list. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | Absent when `q` was given, or when the last page was reached. |
| `packages` | `array` | Yes |  |

#### Errors

- **NotConfigured**: The registry instance has no identity configured (HAPPYPROTO_DID), so it cannot read its own state. An operator problem, not a caller's.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Find packages. Deleted packages are never returned. With `q` the result is ranked by match and capped rather than paged, because the index's substring search takes no cursor; without it the result is paged.",
      "errors": [
        {
          "description": "The registry instance has no identity configured (HAPPYPROTO_DID), so it cannot read its own state. An operator problem, not a caller's.",
          "name": "NotConfigured"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "description": "Absent when `q` was given, or when the last page was reached.",
              "type": "string"
            },
            "packages": {
              "items": {
                "ref": "at.happyproto.registry.defs#packageView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "packages"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "description": "Ignored when `q` is given.",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "pluginType": {
            "description": "Only packages whose latest active release is this type.",
            "knownValues": [
              "auth",
              "library",
              "interpreter"
            ],
            "type": "string"
          },
          "q": {
            "description": "Substring of the package name. Omit to list.",
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "at.happyproto.registry.searchPackages",
  "lexicon": 1
}
```
