> ## 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.

# Retrieve visiting companies

> Read companies identified on your websites, filter their activity, and distinguish Company ID from single-IP lookups

Use the Company ID API to retrieve companies associated with visits to your pixels. Use the [IP2Company API](https://docs.leadpipe.com/ip-to-company/introduction.md) when you have an individual IP to look up or enrich.

## Before you start

You need an active organization API key and Company ID access. Person-data API access and single-IP lookup access are separate permissions. The key selects the organization; use pixel IDs owned by that organization.

These reads do not start paid lookups or spend additional Company Credits. Company admission shares the legacy **Company Credits** allowance, once per organization/company/billing period. Previously admitted companies remain readable after exhaustion. Dedicated IP2Company credits are separate.

## List visiting companies

Set `LEADPIPE_API_KEY` in your environment, then run:

```bash theme={null}
curl "https://api.aws53.cloud/v1/data/companies/query" \
  -H "X-API-Key: $LEADPIPE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"window":"30d","classification":"company","page":1,"limit":25}'
```

The JSON body is required; `{}` selects the defaults. The response includes companies in `data`, plus `pagination` and `meta`. Use the returned opaque `companyKey` for details. An empty page returns `data: []`.

| Input | Behavior |
| - | - |
| `window` | Defaults to `30d`; use a supported preset or supply both inclusive `from` and exclusive `to`, with a maximum custom range of 366 days. |
| `pixelIds` | Omit for organization-wide scope; `[]` selects no pixels. |
| `classification` | `company` includes company and unclassified associations while excluding ISPs. Select `isp` or `unclassified_organization` for that subset. |
| `page`, `limit` | Default to page 1 and 25 rows; maximum page 1000 and 100 rows per page. Follow `pagination.hasMore`. |

Use the generated [company list reference](https://docs.leadpipe.com/api-reference/visitors/list-visiting-companies-via-api-key.md) for company, location, activity, and sorting filters. Blank and Unknown company names are excluded. The returned evidence classification can differ from the requested view; inclusion in the company view does not turn an unclassified association into a confirmed company match.

## Read company activity

Set `COMPANY_KEY` to a key returned by the list:

```bash theme={null}
curl "https://api.aws53.cloud/v1/data/companies/$COMPANY_KEY?window=30d&classification=company&page=1&limit=25" \
  -H "X-API-Key: $LEADPIPE_API_KEY"
```

Keep the same time window and classification request filter as the list. If the list used one pixel, pass that pixel as `pixelId` for details; for a broader list, choose the matching authorized detail scope described in the reference.

The response contains `data.company` and paginated `data.activity`. A company without matching activity in the selected organization and scope returns `company: null` and `activity: []`. See the [activity reference](https://docs.leadpipe.com/api-reference/visitors/get-visiting-company-activity-via-api-key.md) for exact fields and parameters.

## Interpret coverage and limits

Company attributes are latest known IP associations, not proof of visitor employment or historical IP ownership. Distinct IP counts are not people counts. Activity includes masked IPs; it does not expose full IPs or personal profiles. Masked IPs are not unique identifiers.

Processing and enrichment are asynchronous. `meta.asOf` is response time, not a completeness watermark; `historyComplete` remains false. Backfill progress describes event copying rather than completed enrichment. Each request resolves its own boundary, so results can change between pages.

Both company-visitor operations share **60 requests per 60 seconds per client IP**. Pace requests using `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset`; honor `Retry-After` after a rate-limit `429`. For access and other failures, use [Authentication and errors](https://docs.leadpipe.com/api-reference/authentication-and-errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.