# Run Saved Search

> Count the current matches of a saved search. Free.

Requires an API key with the `write` scope.

Free: no reveal credits and no search budget are spent. FoxReach asks the data provider for a count with the stored filters and updates the saved total and last-run time. It returns the count, not the people; use [Search People](/api-reference/lead-finder/search-people) with the same filters to fetch them. The `write` scope is needed because the stored total changes.

## Path Parameters

<ParamField path="saved_search_id" type="string" required>The saved search id.</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="total" type="integer">Current number of matches.</ResponseField>
    <ResponseField name="lastRunAt" type="string">ISO 8601 timestamp of this run.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/lead-finder/saved-searches/ss_abc123/run" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
result = client.lead_finder.run_saved_search("ss_abc123")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const result = await client.leadFinder.runSavedSearch("ss_abc123");
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {"total": 4321, "lastRunAt": "2026-11-04T10:05:00+00:00"}
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `402` | `upgrade_required` on the Free plan |
| `404` | `Lead Finder is not enabled` while Lead Finder is switched off on this environment |
| `503` | `Lead Finder is not configured` when it is enabled but has no data provider key |
| `404` | `Saved search not found`: it does not exist in this workspace |
| `502` | The data provider is unavailable right now |

## Rate Limit

- **100 requests per minute, shared by every `expensive` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`expensive`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
