# API (https://webmetic.de/docs/en/api)

Your CRM can, for example, fetch the companies that visited your website every night. The REST API lives at `https://hub.webmetic.de`, and every request needs an API key in the `Authorization` header.

You can try every endpoint right away: the pages under [Playground](https://webmetic.de/docs/en/api/referenz/visitor-intelligence/company) describe request and response and send a real request at the click of a button, without an account using the demo key `wmtc_demo`. The [Quickstart](https://webmetic.de/docs/en/api/schnellstart) takes you to your first request from your own code and explains the response.

```bash title="Terminal"
curl "https://hub.webmetic.de/company?domain=your-website.com&page_size=3" \
  -H "Authorization: wmtc_YOUR_API_KEY"
```

The response contains up to three companies that were on your website in the last 30 days.

## API keys [#api-keys]

Admins find the keys under [**Menu** > **Integrations** > **API**](https://app.webmetic.de/?menu=api_details), where the **API keys** window shows three keys:

- **Visitor Intelligence**: visits and companies, contacts, and webhooks.
- **Enrichment**: every endpoint under `/enrichment/*`. You can generate this key during the trial, on Growth, and on Enterprise.
- **Data Layer**: company lookup for the [Matomo plugin](https://webmetic.de/docs/en/integrationen/matomo-plugin).

[Authentication](https://webmetic.de/docs/en/api/authentifizierung) describes how to send the key and what a new key changes.

## What the API does [#what-the-api-does]

- [Visitor Intelligence](https://webmetic.de/docs/en/api/referenz/visitor-intelligence/company-sessions): Retrieve the companies that visited your website, with visits, page views, and industry. The API also returns reports on intensive, returning, and new visits.
- [Enrichment](https://webmetic.de/docs/en/api/referenz/enrichment/company): Retrieve company data for a domain, one at a time or as a list with CSV export. New lists and lookups need the Growth plan.
- [Contacts](https://webmetic.de/docs/en/api/referenz/contacts/search): Find contacts at an identified company and unlock their email address or phone number. Unlocking costs credits.
- [Webhooks](https://webmetic.de/docs/en/api/webhooks): Have visits and new segment matches reported to your server a few minutes after the visit appears in the dashboard.

The API only finds contacts once you have completed [Set up contacts](https://webmetic.de/docs/en/ansprechpartner/einrichten) in the dashboard. Until then it answers with `CONTACTS_SETUP_REQUIRED`.

## Basics [#basics]

- [Quickstart](https://webmetic.de/docs/en/api/schnellstart): send your first request and read the response.
- [Authentication](https://webmetic.de/docs/en/api/authentifizierung): send the key and fix key errors.
- [Errors](https://webmetic.de/docs/en/api/fehler): every error code with cause and fix.
- [Pagination](https://webmetic.de/docs/en/api/paginierung): fetch large responses page by page.
- [Date ranges and time zones](https://webmetic.de/docs/en/api/zeitraeume-und-zeitzonen): set date ranges and read timestamps.
- [Rate limits](https://webmetic.de/docs/en/api/anfragelimits): how many requests the API accepts.
- [Credits in the API](https://webmetic.de/docs/en/api/credits): which requests cost credits.
- [Asynchronous results](https://webmetic.de/docs/en/api/asynchrone-ergebnisse): wait for Enrichment results.
- [Webhooks](https://webmetic.de/docs/en/api/webhooks): receive events and verify the signature.

## Reference and playground [#reference-and-playground]

Every reference page shows parameters, responses, and code samples. The **Try in Playground** button sends a request to the API right from the page.

<Callout type="warn" title="With your own key, every request is live">
The playground starts with the [demo key](https://webmetic.de/docs/en/api/schnellstart#try-it-without-an-account) `wmtc_demo` and the domain `website.example`. The demo key returns invented data, stores nothing, and costs no credits. When you replace it with your own key, the playground works on your real account. `/contacts/reveal` and `/contacts/find` then use real credits. `POST /webhooks` creates a real webhook, and `DELETE /webhooks/{endpoint_id}` deletes it. The Enrichment write requests create real lists and add domains.
</Callout>

## For automations and AI [#for-automations-and-ai]

- [n8n](https://webmetic.de/docs/en/integrationen/n8n), [Make and Zapier](https://webmetic.de/docs/en/integrationen/make-und-zapier) have ready-made Webmetic connections. You only need your API key, no code of your own.
- The [AI assistant](https://webmetic.de/docs/en/ki-assistent) answers questions about your visits through MCP, without code of your own.
- This documentation is available as [llms.txt](https://webmetic.de/docs/llms.txt), and you can get every page as Markdown by adding `.md` to its address.
