# Search Preview: Base Jobs API

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

Query type:

URLs:
{% endcolumn %}

{% column %}
Base Jobs

Coresignal's custom filters and Elasticsearch DSL

<https://api.coresignal.com/cdapi/v2/job\\_base/search/filter/preview\\>
<https://api.coresignal.com/cdapi/v2/job\\_base/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, Base Jobs API search `/v2/job_base/search/filter/preview` and `/v2/job_base/search/es_dsl/preview` endpoints' 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="broken-reference">Broken link</a></td></tr></tbody></table>

## Request queries

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

{% tabs %}
{% tab title="Search Filter request" %}
{% code title="Search Filter request" %}

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/job_base/search/filter/preview' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "created_at_gte": "2025-08-01 00:00:00",
  "title": "Data Analyst",
  "employment_type": "Full-time"
}'
```

{% endcode %}
{% endtab %}

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

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/job_base/search/es_dsl/preview' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
        "match": {
            "title": {
                "query": "Project manager",
                "operator": "and"
            }
        }
    }
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Response structure

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

| Data field     | Description                                        | Data type |
| -------------- | -------------------------------------------------- | --------- |
| `id`           | Identification key for a job posting record        | Integer   |
| `created`      | The time and date when we first scraped the record | String    |
| `title`        | Job title                                          | String    |
| `location`     | Job location                                       | String    |
| `company_name` | Company name                                       | 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 %}

{% tabs %}
{% tab title="Search Filter response" %}
{% code title="Search Filter response" %}

```json
  {
    "id": 123456789,
    "created": "2025-09-01 00:00:00",
    "title": "Data Analyst",
    "location": "New York, NY",
    "company_name": "Example Company",
    "_score": 10.1233456
  }
```

{% endcode %}
{% endtab %}

{% tab title="Elasticsearch DSL response" %}
{% code title="Elasticsearch DSL response" %}

```json
  {
    "id": 123456789,
    "created": "2025-09-01 00:00:00",
    "title": "Data Analyst",
    "location": "New York, NY",
    "company_name": "Example Company",
    "_score": 10.1233456
  }
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Pagination

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

{% tabs %}
{% tab title="Search Filter request" %}
{% code title="Search Filter request" %}

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/job_base/search/filter/preview?page=3' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "created_at_gte": "2025-08-01 00:00:00",
  "title": "Data Analyst",
  "employment_type": "Full-time"
}'
```

{% endcode %}
{% endtab %}

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

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/job_base/search/es_dsl/preview?page=5' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": {
        "match": {
            "title": {
                "query": "Project manager",
                "operator": "and"
            }
        }
    }
}'
```

{% endcode %}
{% endtab %}
{% endtabs %}
