Best Practices

Best Practices

  • Pagination: Many endpoints support pagination with page and perPage.
    • Note the maximum perPage is 50.
  • Filtering & Sorting: Use parameters such as sortBy and sortOrder where allowed (e.g., companyRevenue ascending). Check each endpoint’s documentation for the permissible fields to sort on.
  • Partial Data: Certain endpoints can accept query parameters like fields=familytree, competitors to return specialized data in one request.
  • Error Handling: Always handle the 4xx error cases.
    • Check your request parameters carefully if you see 400 or 404.
    • Check your JWT token if you see a 401
    • Check your API Key permissions if you see 403
  • Performance: If your result sets are large, rely on smaller perPage sizes and iterate over pages.