Elasticsearch DSL

Data type:

Query type:

URL:

Base Company

Elasticsearch DSL

https://api.coresignal.com/cdapi/v2/company_base/search/es_dsl


Overview

Use the /v2/company_base/search/es_dsl endpoint for more sophisticated queries and retrieve company data.

Elasticsearch schema

Elasticsearch schema
Endpoint schema
"mappings": {
    "properties": {
        "id": {
            "type": "long"
        },
        "url": {
            "type": "text",
            "fields": {
                "exact": {
                    "type": "keyword"
                }
            }
        },
        "name": {
            "type": "text",
            "fields": {
                "exact": {
                    "type": "keyword"
                }
            }
        },
        "website": {
            "type": "text",
            "fields": {
                "exact": {
                    "type": "keyword",
                    "null_value": "NULL"
                },
                "filter": {
                    "type": "text",
                }
            }
        },
        "size": {
            "type": "keyword",
            "null_value": "NULL"
        },
        "industry": {
            "type": "text",
            "fields": {
                "exact": {
                    "type": "keyword",
                    "null_value": "NULL"
                }
            }
        },
        "description": {
            "type": "text"
        },
        "founded": {
            "type": "date",
            "null_value": "1000",
        },
        "headquarters_country_parsed": {
            "type": "keyword",
            "null_value": "NULL"
        },
        "headquarters_new_address": {
            "type": "text",
            "fields": {
                "exact": {
                    "type": "keyword",
                    "null_value": "NULL"
                }
            }
        },
        "source_id": {
            "type": "long"
        },
        "created": {
            "type": "date",
            "format": "yyyy-MM-dd HH:mm:ss"
        },
        "last_updated": {
            "type": "date",
            "format": "yyyy-MM-dd HH:mm:ss"
        },
        "type": {
            "type": "text"
        },
        "employees_count": {
            "type": "long",
            "null_value": -1
        },
        "company_shorthand_name": {
            "type": "keyword"
        },
        "canonical_url": {
            "type": "text",
            "fields": {
                "exact": {
                    "type": "keyword"
                }
            }
        },
        "canonical_shorthand_name": {
            "type": "keyword"
        },
        "deleted": {
            "type": "byte"
        },
        "company_financial_website_info_collection": {
            "type": "nested",
            "properties": {
                "id": {
                    "type": "long"
                },
                "financial_website_url": {
                    "type": "text",
                    "fields": {
                        "exact": {
                            "type": "keyword"
                        }
                    }
                }
            }
        },
        "company_specialties_collection": {
            "type": "nested",
            "properties": {
                "id": {
                    "type": "long"
                },
                "specialty": {
                    "type": "text"
                }
            }
        },
        "company_stock_info_collection": {
            "type": "nested",
            "properties": {
                "id": {
                    "type": "long"
                },
                "ticker": {
                    "type": "text"
                }
            }
        },
        "company_funding_rounds_collection": {
            "type": "nested",
            "properties": {
                "id": {
                    "type": "long"
                },
                "last_round_investors_count": {
                    "type": "long"
                },
                "total_rounds_count": {
                    "type": "long",
                    "null_value": -1
                },
                "last_round_type": {
                    "type": "keyword"
                },
                "last_round_date": {
                    "type": "date",
                    "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||uuuu",
                    "null_value": "1000"
                },
                "last_round_money_raised": {
                    "type": "keyword"
                },
                "financial_website_url": {
                    "type": "keyword"
                },
                "created": {
                    "type": "date",
                    "format": "yyyy-MM-dd HH:mm:ss"
                },
                "last_updated": {
                    "type": "date",
                    "format": "yyyy-MM-dd HH:mm:ss"
                },
                "deleted": {
                    "type": "byte"
                }
            }
        }
    }
}

Sorting options

Find several examples of the available sorting options. All information about the sorting is in the general Elasticsearch DSL topic.

Sort by score
{
    "query": {
      "match":{
         "name":{
            "query":"Example Company",
            "operator":"and"
         }
      }
   },
    "sort": [
        "_score"
    ]
}

Additional sorting fields

Base Company includes additional numerical sorting options. Sorting is made in descending order by a selected field. If several fields have the same value, sorting is made by the last_updated field. If the last_updated values are also the same, sorting is then done by the id field. Sorting fields are listed below:

  • employees_count,

  • source_id

Last updated

Was this helpful?