# Industry codes of the companies (https://webmetic.de/docs/api/referenz/visitor-intelligence/company-nace)

## GET /company_nace

Retrieves NACE (Nomenclature of Economic Activities) codes for companies associated with a specified domain within a given time range.

This endpoint provides information about the economic activities of companies that have had sessions within the specified date range, categorized using the NACE classification system. It includes both company identifiers and the associated NACE codes.

Parameters:
- domain (str): The domain name for which you want to retrieve company NACE codes.
- from_date (str, optional): The starting date and time for the data range. Accepts ISO 8601 format or relative dates like '-30 days'. Default is '-30 days'.
- to_date (str, optional): The ending date and time for the data range. Accepts ISO 8601 format or 'now' for the current date and time. Default is 'now'.
- page (int, optional): The page number of results to retrieve. Default is 1.
- page_size (int, optional): The number of entries to retrieve per page, up to 10000. Default is 10000.

Returns:
A JSON object containing:
1. Pagination information:
- total: Total number of NACE code entries
- page_total: Total number of pages
- isFirst: Boolean indicating if it's the first page
- current: Current page number
- isLast: Boolean indicating if it's the last page
- page_size: Number of entries per page
2. Result: An array of NACE code objects, each containing:
- company_id: Unique identifier for the company
- code: The NACE code
- full_code: The full NACE code including section
- section_code: The section code of the NACE classification
- section_description_de: Description of the section in German
- section_description_en: Description of the section in English
- division_code: The division code of the NACE classification
- division_description_de: Description of the division in German
- division_description_en: Description of the division in English
- description_de: Detailed description of the NACE code in German
- description_en: Detailed description of the NACE code in English

Note: This endpoint is rate-limited to 1 request per second.

### Parameter

| Name | Ort | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- | --- |
| `domain` | query | string | ja |  |
| `from_date` | query | string | nein | Starting DateTime format or relative dates like '-30 days', '-1 hour', '-5 minutes'. Examples: '2023-01-01', '-7 days', '-12 hours', '-5 minutes', 'now' |
| `to_date` | query | string | nein | Ending DateTime format or 'now' for the current date/time. Examples: '2023-01-31', 'now' |
| `page` | query | integer | nein | Selected result page, starting at 1 |
| `page_size` | query | integer | nein | Number of entries per page, from 1 up to a maximum of 10000 |

### Antworten

| Status | Beschreibung |
| --- | --- |
| 200 | One entry per company and NACE code |
| 400 | INVALID_DATE: from_date or to_date cannot be read |
| 403 | API_KEY_MISSING, API_KEY_INVALID, API_KEY_NOT_FOUND, or API_KEY_NOT_AUTHORIZED: the domain is not a website of your account (send it exactly as listed there) |
| 422 | VALIDATION_ERROR: a parameter is missing or out of range (page from 1, page_size 1 to 10000); `errors` lists each problem |
| 429 | RATE_LIMITED: more than one request per second to this endpoint |
| 500 | INTERNAL_ERROR: unexpected server error |

Felder der Antwort 200:

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `pagination` | Pagination[] | ja | Always one entry |
| `pagination[].total` | integer | ja | Entries over all pages |
| `pagination[].page_total` | integer | ja | Number of pages; 0 on an empty result |
| `pagination[].isFirst` | boolean | ja | true on page 1 |
| `pagination[].current` | integer | ja | This page, from 1 |
| `pagination[].isLast` | boolean | ja | true when current >= page_total, also on an empty result |
| `pagination[].page_size` | integer | ja | Entries per page as requested |
| `result` | CompanyNaceRow[] | ja | One entry per company and industry code |
| `result[].code` | string \| null | nein | Class code, e.g. 11.07 |
| `result[].full_code` | string \| null | nein | Section letter and class code, e.g. C 11.07 |
| `result[].section_code` | string \| null | nein | Section letter, e.g. C |
| `result[].section_description_de` | string \| null | nein | Section name in German |
| `result[].section_description_en` | string \| null | nein | Section name in English |
| `result[].division_code` | string \| null | nein | Division, e.g. C11 |
| `result[].division_description_de` | string \| null | nein | Division name in German |
| `result[].division_description_en` | string \| null | nein | Division name in English |
| `result[].description_de` | string \| null | nein | Class name in German |
| `result[].description_en` | string \| null | nein | Class name in English |
| `result[].company_id` | string \| null | nein | Webmetic's id of the company (12 characters). /contacts takes it. |

### Beispiel

```bash
curl -X GET 'https://hub.webmetic.de/company_nace?domain=website.example' \
  -H 'Authorization: wmtc_IHR_API_SCHLUESSEL'
```