# app.lovesky.discover.getCandidates

> Published by [toddlambert.com](https://lexicon.garden/identity/did:plc:r5pj64joaywqnvk2obembpt7)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:r5pj64joaywqnvk2obembpt7/app.lovesky.discover.getCandidates)
- [Documentation](https://lexicon.garden/lexicon/did:plc:r5pj64joaywqnvk2obembpt7/app.lovesky.discover.getCandidates/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:r5pj64joaywqnvk2obembpt7/app.lovesky.discover.getCandidates/examples)

## Definitions

### `app.lovesky.discover.getCandidates`

**Type**: `query`

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.

#### Parameters

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

#### Output

**Encoding**: `application/json`

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

#### Errors

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

## Raw 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
}
```
