# Limits

Configure and monitor rate limits for your LinkedIn accounts programmatically: view defaults, get current usage, set custom limits, and reset.

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

Rate limits control how many actions each LinkedIn account can perform per time period. For general Admin API information, see the [Admin overview](/docs/admin-overview).

:::surface node
In the Node SDK these endpoints are methods of `admin.limits` on the [admin client](/docs/admin-overview#authentication): `getDefaults()`, `get()`, `getUsage()`, `set()`, `delete()` and `resetToDefaults()`. Each section below shows its call in the Node tab.
:::

:::surface python
In the Python SDK these endpoints are methods of `admin.limits` on the [admin client](/docs/admin-overview#authentication): `get_defaults()`, `get()`, `get_usage()`, `set()`, `delete()` and `reset_to_defaults()`. Each section below shows its call in the Python tab.
:::

:::surface cli
In the CLI these endpoints are the commands `linkedin admin limits defaults`, `get`, `usage`, `set`, `delete` and `reset`. Each section below shows its command in the CLI tab.
:::

## Limit categories

| Category | Description |
|----------|-------------|
| `stPersonProfileViews` | Standard LinkedIn profile views |
| `stCompanyPageViews` | Standard LinkedIn company page views |
| `stConnectionRequests` | Connection requests sent |
| `stMessages` | Messages sent |
| `stSearchQueries` | LinkedIn search queries |
| `stReactions` | Post reactions |
| `stEndorsements` | Skill endorsements |
| `stComments` | Post comments |
| `stPosts` | Posts and reposts created |
| `nvPersonProfileViews` | Sales Navigator profile views |
| `nvCompanyPageViews` | Sales Navigator company page views |
| `nvMessages` | Sales Navigator messages |
| `rcPersonProfileViews` | Recruiter Lite profile views |
| `rcSearchQueries` | Recruiter Lite search queries |
| `rcMessages` | Recruiter Lite messages (InMail and replies) |

**Periods:** `daily`, `weekly`, `monthly`

### Endorsement limits

`stEndorsements` counts every [st.endorsePersonSkill](/docs/action-st-endorse-person-skill) execution, including each skill endorsed through [st.doForSkills](/docs/action-st-do-for-skills). Only successful executions count, and an execution where the skill was already endorsed is successful too. Its default limits are:

| Period | `maxValue` | `isEnabled` |
|--------|------------|-------------|
| `daily` | 50 | `true` |
| `weekly` | 350 | `false` |
| `monthly` | 1500 | `false` |

These defaults are applied wherever default limits are: when an account is connected with the `defaults` [limits mode](/docs/admin-completion-screen), and when its limits are reset with [limits.resetToDefaults](#limits-resettodefaults). **An account has no endorsement limit unless [limits.get](#limits-get) returns an enabled `stEndorsements` entry for it.** This is the case for accounts connected before endorsements became available, which have no `stEndorsements` entries at all. It can also be the case for accounts connected in the `ask` [limits mode](/docs/admin-completion-screen) while the limits editor did not show endorsement limits: it saved them with `isEnabled: false` unless the user chose the recommended limits. To cap endorsements, set them with [limits.set](#limits-set), or reset the account to defaults, which also replaces its custom limits in every other category.

### Recruiter Lite limits

`rcPersonProfileViews` counts every [rc.openPersonPage](/docs/action-rc-open-person-page) and [rc.saveToProject](/docs/action-rc-save-to-project) execution, including each one run for a candidate through [rc.doForPeople](/docs/action-rc-do-for-people), and every [rc.sendMessage](/docs/action-rc-send-message) execution, a new InMail or a reply. `rcSearchQueries` counts every [rc.searchPeople](/docs/action-rc-search-people) execution, however many result pages it reads. `rcMessages` counts every [rc.sendMessage](/docs/action-rc-send-message) execution, a new InMail or a reply, including each one sent to a candidate through `rc.doForPeople`. Only successful executions count, with one exception: every `rc.sendMessage` counts its `rcPersonProfileViews` whatever the outcome – sent, refused or failed. Only a new InMail (`personUrl`), which opens the candidate's profile, checks that limit before it runs; a reply by `threadId` is not blocked by it. Their default limits are:

| Category | Period | `maxValue` | `isEnabled` |
|----------|--------|------------|-------------|
| `rcPersonProfileViews` | `daily` | 600 | `true` |
| `rcPersonProfileViews` | `weekly` | 4000 | `true` |
| `rcPersonProfileViews` | `monthly` | 120000 | `false` |
| `rcSearchQueries` | `daily` | 100 | `true` |
| `rcSearchQueries` | `weekly` | 600 | `true` |
| `rcSearchQueries` | `monthly` | 3000 | `false` |
| `rcMessages` | `daily` | 25 | `true` |
| `rcMessages` | `weekly` | 50 | `false` |
| `rcMessages` | `monthly` | 50 | `true` |

LinkedIn itself allows a Recruiter Lite seat up to 2,000 unique candidate profiles a day and counts every new candidate a search shows, not only the profiles you open, so these defaults alone do not keep a seat under that limit. See [Recruiter Lite](/docs/recruiter-lite-overview#limits).

## limits.getDefaults

Get the system default limits. These are applied when an account is connected with the `defaults` limits mode, and when its limits are reset to defaults.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/limits.getDefaults \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here"
```

```typescript tab=Node
const { limits } = await admin.limits.getDefaults();
```

```python tab=Python
limits = admin.limits.get_defaults().limits
```

```bash tab=CLI
linkedin admin limits defaults
```

**Response:**

```json
{
  "success": true,
  "result": {
    "limits": [
      {
        "category": "stMessages",
        "period": "daily",
        "maxValue": 50,
        "isEnabled": true
      },
      {
        "category": "stConnectionRequests",
        "period": "daily",
        "maxValue": 10,
        "isEnabled": true
      }
    ]
  }
}
```

## limits.get

Get the current limits for a specific account.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/limits.get \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here" \
  -d '{"accountId": "f9b4346a-..."}'
```

```typescript tab=Node
const { limits } = await admin.limits.get({ accountId: 'f9b4346a-...' });
```

```python tab=Python
from linkedapi import GetLimitsParams

limits = admin.limits.get(GetLimitsParams(account_id="f9b4346a-...")).limits
```

```bash tab=CLI
linkedin admin limits get f9b4346a-...
```

**Body:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `accountId` | `string` | Yes | Account UUID |

**Response:**

```json
{
  "success": true,
  "result": {
    "limits": [
      {
        "category": "stMessages",
        "period": "daily",
        "maxValue": 25,
        "isEnabled": true
      }
    ]
  }
}
```

## limits.getUsage

Get the current usage against limits for a specific account.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/limits.getUsage \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here" \
  -d '{"accountId": "f9b4346a-..."}'
```

```typescript tab=Node
const { usage } = await admin.limits.getUsage({ accountId: 'f9b4346a-...' });
```

```python tab=Python
from linkedapi import GetLimitsUsageParams

usage = admin.limits.get_usage(GetLimitsUsageParams(account_id="f9b4346a-...")).usage
```

```bash tab=CLI
linkedin admin limits usage f9b4346a-...
```

**Body:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `accountId` | `string` | Yes | Account UUID |

**Response:**

```json
{
  "success": true,
  "result": {
    "usage": [
      {
        "category": "stMessages",
        "period": "daily",
        "maxValue": 50,
        "currentUsage": 12,
        "isEnabled": true
      }
    ]
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `maxValue` | `number` | Maximum allowed actions |
| `currentUsage` | `number` | Actions performed in the current period |
| `isEnabled` | `boolean` | Whether this limit is enforced |

## limits.set

Set or update limits for an account. Only the specified limits are created or updated; other limits remain unchanged.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/limits.set \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here" \
  -d '{
    "accountId": "f9b4346a-...",
    "limits": [
      {
        "category": "stMessages",
        "period": "daily",
        "maxValue": 25,
        "isEnabled": true
      },
      {
        "category": "stConnectionRequests",
        "period": "weekly",
        "maxValue": 30
      }
    ]
  }'
```

```typescript tab=Node
await admin.limits.set({
  accountId: 'f9b4346a-...',
  limits: [
    { category: 'stMessages', period: 'daily', maxValue: 25, isEnabled: true },
    { category: 'stConnectionRequests', period: 'weekly', maxValue: 30 },
  ],
});
```

```python tab=Python
from linkedapi import SetLimitEntry, SetLimitsParams

admin.limits.set(
    SetLimitsParams(
        account_id="f9b4346a-...",
        limits=[
            SetLimitEntry(category="stMessages", period="daily", max_value=25, is_enabled=True),
            SetLimitEntry(category="stConnectionRequests", period="weekly", max_value=30),
        ],
    )
)
```

```bash tab=CLI
linkedin admin limits set f9b4346a-... --category stMessages --period daily --max 25
linkedin admin limits set f9b4346a-... --category stConnectionRequests --period weekly --max 30
```

:::surface cli
`linkedin admin limits set <accountId>` sets one limit per call, from these flags, all required:

| Flag | Body field | Values |
| --- | --- | --- |
| `--category` | `limits[].category` | A limit category from the table above |
| `--period` | `limits[].period` | `daily`, `weekly`, `monthly` |
| `--max` | `limits[].maxValue` | An integer >= 0 |

It has no flag for `isEnabled`, so the limit is always saved as enforced.
:::

**Body:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `accountId` | `string` | Yes | Account UUID |
| `limits` | `array` | Yes | Array of limit configurations |
| `limits[].category` | `string` | Yes | Limit category (see table above) |
| `limits[].period` | `string` | Yes | `daily`, `weekly`, or `monthly` |
| `limits[].maxValue` | `number` | Yes | Maximum allowed actions (>= 0) |
| `limits[].isEnabled` | `boolean` | No | Whether this limit is enforced (default: `true`) |

**Response:**

```json
{
  "success": true,
  "result": {}
}
```

## limits.delete

Remove specific limits from an account. A removed limit is not replaced by its default: the account has no limit in that category for that period until you set one again with [limits.set](#limits-set). To restore the system defaults, use [limits.resetToDefaults](#limits-resettodefaults), which replaces all of the account's limits.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/limits.delete \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here" \
  -d '{
    "accountId": "f9b4346a-...",
    "limits": [
      {"category": "stMessages", "period": "daily"},
      {"category": "stConnectionRequests", "period": "weekly"}
    ]
  }'
```

```typescript tab=Node
await admin.limits.delete({
  accountId: 'f9b4346a-...',
  limits: [
    { category: 'stMessages', period: 'daily' },
    { category: 'stConnectionRequests', period: 'weekly' },
  ],
});
```

```python tab=Python
from linkedapi import DeleteLimitEntry, DeleteLimitsParams

admin.limits.delete(
    DeleteLimitsParams(
        account_id="f9b4346a-...",
        limits=[
            DeleteLimitEntry(category="stMessages", period="daily"),
            DeleteLimitEntry(category="stConnectionRequests", period="weekly"),
        ],
    )
)
```

```bash tab=CLI
linkedin admin limits delete f9b4346a-... --category stMessages --period daily
linkedin admin limits delete f9b4346a-... --category stConnectionRequests --period weekly
```

:::surface cli
`linkedin admin limits delete <accountId>` removes one limit per call, named by `--category` and `--period`, both required.
:::

**Body:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `accountId` | `string` | Yes | Account UUID |
| `limits` | `array` | Yes | Array of limits to remove |
| `limits[].category` | `string` | Yes | Limit category |
| `limits[].period` | `string` | Yes | Limit period |

**Response:**

```json
{
  "success": true,
  "result": {}
}
```

## limits.resetToDefaults

Reset all limits for an account to the system defaults.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/limits.resetToDefaults \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here" \
  -d '{"accountId": "f9b4346a-..."}'
```

```typescript tab=Node
await admin.limits.resetToDefaults({ accountId: 'f9b4346a-...' });
```

```python tab=Python
from linkedapi import ResetLimitsParams

admin.limits.reset_to_defaults(ResetLimitsParams(account_id="f9b4346a-..."))
```

```bash tab=CLI
linkedin admin limits reset f9b4346a-...
```

**Body:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `accountId` | `string` | Yes | Account UUID |

**Response:**

```json
{
  "success": true,
  "result": {}
}
```
