# social.coves.feed.getFeed

> Get a page of hydrated posts for a feed surface. Without feed, the AppView's default ordering for the scope is used; with feed, the named generator orders the posts.

- Kind: query
- Authority: feed.coves.social
- Lexicon: 1
- Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.feed.getFeed)
- [Schema JSON](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.feed.getFeed/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.feed.getFeed/analytics)

## Query (`social.coves.feed.getFeed`)

Type: query · GET

### Parameters (query string)

- `community` (string): Community for scope=community (DID, handle, name@origin, or bare local name)
  - Constraints: maxLength: 320
- `cursor` (string)
  - Constraints: maxLength: 500
- `feed` (string · at-uri): AT-URI of a social.coves.feed.generator record. Omit to use the default ordering for the scope.
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 50, default: 15
- `scope` (string, required): Which feed surface the request is for: all communities, the viewer's home feed, or one community
  - Constraints: maxLength: 64, knownValues: all | home | community
- `timeframe` (string): Timeframe for feeds ranked by top score
  - Constraints: maxLength: 64, default: "day", knownValues: hour | day | week | month | year | all

### Output (application/json)

- `schema` (ref)
  - Reference: `#output`

### Errors

- `UnknownFeed`: The feed URI does not name a known feed generator.
- `UnsupportedFeedScope`: The feed generator does not support the requested scope.
- `InvalidCursor`: The cursor is malformed or expired; restart from the first page.
- `CommunityNotFound`: The community for scope=community does not exist.
- `AmbiguousCommunity`: The name@origin community identifier matches more than one community; address it by DID or handle instead.
- `DiscoverUnavailable`: The all-communities feed is temporarily unavailable; retry later.

## #output (`social.coves.feed.getFeed#output`)

Type: object

A page of feed posts

### Properties

- `cursor` (string)
  - Constraints: maxLength: 500
- `feed` (array, required)
  - `items` (ref)
    - Reference: `social.coves.feed.defs#feedViewPost`
- `reqId` (string): Request ID for this response, from the feed generator or assigned by the AppView. Clients send it back with interactions on items from this response.
  - Constraints: maxLength: 100

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get a page of hydrated posts for a feed surface. Without feed, the AppView's default ordering for the scope is used; with feed, the named generator orders the posts.",
      "errors": [
        {
          "description": "The feed URI does not name a known feed generator.",
          "name": "UnknownFeed"
        },
        {
          "description": "The feed generator does not support the requested scope.",
          "name": "UnsupportedFeedScope"
        },
        {
          "description": "The cursor is malformed or expired; restart from the first page.",
          "name": "InvalidCursor"
        },
        {
          "description": "The community for scope=community does not exist.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The name@origin community identifier matches more than one community; address it by DID or handle instead.",
          "name": "AmbiguousCommunity"
        },
        {
          "description": "The all-communities feed is temporarily unavailable; retry later.",
          "name": "DiscoverUnavailable"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "#output",
          "type": "ref"
        }
      },
      "parameters": {
        "properties": {
          "community": {
            "description": "Community for scope=community (DID, handle, name@origin, or bare local name)",
            "maxLength": 320,
            "type": "string"
          },
          "cursor": {
            "maxLength": 500,
            "type": "string"
          },
          "feed": {
            "description": "AT-URI of a social.coves.feed.generator record. Omit to use the default ordering for the scope.",
            "format": "at-uri",
            "type": "string"
          },
          "limit": {
            "default": 15,
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          },
          "scope": {
            "description": "Which feed surface the request is for: all communities, the viewer's home feed, or one community",
            "knownValues": [
              "all",
              "home",
              "community"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "timeframe": {
            "default": "day",
            "description": "Timeframe for feeds ranked by top score",
            "knownValues": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "scope"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "output": {
      "description": "A page of feed posts",
      "properties": {
        "cursor": {
          "maxLength": 500,
          "type": "string"
        },
        "feed": {
          "items": {
            "ref": "social.coves.feed.defs#feedViewPost",
            "type": "ref"
          },
          "type": "array"
        },
        "reqId": {
          "description": "Request ID for this response, from the feed generator or assigned by the AppView. Clients send it back with interactions on items from this response.",
          "maxLength": 100,
          "type": "string"
        }
      },
      "required": [
        "feed"
      ],
      "type": "object"
    }
  },
  "id": "social.coves.feed.getFeed",
  "lexicon": 1
}
```
