# app.lovesky.discover.getCandidates

> Ranked cards for the caller to browse. Filtered by both sides' private preferences, blocks in either direction, prior likes and passes, and moderation labels. Requires an authenticated Lovesky session and a published card.

- Kind: query
- Authority: discover.lovesky.app
- Lexicon: 1
- Published by [toddlambert.com](https://lexicon.garden/identity/did:plc:r5pj64joaywqnvk2obembpt7), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:r5pj64joaywqnvk2obembpt7/app.lovesky.discover.getCandidates)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:r5pj64joaywqnvk2obembpt7/app.lovesky.discover.getCandidates/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:r5pj64joaywqnvk2obembpt7/app.lovesky.discover.getCandidates/analytics)

## Query (`app.lovesky.discover.getCandidates`)

Type: query · GET

### Parameters (query string)

- `cursor` (string)
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 50, default: 20

### Output (application/json)

- `candidates` (array, required)
  - `items` (ref)
    - Reference: `app.lovesky.actor.defs#profileView`
- `cursor` (string)

### Errors

- `NoCard`: Caller has not published app.lovesky.actor.profile.
- `NoPreferences`: Caller has not set private preferences.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Ranked cards for the caller to browse. Filtered by both sides' private preferences, blocks in either direction, prior likes and passes, and moderation labels. Requires an authenticated Lovesky session and a published card.",
      "errors": [
        {
          "description": "Caller has not published app.lovesky.actor.profile.",
          "name": "NoCard"
        },
        {
          "description": "Caller has not set private preferences.",
          "name": "NoPreferences"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "candidates": {
              "items": {
                "ref": "app.lovesky.actor.defs#profileView",
                "type": "ref"
              },
              "type": "array"
            },
            "cursor": {
              "type": "string"
            }
          },
          "required": [
            "candidates"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 20,
            "maximum": 50,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "app.lovesky.discover.getCandidates",
  "lexicon": 1
}
```
