# POST /lead-gen/saved-searches

**Resource:** [Lead Generation](./lead-gen.md)  
**Scopes:** `lead-gen:write`  
**Write operation:** yes

Create a saved search configuration for recurring use. Saved searches store the query, location, and default import settings. Run a saved search by calling POST /lead-gen/search with saved_search_id -- the run_count and last_run_at fields update automatically.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `name` | body | string | yes | Human-readable name, e.g. "Sydney Electricians" |
| `search_query` | body | string | yes | Business type or search term |
| `location` | body | string | yes | Location to search in |
| `max_results` | body | number | no | Default max results per run (1-500) |
| `radius_km` | body | number | no | Search radius in kilometres |
| `default_pipeline_id` | body | uuid | no | Default pipeline for deal creation on import |
| `default_stage_id` | body | uuid | no | Default stage for deal creation on import |
| `default_tags` | body | string[] | no | Default tags to apply on import |
| `enrich_emails` | body | boolean | no | When true, all runs of this saved search automatically set scrape_contacts=true: always async, forces website_filter to "withWebsite", drops results without a valid email (email guarantee). Saved searches with enrich_emails=true will never return email-less rows. |

## Request example

```bash
curl -X POST \
  "https://api.trustpager.com/functions/v1/api/v1/lead-gen/saved-searches" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sydney Electricians",
    "search_query": "electricians",
    "location": "Sydney, NSW",
    "max_results": 100,
    "default_tags": ["lead-gen", "electricians"]
  }'
```

## Response example

```json
{
  "data": {
    "id": "7d05612a-...",
    "name": "Sydney Electricians",
    "search_query": "electricians",
    "location": "Sydney, NSW",
    "max_results": 100,
    "run_count": 0,
    "last_run_at": null,
    "is_archived": false,
    "created_at": "2026-04-17T04:00:00Z",
    "updated_at": "2026-04-17T04:00:00Z"
  },
  "meta": { "url": "https://app.trustpager.com/tools/lead-gen" }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`