# CRM API: Object type IDs vs. Object type name

**URL:** <https://community.hubspot.com/t/crm-api-object-type-ids-vs-object-type-name/117103>\
**Category:** APIs & Integrations\
**Tags:** companies, crm, best-practices, contacts, how-to\
**Created:** [September 26, 2024, 6:26am UTC](https://community.hubspot.com/t/crm-api-object-type-ids-vs-object-type-name/117103 "2024-09-26T06:26:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![baernhardj](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/baernhardj/32/72679_2.png) [@baernhardj](https://community.hubspot.com/u/baernhardj)\
**Post date:** [September 26, 2024, 6:26am UTC](https://community.hubspot.com/t/crm-api-object-type-ids-vs-object-type-name/117103/1 "2024-09-26T06:26:02Z")

</div>

Hi

My question applies for HubSpot defined objects like companies, contacts and more, and not for custom objects.

For custom objects I know the type id is the best way (naming conflicts to future HubSpot Types).

Now to the question:

To search companies over the API, I can use the url with the type name companies:

[https://api.hubapi.com/crm/v3/objects/companies/search](https://api.hubapi.com/crm/v3/objects/companies/search)

or I can use the type id 0-2

[https://api.hubapi.com/crm/v3/objects/0-2/search](https://api.hubapi.com/crm/v3/objects/0-2/search)

from the list [Understanding the CRM APIs - HubSpot docs](https://developers.hubspot.com/docs/api/crm/understanding-the-crm#object-type-ids)

Which is the best option?

Is there a difference in performance?

Thanks

---

<div class="post-metadata">

**Author:** ![Shadab\_Khan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shadab_khan/32/12293_2.png) [@Shadab\_Khan](https://community.hubspot.com/u/Shadab_Khan)\
**Post date:** [September 26, 2024, 9:00am UTC](https://community.hubspot.com/t/crm-api-object-type-ids-vs-object-type-name/117103/2 "2024-09-26T09:00:44Z")

</div>

Hi @baernhardj ,

When deciding between using object type names (like `companies`) or object type IDs (like `0-2`), there are a few things to keep in mind:

- **Object Type IDs** are usually faster because they’re more direct, reducing the need for system interpretation.
- **Object Names** can still work well, but may add a small overhead as the system has to resolve the name.

The performance difference may not be huge unless you’re working with a large dataset or complex API calls, but it’s always a good idea to test things out:

- **Recommendation** :
  - Set up a small test using both methods (object name and type ID) and compare the results.
  - This will give you real data on which approach works best for your specific use case.

Lastly, it might help to get more input by sharing this in the **HubSpot Developer Slack** or the [**Developer group**](https://community.hubspot.com/t5/HubSpot-Developers/ct-p/developers) on the community.

Stay Awesome & Keep Doing it BIG 🔥

---

<div class="post-metadata">

**Author:** ![baernhardj](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/baernhardj/32/72679_2.png) [@baernhardj](https://community.hubspot.com/u/baernhardj)\
**Post date:** [September 26, 2024, 11:58am UTC](https://community.hubspot.com/t/crm-api-object-type-ids-vs-object-type-name/117103/3 "2024-09-26T11:58:55Z")

</div>

Thanks

I tried the statements in Postman and there was no big difference, thats why I asked here.

Best regards

Bernhard
