build list
curl --request POST \
--url https://api.datalayer.so/v1/lists/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"max_records": 5000,
"max_credits": 50,
"dry_run": true
}
'import requests
url = "https://api.datalayer.so/v1/lists/build"
payload = {
"query": "<string>",
"max_records": 5000,
"max_credits": 50,
"dry_run": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', max_records: 5000, max_credits: 50, dry_run: true})
};
fetch('https://api.datalayer.so/v1/lists/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"export_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity": "person",
"status": "pending",
"max_records": 5000,
"reserved_credits": 50,
"returned_count": 5000,
"additional_matches": true,
"failure_code": "provider_rejected",
"failure": "lookup_rejected"
},
"meta": {
"retrieved_at": "2023-11-07T05:31:56Z",
"billing_status": "credits_settled",
"profiles_used": 0,
"request_id": "<string>",
"contract_version": "2026-10-19",
"credit_version": "datalayer_credits_v1",
"upstream_requests": 4,
"lookup_requests": 4,
"credits_used": 50,
"receipt": {
"version": "datalayer_credits_v1",
"request_id": "<string>",
"reserved": 50,
"settled": 50,
"released": 50,
"items": [
{
"kind": "company",
"reference": "<string>",
"credits": 0,
"repeat": true
}
]
},
"replayed": true
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Companies
Build a list
Start a list of person or company IDs for max_records from 1 to 10000. Reserves 1 credit per 100 requested IDs, rounded up, and settles on the IDs returned. Empty and failed lists release the reservation. The job token is not returned.
build list
curl --request POST \
--url https://api.datalayer.so/v1/lists/build \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"max_records": 5000,
"max_credits": 50,
"dry_run": true
}
'import requests
url = "https://api.datalayer.so/v1/lists/build"
payload = {
"query": "<string>",
"max_records": 5000,
"max_credits": 50,
"dry_run": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', max_records: 5000, max_credits: 50, dry_run: true})
};
fetch('https://api.datalayer.so/v1/lists/build', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"export_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity": "person",
"status": "pending",
"max_records": 5000,
"reserved_credits": 50,
"returned_count": 5000,
"additional_matches": true,
"failure_code": "provider_rejected",
"failure": "lookup_rejected"
},
"meta": {
"retrieved_at": "2023-11-07T05:31:56Z",
"billing_status": "credits_settled",
"profiles_used": 0,
"request_id": "<string>",
"contract_version": "2026-10-19",
"credit_version": "datalayer_credits_v1",
"upstream_requests": 4,
"lookup_requests": 4,
"credits_used": 50,
"receipt": {
"version": "datalayer_credits_v1",
"request_id": "<string>",
"reserved": 50,
"settled": 50,
"released": 50,
"items": [
{
"kind": "company",
"reference": "<string>",
"credits": 0,
"repeat": true
}
]
},
"replayed": true
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}The assistant tool is
build_list. Start an asynchronous export of person or company IDs for a feature-ID
expression. max_records is required and must be from 1 to 10,000. The
indexed export prepares up to 10,000 IDs; Datalayer returns at most max_records.
The call reserves 1 credit per 100 requested IDs, rounded up, before the
lookup. Settlement charges 1 credit per 100 IDs actually returned,
rounded up, and releases the rest. An empty or failed export releases the
reservation. max_credits from 0 to 100 rejects the call before the lookup
when the reservation would exceed it.
The response contains export_id and no record IDs. Poll
get_list_results with that ID. The job token is not returned. The
same Idempotency-Key replays this start. An identical export with a new key
reserves again. Full profile enrichment is a separate charge at the existing
profile price.
dry_run estimates the reservation and does not require an active allowance.
A real export does.Authorizations
Headers
Recommended for every paid operation. Account-scoped and bound to normalized operation/input. Retry exactly the same key after transport loss: a committed credit result is replayed from persisted normalized bytes without a data lookup or another debit. Changed input, key expiry or paid-anchor expiry returns 409. In-flight requests return request_in_progress. Network delivery and D1 commit are not atomic. If omitted a request ID is created.
Required string length:
1 - 128Pattern:
^[A-Za-z0-9_-]{1,128}$Body
application/json