> 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/legacy-data/clean-company-api/endpoints/search-preview.md).

# Search Preview: Clean Company API

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

Query type:

URL:
{% endcolumn %}

{% column %}
Clean Company

Elasticsearch DSL

<https://api.coresignal.com/cdapi/v2/company\\_clean/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, Clean Company API search `/v2/company_clean/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-preview.md">Search Preview</a></td></tr></tbody></table>

## Request query

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

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

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

{% endcode %}

## Response structure

Here is an overview of the fields that are retrieved using the Clean Company API search preview endpoints.&#x20;

| Data field                                | Description                                                                | Data type |
| ----------------------------------------- | -------------------------------------------------------------------------- | --------- |
| `id`                                      | Identification number                                                      | Integer   |
| `name`                                    | Company name                                                               | String    |
| `websites_professional_network_canonical` | Canonical Professional network profile URL                                 | String    |
| `website_main`                            | Company's website                                                          | String    |
| `size_range`                              | <p>Company size category<br>(determined by the number of employees)</p>    | String    |
| `industry`                                | Company's industry                                                         | String    |
| `location_hq_country`                     | Country the company is based in (as parsed by our in-house country parser) | String    |
| `logo`                                    | BASE64 encoded JPEG image of the company's logo                            | String    |
| `_score`                                  | Elasticsearch score                                                        | Float     |

**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="Elasticsearch DSL response" %}

```json
    {
        "id": 12345678,
        "name": "Example Company",
        "websites_professional_network_canonical": "https://uk.professional-network.com/company/example-company",
        "websites_main": "http://example-company.co.uk",
        "size_range": "Myself Only",
        "industry": "Information Technology & Services",
        "location_hq_country": "United Kingdom",
        "logo": null,
        "_score": 10.123456
    },
```

{% 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/company_clean/search/es_dsl/preview?page=4' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
        "bool": {
            "should": [
                {
                    "query_string": {
                        "query": "Data",
                        "default_field": "name",
                        "default_operator": "and"
                    }
                }
            ]
        }
    }
}'
```

{% endcode %}


---

# 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/legacy-data/clean-company-api/endpoints/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.
