> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalayer.so/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

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.


## OpenAPI

````yaml POST /v1/lists/build
openapi: 3.1.0
info:
  title: Datalayer API
  version: '2026-10-19'
  description: >-
    People and Company intelligence. New accounts receive 100 one-time trial
    credits for 14 days, no card or automatic refill. The published plan for new
    signups is USD 49/month for 1,500 shared credits with monthly expiry and no
    rollover. USD 39 manual packs buy 1,000 credits valid for 12 months,
    available to active paid subscribers. An earlier purchase keeps the
    allowance, rates and expiry recorded for that purchase. On the published
    plan, a company or people search with results costs 1 credit, and an empty
    or failed search costs zero. get_account_details and saved viewing cost
    zero. Delivered company/person profiles with requested available context
    cost one credit. A verified work email costs 2 credits, including
    verification; standalone discovery has no implicit profile charge.
    Unverified employer-associated business candidates are explicitly labelled,
    retain independent assessment and catch-all evidence, and cost zero email
    credits. Conclusive valid OR invalid standalone email checks cost one;
    catch-all/unknown/unavailable cost zero. find_job_postings costs 1 credit
    when a successful page returns at least one posting, and zero for an empty
    page or a failure. That rate does not change any other rate. get_tech_stack
    costs 1 credit when the returned page lists at least one technology, and
    zero when that page is empty or the call fails. The same domain, after a
    leading www. is removed, repeats free for 24 hours. find_sites_using_tech
    costs 1 credit when a page returns at least one site, and zero when that
    page is empty or the call fails. The identical slug, limit and offset repeat
    free for 24 hours. list_technologies costs zero and returns one cached
    directory page. These rates do not change any other rate.
    get_company_profile does not include a technology summary. Eligible
    purchased-result repeats and added profile context cost zero for 24 hours
    from the paid anchor. Former profile quantities are the same number of
    credits. REST and MCP use the same authoritative account ledger. List filter
    lookup and preview cost zero credits and do not return billable record IDs.
    build_list reserves 1 credit per 100 requested IDs, rounded up, at most
    10000 IDs, and settles on the IDs returned. Empty or failed lists release
    the reservation. Full profile enrichment stays at the existing profile
    price. Funding, mobile/app data and monitoring are excluded.
servers:
  - url: https://api.datalayer.so
    description: Production API
security:
  - bearerAuth: []
paths:
  /v1/lists/build:
    post:
      summary: build list
      description: >-
        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.
      operationId: build_list
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/export_segmentInput'
      responses:
        '200':
          description: A settled result or a maximum estimate with no data lookup.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - data
                      - meta
                    properties:
                      data:
                        $ref: '#/components/schemas/export_segmentData'
                      meta:
                        type: object
                        required:
                          - retrieved_at
                          - billing_status
                          - profiles_used
                        properties:
                          request_id:
                            type: string
                          contract_version:
                            const: '2026-10-19'
                          credit_version:
                            type: string
                            enum:
                              - datalayer_credits_v1
                              - datalayer_credits_v2
                          retrieved_at:
                            type: string
                            format: date-time
                          upstream_requests:
                            type: integer
                            minimum: 0
                            maximum: 8
                            deprecated: true
                            description: >-
                              Deprecated. Read lookup_requests. The count is the
                              same.
                          lookup_requests:
                            type: integer
                            minimum: 0
                            maximum: 8
                            description: >-
                              Lookup calls for this response. Prefer this field.
                              It matches upstream_requests. Zero on replay.
                          billing_status:
                            type: string
                            enum:
                              - credits_settled
                              - estimate_included
                              - search_included
                              - profile_deducted
                              - repeat_included
                              - idempotent_replay
                              - credits_reserved
                              - export_pending
                              - segment_included
                              - export_failed
                          credits_used:
                            type: integer
                            minimum: 0
                            maximum: 100
                            description: >-
                              Credits newly deducted by this invocation. Zero on
                              replay. Not the remaining balance.
                          profiles_used:
                            type: integer
                            minimum: 0
                            maximum: 1
                            deprecated: true
                            description: >-
                              Deprecated. Credit responses report credits_used
                              and set this to 0. Older clients may still read
                              it.
                          receipt:
                            $ref: '#/components/schemas/CreditReceipt'
                          replayed:
                            type: boolean
                        additionalProperties: false
                    additionalProperties: false
                  - type: object
                    required:
                      - data
                      - meta
                    properties:
                      data:
                        $ref: '#/components/schemas/CreditEstimate'
                      meta:
                        type: object
                        required:
                          - retrieved_at
                          - billing_status
                          - profiles_used
                        properties:
                          request_id:
                            type: string
                          contract_version:
                            const: '2026-10-19'
                          credit_version:
                            type: string
                            enum:
                              - datalayer_credits_v1
                              - datalayer_credits_v2
                          retrieved_at:
                            type: string
                            format: date-time
                          upstream_requests:
                            type: integer
                            minimum: 0
                            maximum: 8
                            deprecated: true
                            description: >-
                              Deprecated. Read lookup_requests. The count is the
                              same.
                          lookup_requests:
                            type: integer
                            minimum: 0
                            maximum: 8
                            description: >-
                              Lookup calls for this response. Prefer this field.
                              It matches upstream_requests. Zero on replay.
                          billing_status:
                            type: string
                            enum:
                              - credits_settled
                              - estimate_included
                              - search_included
                              - profile_deducted
                              - repeat_included
                              - idempotent_replay
                              - credits_reserved
                              - export_pending
                              - segment_included
                              - export_failed
                          credits_used:
                            type: integer
                            minimum: 0
                            maximum: 100
                            description: >-
                              Credits newly deducted by this invocation. Zero on
                              replay. Not the remaining balance.
                          profiles_used:
                            type: integer
                            minimum: 0
                            maximum: 1
                            deprecated: true
                            description: >-
                              Deprecated. Credit responses report credits_used
                              and set this to 0. Older clients may still read
                              it.
                          receipt:
                            $ref: '#/components/schemas/CreditReceipt'
                          replayed:
                            type: boolean
                        additionalProperties: false
                    additionalProperties: false
        '400':
          description: Invalid input or idempotency key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized, disconnected or revoked credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: No active allowance, credit budget or available credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No matching identity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Ambiguous/mismatched identity, changed/expired key or request in
            progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request exceeds 16KB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Account rate limit: 60/minute'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Lookup or normalized contract failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Unavailable, cancelled or settlement interrupted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: Lookup or search timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        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.
      schema:
        type: string
        pattern: ^[A-Za-z0-9_-]{1,128}$
        minLength: 1
        maxLength: 128
  schemas:
    export_segmentInput:
      type: object
      properties:
        entity:
          type: string
          enum:
            - person
            - company
        query:
          type: string
        max_records:
          type: integer
          minimum: 1
          maximum: 10000
        max_credits:
          description: >-
            Advanced: highest number of credits this list may reserve, from 0 to
            100. The call is refused before any lookup when the reservation
            would be higher.
          type: integer
          minimum: 0
          maximum: 100
        dry_run:
          description: >-
            Advanced: return the maximum credit estimate without looking up
            data.
          type: boolean
      required:
        - entity
        - query
        - max_records
      additionalProperties: false
    export_segmentData:
      type: object
      properties:
        export_id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        entity:
          type: string
          enum:
            - person
            - company
        status:
          type: string
          enum:
            - pending
            - ready
            - empty
            - failed
        max_records:
          type: integer
          minimum: 1
          maximum: 10000
        reserved_credits:
          type: integer
          minimum: 0
          maximum: 100
        returned_count:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 10000
            - type: 'null'
        additional_matches:
          type: boolean
        failure_code:
          anyOf:
            - type: string
              enum:
                - provider_rejected
                - export_unavailable
                - reservation_expired
                - allowance_unavailable
                - invalid_export
            - type: 'null'
          deprecated: true
          description: >-
            Deprecated. Read failure. provider_rejected is lookup_rejected.
            Other codes are unchanged.
        failure:
          description: >-
            List failure. lookup_rejected is the same outcome as failure_code
            provider_rejected. Other codes match failure_code.
          anyOf:
            - type: string
              enum:
                - lookup_rejected
                - export_unavailable
                - reservation_expired
                - allowance_unavailable
                - invalid_export
            - type: 'null'
      required:
        - export_id
        - entity
        - status
        - max_records
        - reserved_credits
        - returned_count
        - additional_matches
        - failure_code
      additionalProperties: false
    CreditReceipt:
      type: object
      properties:
        version:
          type: string
          enum:
            - datalayer_credits_v1
            - datalayer_credits_v2
        request_id:
          type: string
          minLength: 1
          maxLength: 128
        reserved:
          type: integer
          minimum: 0
          maximum: 100
        settled:
          type: integer
          minimum: 0
          maximum: 100
        released:
          type: integer
          minimum: 0
          maximum: 100
        items:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              kind:
                type: string
                enum:
                  - company
                  - person
                  - work_email
                  - validation
                  - jobs_search
                  - tech_stack
                  - tech_sites
                  - segment_export
                  - company_search
                  - people_search
              reference:
                type: string
                maxLength: 254
              credits:
                anyOf:
                  - type: number
                    const: 0
                  - type: number
                    const: 1
                  - type: number
                    const: 2
              repeat:
                type: boolean
            required:
              - kind
              - reference
              - credits
              - repeat
            additionalProperties: false
      required:
        - version
        - request_id
        - reserved
        - settled
        - released
        - items
      additionalProperties: false
    CreditEstimate:
      type: object
      properties:
        contract_version:
          type: string
          const: '2026-10-19'
        credit_version:
          type: string
          enum:
            - datalayer_credits_v1
            - datalayer_credits_v2
        maximum_credits:
          type: integer
          minimum: 0
          maximum: 100
        minimum_credits:
          type: number
          const: 0
        provider_calls:
          type: number
          const: 0
          deprecated: true
          description: Deprecated. Read lookup_calls. The value is the same.
        lookup_calls:
          description: >-
            Lookup calls in this estimate. Prefer this field. It matches
            provider_calls and is 0 because an estimate makes no lookup.
          type: number
          const: 0
        repeat_window_hours:
          type: number
          const: 24
        note:
          type: string
      required:
        - contract_version
        - credit_version
        - maximum_credits
        - minimum_credits
        - provider_calls
        - repeat_window_hours
        - note
      additionalProperties: false
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
          additionalProperties: false
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Datalayer API key
      description: >-
        Send Authorization: Bearer dl_live_<64 lowercase hexadecimal
        characters>. Signed-in users can create account-scoped, revocable keys
        in the Datalayer dashboard. A key does not grant credits. Dashboard
        session cookies are not API credentials.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.