# Collect and Enrich

## Introduction to Collect requests

A collect request is an API call that asks a server for data.&#x20;

This type of request is commonly used with two kinds of endpoints:

* **Collect Endpoint**: Used to get a set of data using IDs or shorthand names.
* **Enrich Endpoint**: Used to get a set of data using websites or social media profile URLs as input.

### Discover products

Find APIs collect and enrich endpoints, request samples and additional information.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Multi-source Company API</td><td><ul><li><a href="/pages/KAPkyw2FkrVhD7IxqmsT">Collect</a></li><li><a href="/pages/CDxUytfgtonFoiFBeA9C">Enrich</a></li></ul></td><td></td></tr><tr><td>Clean Company API</td><td><ul><li><a href="/pages/TIJ1R4ENzMyRysstYqMZ">Collect</a></li><li><a href="/pages/fCyhc4OZCLBcZRZm9FFF">Enrich</a></li></ul></td><td></td></tr><tr><td>Base Company API</td><td><ul><li><a href="/pages/k7XTDRH2GRS8JJFhG6NK">Collect</a></li></ul></td><td></td></tr><tr><td>Multi-source Employee API</td><td><ul><li><a href="/pages/czk1etQhlQyr5IlCWdlr">Collect</a></li></ul></td><td></td></tr><tr><td>Clean Employee API</td><td><ul><li><a href="/pages/2x405BiDLXnGMWaBz3DW">Collect</a></li></ul></td><td></td></tr><tr><td>Base Employee API</td><td><ul><li><a href="/pages/ryo7xBe1uivPUKLairE0">Collect</a></li></ul></td><td></td></tr><tr><td>Employee Posts API</td><td><ul><li><a href="/pages/AKtuAdVPKIwcwdGw9cxc">Collect</a></li></ul></td><td></td></tr><tr><td>Multi-source Jobs API</td><td><ul><li><a href="/pages/NFbN4Fp32cqGVN3gSq4b">Collect</a></li></ul></td><td></td></tr><tr><td>Base Jobs API</td><td><ul><li><a href="/pages/jZX3qT6S9HK77t7kDP91">Collect</a></li></ul></td><td></td></tr></tbody></table>

## Supported URL formats for Enrich endpoints

Enrich endpoints should handle a variety of URL formats and match them with the companies in the used dataset.

Examples of different valid inputs include, but are not limited to:

* Full profile URL (e.g., <https://www.apple.com/home>)
* Variations with/without trailing slashes or subdirectories
* Variations with/without `www`
* URLs with/without subdomains (e.g., <https://careers.amazon.com>)
* Variations with/without HTTP/HTTPS URL part.

## Collect all data

This is a simple request that collects a pre-defined set of information and is used to get a large set of data. See available templates below:

{% tabs %}
{% tab title="Collect" %}

```json
curl -X 'GET' \
  'https://api.coresignal.com/cdapi/v2/{entity}/collect/{profile_id/shorthand_name}' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endtab %}

{% tab title="Enrich" %}

```json
curl -X 'GET' \
  'https://api.coresignal.com/cdapi/v2/{entity}/enrich?website={URL}' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endtab %}
{% endtabs %}

## Collect selected data

Field Selection feature for Collect and Enrich APIs enables choosing what fields are required in the output from the available fields in the documentation.

Use a query string parameter `fields` and specify the field you want to collect according to the applied entity. For multiple fields collection, separate each parameter with `&` symbol.

See available templates below:

{% tabs %}
{% tab title="Collect" %}

```json
curl -X 'GET' \
  'https://api.coresignal.com/cdapi/v2/{entity}/collect/{profile_id/shorthand_name}?fields={field_name}&fields={field_name}' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endtab %}

{% tab title="Enrich" %}

```json
curl -X 'GET' \
  'https://api.coresignal.com/cdapi/v2/{entity}/enrich?website={URL}&fields={field_name}&fields={field_name}' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coresignal.com/api-introduction/requests/collect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
