> For the complete documentation index, see [llms.txt](https://docs.coresignal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coresignal.com/employee-data/api/search-preview.md).

# Search Preview: Employee API

Preview data of matching employee records in real time using Elasticsearch DSL.

{% columns %}
{% column width="16.666666666666664%" %}
Data type:

Query type:

URL:
{% endcolumn %}

{% column %}
Employee data

Elasticsearch DSL

<https://api.coresignal.com/cdapi/v2/employee\\_multi\\_source/search/es\\_dsl/preview>
{% endcolumn %}
{% endcolumns %}

***

## Overview

Retrieve a limited set of fields from top-matching records in real time, and search suggestion features. Here, Employee API search `/v2/employee_multi_source/search/es_dsl/preview` endpoint's usage is reviewed.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>General information about search preview</td><td><a href="/api-introduction/requests/search-filters.md">Search Filters</a></td></tr></tbody></table>

## Request queries

See the request example of `preview` endpoint. Search Preview endpoints accept the same query structure as their corresponding Search endpoints.

{% code title="Elasticsearch DSL request" %}

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/employee_multi_source/search/es_dsl/preview' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
        "bool": {
            "should": [
                {
                    "query_string": {
                        "query": "Python",
                        "default_field": "summary",
                        "default_operator": "and"
                    }
                }
            ]
        }
    }
}'
```

{% endcode %}

## Response structure

Here is an overview of the fields that are retrieved using the Employee API search preview endpoints.

<table data-search="false"><thead><tr><th>Data field</th><th>Description</th><th>Data type</th></tr></thead><tbody><tr><td><code>id</code></td><td>Identification number</td><td>Integer</td></tr><tr><td><code>full_name</code></td><td>Employee's full name</td><td>String</td></tr><tr><td><code>professional_network_url</code></td><td>Most recent Professional network profile URL</td><td>String</td></tr><tr><td><code>headline</code></td><td>Profile headline</td><td>String</td></tr><tr><td><code>location_full</code></td><td>Employee's full location</td><td>String</td></tr><tr><td><code>location_country</code></td><td>Associated country</td><td>String</td></tr><tr><td><code>connections_count</code></td><td>Count of profile connections</td><td>Integer</td></tr><tr><td><code>followers_count</code></td><td>Count of profile followers</td><td>Integer</td></tr><tr><td><code>company_name</code></td><td>Company name. Data is from <code>experience</code> category</td><td>String</td></tr><tr><td><code>company_professional_network_url</code></td><td>Company's Professional network URL. Data is from <code>experience</code> category</td><td>String</td></tr><tr><td><code>company_website</code></td><td>Company's website. Data is from <code>experience</code> category</td><td>String</td></tr><tr><td><code>company_industry</code></td><td>Company's industry. Data is from <code>experience</code> category</td><td>String</td></tr><tr><td><code>active_experience_title</code></td><td>Title of employee's current position</td><td>String</td></tr><tr><td><code>active_experience_department</code></td><td>A list of employee's departments, based on <code>actve_position_title</code></td><td>String</td></tr><tr><td><code>active_experience_management_level</code></td><td>A list of employee's management levels, based on <code>active_experience_title</code></td><td>String</td></tr><tr><td><code>company_hq_full_address</code></td><td>Full address of the company's headquarters. Data is from <code>experience</code> category</td><td>String</td></tr><tr><td><code>company_hq_country</code></td><td>The country where the company's headquarters are located. Data is from <code>experience</code> category</td><td>String</td></tr><tr><td><code>_score</code></td><td>Elasticsearch score</td><td>Float</td></tr></tbody></table>

**Refer to the data example here:**

{% hint style="info" %}
All personal/company information mentioned within this context is entirely fictional and is solely intended for illustrative purposes.
{% endhint %}

{% code title="Search preview request response" %}

```json
    {
        "id": 1234566,
        "full_name": "John Doe",
        "professional_network_url": "https://www.professional-network.com/in/john-doe",
        "headline": "Python Automation Engineer, QA automation",
        "location_full": "United States",
        "location_country": "United States",
        "connections_count": 100,
        "followers_count": 110,
        "company_name": "Example Company",
        "company_professional_network_url": "https://www.professional-network.com/company/example-company",
        "company_website": "https://www.example-company.com",
        "company_industry": "IT System Custom Software Development",
        "active_experience_title": "Python Automation Engineer",
        "active_experience_department": "Engineering and Technical",
        "active_experience_management_level": "Specialist",
        "company_hq_full_address": "123 Example st; New York, US",
        "company_hq_country": "United States",
        "_score": 8.01234
    },
```

{% endcode %}

## Pagination

Example of the request using pagination query parameter `page`.

{% code title="Elasticsearch DSL request" %}

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/employee_multi_source/search/es_dsl/preview?page=3' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
        "bool": {
            "should": [
                {
                    "query_string": {
                        "query": "Python",
                        "default_field": "summary",
                        "default_operator": "and"
                    }
                }
            ]
        }
    }
}'
```

{% endcode %}

## Sorting options

Employee API `/v2/employee_multi_source/search/es_dsl/preview` endpoint supports sorting capabilities, which are the same as found in Employee API's [Elasticsearch DSL](/employee-data/api/elasticsearch-dsl.md#sorting-options) topic.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coresignal.com/employee-data/api/search-preview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
