# fyi.atstore.directory.searchListings

> Published by [atstore.fyi](https://lexicon.garden/identity/did:plc:dvy6bdnofdfc4php4s5b457d)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:dvy6bdnofdfc4php4s5b457d/fyi.atstore.directory.searchListings)
- [Documentation](https://lexicon.garden/lexicon/did:plc:dvy6bdnofdfc4php4s5b457d/fyi.atstore.directory.searchListings/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:dvy6bdnofdfc4php4s5b457d/fyi.atstore.directory.searchListings/examples)

## Definitions

### `fyi.atstore.directory.searchListings`

**Type**: `query`

Directory listing search and pagination (verified listings with a listing.detail AT URI only).

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `q` | `string` | No |  |
| `sort` | `string` | No |  |
| `limit` | `integer` | No |  |
| `cursor` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `listings` | `array` | Yes |  |

#### Errors

- **InvalidCursor**

### `fyi.atstore.directory.searchListings#listingCardSearch`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT URI of the fyi.atstore.listing.detail record. |
| `name` | `string` | Yes |  |
| `accent` | `string` | Yes |  |
| `rating` | `string` | No |  |
| `appTags` | `array` | Yes |  |
| `iconUrl` | `string` | No |  |
| `tagline` | `string` | Yes |  |
| `category` | `string` | Yes |  |
| `priceLabel` | `string` | Yes |  |
| `description` | `string` | Yes |  |
| `reviewCount` | `integer` | Yes |  |
| `categorySlug` | `string` | No |  |
| `heroImageUrl` | `string` | No |  |
| `categorySlugs` | `array` | Yes |  |
| `productAccountHandle` | `string` | No |  |

## Raw Schema

```json
{
  "id": "fyi.atstore.directory.searchListings",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "InvalidCursor"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "listings"
          ],
          "properties": {
            "cursor": {
              "type": "string",
              "maxLength": 512
            },
            "listings": {
              "type": "array",
              "items": {
                "ref": "#listingCardSearch",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 512
          },
          "sort": {
            "enum": [
              "popular",
              "newest",
              "alphabetical"
            ],
            "type": "string",
            "default": "popular",
            "maxLength": 24
          },
          "limit": {
            "type": "integer",
            "default": 24,
            "maximum": 100,
            "minimum": 1
          },
          "cursor": {
            "type": "string",
            "maxLength": 512
          }
        }
      },
      "description": "Directory listing search and pagination (verified listings with a listing.detail AT URI only)."
    },
    "listingCardSearch": {
      "type": "object",
      "required": [
        "uri",
        "name",
        "tagline",
        "description",
        "category",
        "accent",
        "reviewCount",
        "priceLabel",
        "appTags",
        "categorySlugs"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "maxLength": 2560,
          "description": "AT URI of the fyi.atstore.listing.detail record."
        },
        "name": {
          "type": "string",
          "maxLength": 640
        },
        "accent": {
          "type": "string",
          "maxLength": 16,
          "knownValues": [
            "blue",
            "pink",
            "purple",
            "green"
          ]
        },
        "rating": {
          "type": "string",
          "nullable": true,
          "maxLength": 16
        },
        "appTags": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 256
          }
        },
        "iconUrl": {
          "type": "string",
          "nullable": true,
          "maxLength": 8192
        },
        "tagline": {
          "type": "string",
          "maxLength": 2000
        },
        "category": {
          "type": "string",
          "maxLength": 640
        },
        "priceLabel": {
          "type": "string",
          "maxLength": 32
        },
        "description": {
          "type": "string",
          "maxLength": 20000
        },
        "reviewCount": {
          "type": "integer"
        },
        "categorySlug": {
          "type": "string",
          "nullable": true,
          "maxLength": 512
        },
        "heroImageUrl": {
          "type": "string",
          "nullable": true,
          "maxLength": 8192
        },
        "categorySlugs": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 512
          }
        },
        "productAccountHandle": {
          "type": "string",
          "nullable": true,
          "maxLength": 512
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
