Company Data
...
Endpoints
Elasticsearch DSL
Pagination
12min
pagination information for the /v2/company base/search/es dsl endpoint shortcuts pagination using curl requests https //docs coresignal com/api/company api esdsl pagination#jotwr examples of pagination usage with curl requests overview why is pagination needed? profile ids are provided in batches of 1000 ids per page sometimes, a request might yield more ids than can be displayed on a single page in such situations, you'll need to use pagination to obtain all the requested ids from the post request where can i see the page count? response header infomation response headers contain information such as the total result count , page number , and the last id on the page response header information you need to look for example x next page after "2025 03 17 03 58 15",33468751 x total pages 71 x total results 70767 x next page after displays the last id on the page x total pages lists the total number of pages with id results x total results shows the total number of ids returned by your search using p agination in curl requests this tutorial requires prior knowledge of how to compile and execute post requests in base company api company post es dsl requests https //docs coresignal com/api/company api esdsl postman elasticsearch dsl endpoint use parameter x next page after to retrieve a second page of ids navigate to the headers section and click it 2\ find the following information x next page after x total pages x total results x next page after displays the last id on the page x total pages lists the total number of pages available for your search x total results shows the total number of ids available 3\ add parameter ?after={last id} to the post request to see the next results page 4\ execute the request, and you will see the next page in the body section \[ 1000, 1001, 3000, 4004 ] pagination using sorting sorting in elasticsearch dsl endpoint https //docs coresignal com/api/company api esdsl endpoint#dmanf pagination, when sorting by id, works the same way as pagination without sorting pagination usage example (curl request in postman) add parameter ?after={last id} to the post request refer to the example below for the exact parameter placement pagination (sorted by id) curl x 'post' \\ 'https //api coresignal com/cdapi/v2/company base/search/es dsl?after="2025 03 17 03 58 15",33468751' \\ h 'accept application/json' \\ h 'apikey {api key}' \\ h 'content type application/json' \\ d '{ "query" { "bool" { "must" \[ { "query string" { "query" "(3d printing) or (3d printing service) or (lead generation)", "default field" "description", "default operator" "and" } } ] } }, "sort" \[ "id" ] }' send the request, and you will see the next page in the (response) body pagination using score sorting has a different id format the format difference is seen by the x next page after parameter the number preceding the comma is for the score , and the one after the score is the last id on the page pagination usage example (curl request in postman) add parameter ?after={last id} to the post request to see the next results page refer to the example below for the exact parameter placement pagination (sorted by score) curl x 'post' \\ 'https //api coresignal com/cdapi/v2/company base/search/es dsl?after=28 772884,"2025 03 09 21 49 52",89757124' \\ h 'accept application/json' \\ h 'apikey {api key}' \\ h 'content type application/json' \\ d '{ "query" { "bool" { "must" \[ { "query string" { "query" "(3d printing) or (3d printing service) or (lead generation)", "default field" "description", "default operator" "and" } } ] } }, "sort" \[ " score" ] }' send the request, and you will see the next page in the (response) body limiting search results per page query parameter ?items per page={int} allows you to specify the number of results retrieved per search results page the current limit is 1,000 thus, this parameter lets you set a smaller limit value for the results page items per page curl x 'post' \\ 'https //api coresignal com/cdapi/v2/company base/search/es dsl?items per page=100' \\ h 'accept application/json' \\ h 'apikey {api key}' \\ h 'content type application/json' \\ d '{ "query" { "bool" { "must" \[ { "query string" { "query" "(3d printing) or (3d printing service) or (lead generation)", "default field" "description", "default operator" "and" } } ] } } }'