# social.coves.feed.searchPosts

> 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.feed.searchPosts)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.feed.searchPosts/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.feed.searchPosts/examples)

## Definitions

### `social.coves.feed.searchPosts`

**Type**: `query`

Full-text search over visible posts, across every community or restricted to one. Results honour the same admission, deletion and viewer-block rules as social.coves.feed.getDiscover and social.coves.feed.getCommunity.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` | No | Restrict results to one community: DID, handle, name@origin, or bare local name. Omit to search every community. |
| `cursor` | `string` | No |  |
| `limit` | `integer` | No |  |
| `q` | `string` | Yes | Search query. Supports quoted phrases and -negation. |
| `sort` | `string` | No |  |
| `timeframe` | `string` | No | Timeframe filter (only applies when sort=top) |

#### Output

**Encoding**: `application/json`

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

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Full-text search over visible posts, across every community or restricted to one. Results honour the same admission, deletion and viewer-block rules as social.coves.feed.getDiscover and social.coves.feed.getCommunity.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "maxLength": 500,
              "type": "string"
            },
            "feed": {
              "items": {
                "ref": "social.coves.feed.defs#feedViewPost",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "feed"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "community": {
            "description": "Restrict results to one community: DID, handle, name@origin, or bare local name. Omit to search every community.",
            "maxLength": 320,
            "type": "string"
          },
          "cursor": {
            "maxLength": 500,
            "type": "string"
          },
          "limit": {
            "default": 15,
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          },
          "q": {
            "description": "Search query. Supports quoted phrases and -negation.",
            "maxLength": 500,
            "type": "string"
          },
          "sort": {
            "default": "relevance",
            "knownValues": [
              "relevance",
              "new",
              "top"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "timeframe": {
            "default": "all",
            "description": "Timeframe filter (only applies when sort=top)",
            "knownValues": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "q"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.coves.feed.searchPosts",
  "lexicon": 1
}
```
