# API: Reading and filtering leads

URL: https://help.hubhus.com/kb/how-do-i-read-get-leads-via-api
Category: Integrations / API
Updated: 2026-09-28T14:40:37.642+00:00

Summary: GET https://api.leadvalidator.dk/leads?campaign_id={id} with Authorization: Bearer {token} . Filter with query params: filter&#91;status&#93;=contacted , filter&#91;updated_after&#93;=2025-01-01 , filter&#91;source&#93;=partner-west . Paginate with &page=2 . Use filter&#91;updated_after&#93; for incremental sync.

Pull lead data from Hubhus into any external CRM, ERP, BI tool, or automation platform using the Hubhus REST API.

## 4 things to know

1. **Basic GET request**. You need your API token and campaign ID (visible in the URL: `campaigns/362/...` → id = 362).
2. **Filtering with query parameters**. All filters use AND logic. Select field values use their slug, not label.
3. **Pagination**. Results are paginated. The response includes `pagination.total_pages`. Fetch additional pages with `?page=2` or increase the page size with `per_page`, e.g. `?page=2&per_page=100`.
4. **Best practices**. Use `updated_after` for incremental sync instead of full fetches. Use campaign-scoped tokens for external vendors. Read slugs from live API documentation - never hardcode manually. Implement retry/backoff for large pulls. Log API errors - they explain exactly what failed.

**Read more - response format and advanced filters**

### Pagination response structure

```
{
  "data": [...],
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total": 143,
    "total_pages": 3
  }
}
```

Loop through pages until `page` = `total_pages`.

### Practical examples

Incremental sync - updated in last 24 hours

```
GET /leads?campaign_id=362&filter[updated_after]=2025-02-21T00:00:00Z
```

All "new" leads from a specific partner

```
GET /leads?campaign_id=362&filter[status]=new&filter[source]=partner-north
```

Page 3 with 100 leads per page

```
GET /leads?campaign_id=362&page=3&per_page=100
```

### Official API resources

- [API documentation - leadvalidator.dk/docs](https://leadvalidator.dk/docs/)
- [OpenAPI specification (YAML)](https://leadvalidator.dk/docs/download/openapi.yaml/hubhus-openapi.yaml)
- [Postman collection (JSON)](https://leadvalidator.dk/docs/download/collection.json/hubhus-postman-collection.json)

Always use the live API documentation for the current field list - the exact structure depends on your campaign schema.

## Related articles

- https://help.hubhus.com/kb/what-is-the-hubhus-api
- https://help.hubhus.com/kb/sharing-personalized-api-documentation
- https://help.hubhus.com/kb/api-setup-and-authentication
- https://help.hubhus.com/kb/api-copy-leads-to-another-campaign
