# Read all data from Custom Object

**URL:** <https://community.hubspot.com/t/read-all-data-from-custom-object/43738>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [September 13, 2021, 5:28pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738 "2021-09-13T17:28:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shlahman](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shlahman/32/68963_2.png) [@shlahman](https://community.hubspot.com/u/shlahman)\
**Post date:** [September 13, 2021, 5:28pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/1 "2021-09-13T17:28:22Z")

</div>

Hello,

Anyone can please advise how can I use the API in order to read all data from a Custom Object?

Thanks

Ariel

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [September 13, 2021, 5:39pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/2 "2021-09-13T17:39:32Z")

</div>

Hi!  
What do you want to read? Do you need the name and ID? The association’s between your custom object and other objects or simply all records the custom object has?  
If you check the docs, you can find all endpoints that you need. You also have a ‘run in postman’ option that imports a collection with great examples.

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fcrm-custom-objects-v3%2Fguide)**

---

<div class="post-metadata">

**Author:** ![shlahman](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shlahman/32/68963_2.png) [@shlahman](https://community.hubspot.com/u/shlahman)\
**Post date:** [September 13, 2021, 5:43pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/3 "2021-09-13T17:43:34Z")

</div>

Hi Teun,

Thanks for getting back to me so fast!

I would like to read the object data (not metadata) with all fields that avilabile in this object. Is there an option to read all the object data without providing specific ID?

Thanks,

Ariel

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [September 13, 2021, 5:55pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/4 "2021-09-13T17:55:40Z")

</div>

You always need the ID of the custom object you are retrieving, you do not need the record ID. If you need all properties the object has, you can retrieve its schema.  
I am having issues opening the docs right now, but there is an example available in the overview of the docs.

---

<div class="post-metadata">

**Author:** ![AOzkara](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AOzkara](https://community.hubspot.com/u/AOzkara)\
**Post date:** [July 25, 2022, 2:56pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/5 "2022-07-25T14:56:41Z")

</div>

hi,

I am facing same issue about reading all record data from custom object. I have custom object id and I dont neet its scheme. I need its records.

I couldnt find the righht endpoint for this issue.

Could you help me about it?

Thanks.

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 10, 2022, 11:58am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/6 "2022-10-10T11:58:04Z")

</div>

Hi Teun,

I am facing the same issue: the docs linked above only describe how to retrieve meta-data from a custom object. What I need — the others here, too — is the data itself hold by the custom object.  
Let’s think of HubDB: requesting HubDB delivers the _columns of a table_. But when I need the data hold by that table I have to _request its rows_.  
So, how do we get the data hold by a custom object?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 14, 2021, 12:33pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/7 "2021-09-14T12:33:07Z")

</div>

Hi @shlahman ,  
You can use this documentation regarding custom object for fetch all data :  
Link : [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/crm-custom-objects)  
This link will also help you regarding custom object  
Link : [Create Custom Objects in HubSpot using API with this easy Guide](https://www.webdew.com/blog/create-custom-objects-in-hubspot-using-api)  
\<?php  
$URL = ‘[https://api.hubapi.com/crm/v3/schemas/p\](https://api.hubapi.com/crm/v3/schemas/p%5C)\_\<CUSTOMOBJECTKEY\>?portalId=\<PORTALID\>’;  
$ch = curl\_init();  
curl\_setopt($ch, CURLOPT\_URL, $URL);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, 1);  
curl\_setopt($ch, CURLOPT\_CUSTOMREQUEST, ‘GET’);  
$headers = array();  
$headers[] = ‘Content-Type: application/json’;  
curl\_setopt($ch, CURLOPT\_HTTPHEADER, $headers);  
$result = curl\_exec($ch);  
if (curl\_errno($ch)) {  
echo ‘Error:’ . curl\_error($ch);  
}  
curl\_close($ch);  
return $result;  
?\>

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regard.

---

<div class="post-metadata">

**Author:** ![DTyshetskyy](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@DTyshetskyy](https://community.hubspot.com/u/DTyshetskyy)\
**Post date:** [September 18, 2022, 9:53pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/8 "2022-09-18T21:53:17Z")

</div>

Hi guys, any update on this?  
/crm/v3/schemas/{objectTypeId} mentioned in the doc, is only providing the schema for the object - metadata. Tried to run crm/v3/objects/{objectTypeId} - provides very basic info about the object with created\_time etc. - no actual data

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 11, 2022, 6:26am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/9 "2022-10-11T06:26:10Z")

</div>

Hi guys,

here is how I finally got my data:

1. Retrieve the schema of your custom object, i.e. /crm/v3/schemas/objectTypeId[,](https://api.hubapi.com/crm/v3/schemas/2-3465404,) there you find properties used by the data you want to get
2. Extract the name of each property and create a querystring for later use, like so “&properties=firstname&properties=lastname…”
3. Retrieve the object from /crm/v3/objects/objectTypeId, it holds the IDs of each data-set
4. Retrieve your data for each object-ID, like so: /crm/v3/objects/objectTypeId/objectId?portalId=1234567&properties=firstname&properties=lastname
5. Push each response.data in an array and use sendRequest to deliver it to your frontend

---

<div class="post-metadata">

**Author:** ![cowles123](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cowles123](https://community.hubspot.com/u/cowles123)\
**Post date:** [October 18, 2022, 8:45pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/10 "2022-10-18T20:45:01Z")

</div>

I believe I found the solution (they might have just added it).

You can find it within the object section of the custom object page ([Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/crm-custom-objects)).  
Go to _/crm/v3/objects/{objectType}_

Here you just need to add the custom object’s internal name or the custom object’s ID.

As some people have mentioned, they can only see metadata. To see additional data you need to specify the additional fields (internal name). See the picture below.

 ![Screen Shot 2022-10-18 at 1.39.52 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/4/14cb5b866a087afb308cf733987a0a1dedaf57b5.png)

 ![Screen Shot 2022-10-18 at 1.39.31 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/e/aee040ad54d70595116e3720d4d04e446120b605.png)

 ![Screen Shot 2022-10-18 at 1.39.10 PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/4/04ded79093739034fc4f103f336aa12819587c2a.jpeg)

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 28, 2022, 5:56am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/11 "2022-10-28T05:56:04Z")

</div>

Hey @cowles123 you are absolutely right. This is the right endpoint and one has to explicitly add all properties one wants to see. In the documentation one has to open “see all params” to find the properties param. Kind of weird …  
Thanks for your help. 😀

---

<div class="post-metadata">

**Author:** ![VStruyf](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VStruyf](https://community.hubspot.com/u/VStruyf)\
**Post date:** [October 31, 2022, 9:25am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/12 "2022-10-31T09:25:13Z")

</div>

I also want to find all the data for a custom object, but I get the following error:

The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.

I use the endpoint: /crm/v3/objects/{objectType}

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 31, 2022, 9:30am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/13 "2022-10-31T09:30:12Z")

</div>

Hi @VStruyf ,

seems you have to add either the scope to your private app key or you haven’t the key present in your serverless function.

---

<div class="post-metadata">

**Author:** ![VStruyf](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VStruyf](https://community.hubspot.com/u/VStruyf)\
**Post date:** [October 31, 2022, 9:32am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/14 "2022-10-31T09:32:41Z")

</div>

Which scope should be selected?

I also have the error when I try it here with the test call: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/crm-custom-objects)

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 31, 2022, 9:36am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/15 "2022-10-31T09:36:54Z")

</div>

You need at least these to request custom object:  
crm.schemas.custom.read, crm.objects.custom.read

---

<div class="post-metadata">

**Author:** ![VStruyf](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VStruyf](https://community.hubspot.com/u/VStruyf)\
**Post date:** [October 31, 2022, 9:38am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/16 "2022-10-31T09:38:50Z")

</div>

They are both selected.

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 31, 2022, 9:43am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/17 "2022-10-31T09:43:10Z")

</div>

So, if you need other than these two scopes, select then.  
Then update your secret, because the scope is encoded in that key.  
And make sure to process.env your key in your serverless function and provide it in headers.

---

<div class="post-metadata">

**Author:** ![VStruyf](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VStruyf](https://community.hubspot.com/u/VStruyf)\
**Post date:** [October 31, 2022, 9:55am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/18 "2022-10-31T09:55:17Z")

</div>

Still not working… and I don’t see why

---

<div class="post-metadata">

**Author:** ![mwx\_kk](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwx_kk/32/89900_2.png) [@mwx\_kk](https://community.hubspot.com/u/mwx_kk)\
**Post date:** [October 31, 2022, 10:42am UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/19 "2022-10-31T10:42:49Z")

</div>

Still the scope error message? Check all possible scopes you need, and then always update your secret.

---

<div class="post-metadata">

**Author:** ![VStruyf](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VStruyf](https://community.hubspot.com/u/VStruyf)\
**Post date:** [October 31, 2022, 12:20pm UTC](https://community.hubspot.com/t/read-all-data-from-custom-object/43738/20 "2022-10-31T12:20:35Z")

</div>

Yes, still the same. These are the scopes I selected:

crm.lists.read  
crm.objects.contacts.read  
crm.schemas.custom.read  
crm.objects.custom.read  
crm.schemas.custom.write  
crm.schemas.contacts.read

[Next page](https://community.hubspot.com/t/read-all-data-from-custom-object/43738.md?page=2)
