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
or I can use the type id 0-2
https://api.hubapi.com/crm/v3/objects/0-2/search
from the list Understanding the CRM APIs - HubSpot docs
Which is the best option?
Is there a difference in performance?
Thanks
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 on the community.
Stay Awesome & Keep Doing it BIG 
Thanks
I tried the statements in Postman and there was no big difference, thats why I asked here.
Best regards
Bernhard