Getting Started

Pagination

Learn about how to use pagination in the LeadX API.

Some LeadX API endpoints return large result sets. To keep responses fast and manageable, pagination is included on certain endpoints.

Currently, pagination is available on:

  • POST /v1/companies

  • POST /v1/ucc/debtor

  • POST /v1/ucc/secured_party

How Pagination Works

The LeadX API uses offset-based pagination with two parameters:

  • page: The page number to retrieve (default: 1)

  • per_page: The number of records per page (default: 50, max: 50)

Each paginated response includes the following metadata so you can iterate through results:

  • page_number: The current page number

  • per_page: The number of records returned per page

  • total_pages: The total number of available pages

  • total_records: The total number of matching records

The API returns pagination metadata even when no records match. In that case, records is empty, total_pages is 0, and total_records is 0.

Unless an endpoint documents an explicit sort option, do not assume that results have a stable order across requests. Use record identifiers instead of a record's position when processing multiple pages.

curl -X POST "https://api.leadx.com/v1/ucc/debtor" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.example.com",
    "page": 1,
    "per_page": 50
  }'

The above example returns the below response:

{
  "success": true,
  "records": [
    {
      "address": "123 Main St, Austin, TX 78701",
      ... # more fields
    },
    {
      "address": "456 Market St, Philadelphia, PA 19106",
      ... # more fields
    },
    ...
  ],
  "page_number": 1,
  "per_page": 50,
  "total_pages": 42,
  "total_records": 4165
}

Notes

  • If page exceeds total_pages, the records array will be empty.

  • per_page values outside the 1–50 range will be rejected and result in a 422 validation error.

  • Pagination is limited to the endpoints listed above, but may be added to additional endpoints in the future.