> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leadpipe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find topics

> Browse, filter, and search the topic inventory

## Browse all topics

Use the inventory endpoint to browse the full topic library.

```bash theme={null}
GET /v1/intent/topics
GET /v1/intent/topics?type=b2b
GET /v1/intent/topics?type=b2b&industry=Marketing
GET /v1/intent/topics?q=CRM
```

| Param      | Type   | Description               |
| ---------- | ------ | ------------------------- |
| `type`     | string | `b2b`, `b2c`, or `both`   |
| `industry` | string | Exact industry match      |
| `category` | string | Exact category match      |
| `q`        | string | Text search in topic name |

### Response

```json theme={null}
{
  "data": [
    {
      "topicId": 117805,
      "topicName": "Marketing ROI",
      "type": "b2b",
      "industry": "Marketing",
      "category": "Service"
    }
  ],
  "meta": {
    "total": 20768,
    "page": 1,
    "pageSize": 50,
    "hasMore": true
  }
}
```

## Get facet values

Use facets when you need available filter values with counts.

```bash theme={null}
GET /v1/intent/topics/facets
```

```json theme={null}
{
  "data": {
    "types": [
      { "value": "b2b", "count": 8766 },
      { "value": "b2c", "count": 6447 },
      { "value": "both", "count": 5555 }
    ],
    "industries": [
      { "value": "Marketing", "count": 829 },
      { "value": "Technology", "count": 1644 }
    ],
    "categories": [
      { "value": "Service", "count": 7234 },
      { "value": "Product", "count": 4521 }
    ],
    "total": 20768
  }
}
```

## Search topics

Use search for autocomplete-style topic lookup.

```bash theme={null}
GET /v1/intent/topics/search?q=account+based&type=b2b&limit=5
```

```json theme={null}
{
  "data": [
    {
      "topicId": 117890,
      "topicName": "Account-Based Marketing",
      "type": "b2b",
      "industry": "Marketing",
      "category": "Service"
    }
  ]
}
```

## Save a topic list

Use topic lists when a set of topics should be reused later or turned into an audience.

```bash theme={null}
POST /v1/intent/topics/lists
x-api-key: YOUR_API_KEY
Content-Type: application/json
```

```json theme={null}
{
  "name": "CRM Topics",
  "topicIds": [117801, 102391],
  "source": "search",
  "keywords": ["crm", "customer data"]
}
```

List saved topic lists:

```bash theme={null}
GET /v1/intent/topics/lists?limit=50
x-api-key: YOUR_API_KEY
```

Update or delete a saved list:

```bash theme={null}
PATCH /v1/intent/topics/lists/{id}
DELETE /v1/intent/topics/lists/{id}
```

## Create an audience from a topic list

```bash theme={null}
POST /v1/intent/topics/lists/{id}/instantiate
x-api-key: YOUR_API_KEY
Content-Type: application/json
```

```json theme={null}
{
  "name": "CRM Decision Makers",
  "status": "draft",
  "minScore": 70,
  "maxScore": 99,
  "minTopicOverlap": 1,
  "filters": {
    "contact.hasBusinessEmail": true
  }
}
```

## Recent site topic searches

```bash theme={null}
GET /v1/site-topics/recent
x-api-key: YOUR_API_KEY
```

This returns the last `20` site topic searches for the organization, including the URL, company, summary, keywords, and top matched topics when available.
