# social.coves.community.post.search

> Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.search)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.search/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.search/examples)

## Definitions

### `social.coves.community.post.search`

**Type**: `query`

Search for posts

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `q` | `string` | Yes | Search query |
| `sort` | `string` | No |  |
| `tags` | `array` | No | Filter by tags |
| `type` | `string` | No | Filter by post type |
| `limit` | `integer` | No |  |
| `author` | `string` (at-identifier) | No | Filter by author |
| `cursor` | `string` | No |  |
| `community` | `string` (at-identifier) | No | Filter by specific community |
| `timeframe` | `string` | No |  |

#### Output

**Encoding**: `application/json`

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

## Raw Schema

```json
{
  "id": "social.coves.community.post.search",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "posts"
          ],
          "properties": {
            "posts": {
              "type": "array",
              "items": {
                "ref": "social.coves.feed.defs#feedViewPost",
                "type": "ref"
              }
            },
            "cursor": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "q"
        ],
        "properties": {
          "q": {
            "type": "string",
            "maxLength": 500,
            "description": "Search query"
          },
          "sort": {
            "type": "string",
            "default": "relevance",
            "maxLength": 64,
            "knownValues": [
              "relevance",
              "new",
              "top"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 640,
              "maxGraphemes": 64
            },
            "description": "Filter by tags"
          },
          "type": {
            "type": "string",
            "maxLength": 64,
            "description": "Filter by post type",
            "knownValues": [
              "text",
              "image",
              "video",
              "article",
              "microblog"
            ]
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1
          },
          "author": {
            "type": "string",
            "format": "at-identifier",
            "description": "Filter by author"
          },
          "cursor": {
            "type": "string",
            "maxLength": 500
          },
          "community": {
            "type": "string",
            "format": "at-identifier",
            "description": "Filter by specific community"
          },
          "timeframe": {
            "type": "string",
            "default": "all",
            "maxLength": 64,
            "knownValues": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ]
          }
        }
      },
      "description": "Search for posts"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
