# Best practice for extracting data

**URL:** <https://community.hubspot.com/t/best-practice-for-extracting-data/98622>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [January 25, 2024, 9:57am UTC](https://community.hubspot.com/t/best-practice-for-extracting-data/98622 "2024-01-25T09:57:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 31, 2024, 9:59pm UTC](https://community.hubspot.com/t/best-practice-for-extracting-data/98622/6 "2024-01-31T21:59:26Z")

</div>

Hey, @nmfoss 👋 Thanks for your question.

In general, the batch endpoint `/crm/v3/objects/deals/batch/read` is an alternative to the “Get by ID” endpoints rather than a direct substitute for “Get all” endpoints.

The primary use of batch endpoints is to efficiently retrieve specific records by their IDs in a single request. This is useful when you already know the IDs of the deals you wish to extract.

Your approach of iterating over the paginated results of the /crm/v3/objects/deals endpoint is the optimal approach, as it does not require you to pre-fetch IDs and can effectively extract all deals data.

Have fun building! — Jaycee

---

_[View the full topic](https://community.hubspot.com/t/best-practice-for-extracting-data/98622)._
