Employee API
Request Examples
Elasticsearch
7min
Elasticsearch endpoint URL: https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl.
Unsure how to write a search request? This article contains several request examples you can refer to.
All personal/company information mentioned within this context is entirely fictional and is solely intended for illustrative purposes.
First example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query":{
8 "match":{
9 "name":{
10 "query":"John Smith",
11 "operator":"and"
12 }
13 }
14 }
15}'
Second example
1curl -X 'POST' \
2 'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "bool": {
9 "must": [
10 {
11 "match": {
12 "title": {
13 "query": "Developer",
14 "operator": "and"
15 }
16 }
17 },
18 {
19 "match": {
20 "location": {
21 "query": "Germany",
22 "operator": "and"
23 }
24 }
25 }
26 ]
27 }
28 }
29}'
Third example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "bool": {
9 "must": [
10 {
11 "match": {
12 "title": {
13 "query": "Developer",
14 "operator": "and"
15 }
16 }
17 },
18 {
19 "match": {
20 "location": {
21 "query": "United States",
22 "operator": "and"
23 }
24 }
25 },
26 {
27 "nested": {
28 "path": "member_experience_collection",
29 "query": {
30 "bool": {
31 "must": [
32 {
33 "query_string": {
34 "query": "IT Company",
35 "default_field": "member_experience_collection.company_name",
36 "default_operator": "and"
37 }
38 }
39 ]
40 }
41 }
42 }
43 }
44 ]
45 }
46 }
47}'
Fourth example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query":{
8 "bool":{
9 "should":[
10 {
11 "query_string":{
12 "query":"Python",
13 "default_field":"summary",
14 "default_operator":"and"
15 }
16 },
17 {
18 "query_string":{
19 "query":"Python",
20 "default_field":"industry",
21 "default_operator":"and"
22 }
23 },
24 {
25 "nested":{
26 "path":"member_experience_collection",
27 "query":{
28 "bool":{
29 "should":[
30 {
31 "query_string":{
32 "query":"Python",
33 "default_field":"member_experience_collection.description",
34 "default_operator":"and"
35 }
36 },
37 {
38 "query_string":{
39 "query":"Python",
40 "default_field":"member_experience_collection.title",
41 "default_operator":"and"
42 }
43 }
44 ]
45 }
46 }
47 }
48 },
49 {
50 "nested":{
51 "path":"member_skills_collection",
52 "query":{
53 "bool":{
54 "should":[
55 {
56 "query_string":{
57 "query":"Python",
58 "default_field":"member_skills_collection.member_skill_list.skill",
59 "default_operator":"and"
60 }
61 }
62 ]
63 }
64 }
65 }
66 }
67 ]
68 }
69 }
70}'
Fifth example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "bool": {
9 "must": [
10 {
11 "nested": {
12 "path": "member_experience_collection",
13 "query": {
14 "bool": {
15 "must": [
16 {
17 "range": {
18 "member_experience_collection.date_to": {
19 "gt": "January 2022",
20 "lt": "April 2023"
21 }
22 }
23 }
24 ]
25 }
26 }
27 }
28 },
29 {
30 "nested": {
31 "path": "member_experience_collection",
32 "query": {
33 "bool": {
34 "must": [
35 {
36 "query_string": {
37 "query": "9073671",
38 "default_field": "member_experience_collection.company_id",
39 "default_operator": "and"
40 }
41 }
42 ]
43 }
44 }
45 }
46 }
47 ]
48 }
49 }
50}'
Sixth example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "nested": {
9 "path": "member_experience_collection",
10 "query": {
11 "bool": {
12 "must": [
13 {
14 "query_string": {
15 "query": "0",
16 "default_field": "member_experience_collection.deleted",
17 "default_operator": "and"
18 }
19 },
20 {
21 "query_string": {
22 "query": 1000,
23 "default_field": "member_experience_collection.date_to",
24 "default_operator": "and"
25 }
26 }
27 ]
28 }
29 }
30 }
31 }
32}'
Seventh example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "nested": {
9 "path": "member_experience_collection",
10 "query": {
11 "bool": {
12 "must": [
13 {
14 "query_string": {
15 "query": 9073671,
16 "default_field": "member_experience_collection.company_id",
17 "default_operator": "and"
18 }
19 },
20 {
21 "query_string": {
22 "query": "Founder",
23 "default_field": "member_experience_collection.title",
24 "default_operator": "and"
25 }
26 },
27 {
28 "query_string": {
29 "query": "0",
30 "default_field": "member_experience_collection.deleted",
31 "default_operator": "and"
32 }
33 },
34 {
35 "query_string": {
36 "query": 1000,
37 "default_field": "member_experience_collection.date_to",
38 "default_operator": "and"
39 }
40 }
41 ]
42 }
43 }
44 }
45 }
46}'
Eight example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "bool": {
9 "must": [
10 {
11 "nested": {
12 "path": "member_experience_collection",
13 "query": {
14 "bool": {
15 "must": [
16 {
17 "query_string": {
18 "query": 9422343,
19 "default_field": "member_experience_collection.company_id",
20 "default_operator": "and"
21 }
22 },
23 {
24 "regexp": {
25 "member_experience_collection.title": {
26 "value": "founder",
27 "case_insensitive": true
28 }
29 }
30 },
31 {
32 "regexp": {
33 "member_experience_collection.title": {
34 "value": "ceo",
35 "case_insensitive": true
36 }
37 }
38 },
39 {
40 "query_string": {
41 "query": 0,
42 "default_field": "member_experience_collection.deleted",
43 "default_operator": "and"
44 }
45 },
46 {
47 "query_string": {
48 "query": "1000",
49 "default_field": "member_experience_collection.date_to",
50 "default_operator": "and"
51 }
52 }
53 ]
54 }
55 }
56 }
57 }
58 ]
59 }
60 }
61}'
Ninth example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "query": {
8 "bool": {
9 "must": [
10 {
11 "query_string": {
12 "query": "(United States) OR USA",
13 "default_field": "country",
14 "default_operator": "and"
15 }
16 },
17 {
18 "nested": {
19 "path": "member_experience_collection",
20 "query": {
21 "bool": {
22 "must": [
23 {
24 "bool": {
25 "must_not": [
26 {
27 "query_string": {
28 "query": "Owner OR Founder OR CEO OR (Chief Executive Officer) OR CFO OR (Chief Financial Officer) OR President OR COO OR (Chief Operating Officer) OR CIO OR (Chief Information Officer) OR CTO OR (Chief Technology Officer) OR CPO OR (Chief People Officer) OR CHRO OR (Chief Human Resources Officer) OR (Vice President Human Resources)",
29 "default_field": "member_experience_collection.title",
30 "default_operator": "and"
31 }
32 }
33 ]
34 }
35 },
36 {
37 "query_string": {
38 "query": "IT Company",
39 "default_field": "member_experience_collection.company_url_shorthand_name",
40 "default_operator": "and"
41 }
42 },
43 {
44 "query_string": {
45 "query": 1000,
46 "default_field": "member_experience_collection.date_to",
47 "default_operator": "and"
48 }
49 },
50 {
51 "match": {
52 "member_experience_collection.deleted": {
53 "query": "0"
54 }
55 }
56 },
57 {
58 "range": {
59 "member_experience_collection.date_from": {
60 "gte": "1001"
61 }
62 }
63 }
64 ]
65 }
66 }
67 }
68 }
69 ]
70 }
71 }
72}'
Tenth example
1curl -X 'POST' \
2'https://api.coresignal.com/cdapi/v1/professional_network/employee/search/es_dsl?version=1' \
3 -H 'accept: application/json' \
4 -H 'Authorization: Bearer {JWT}' \
5 -H 'Content-Type: application/json' \
6 -d '{
7"query": {
8 "bool": {
9 "must": [
10 {
11 "match": {
12 "name": {
13 "query": "John Doe",
14 "operator": "and"
15 }
16 }
17 },
18 {
19 "match": {
20 "location": {
21 "query": "United Kingdom",
22 "operator": "and"
23 }
24 }
25 },
26 {
27 "nested": {
28 "path": "member_experience_collection",
29 "query": {
30 "bool": {
31 "must": [
32 {
33 "query_string": {
34 "query": "IT Company",
35 "default_field": "member_experience_collection.company_name",
36 "default_operator": "and"
37 }
38 },
39 {
40 "query_string": {
41 "query": 0,
42 "default_field": "member_experience_collection.deleted",
43 "default_operator": "and"
44 }
45 },
46 {
47 "range": {
48 "member_experience_collection.date_from": {
49 "gte": "August 2018"
50 }
51 }
52 },
53 {
54 "range": {
55 "member_experience_collection.date_to": {
56 "lte": "December 2021"
57 }
58 }
59 }
60 ]
61 }
62 }
63 }
64 }
65 ]
66 }
67 }
68}'