# request url too long

**URL:** <https://community.hubspot.com/t/request-url-too-long/24847>\
**Category:** APIs & Integrations\
**Tags:** companies, object, contacts\
**Created:** [September 1, 2020, 10:49am UTC](https://community.hubspot.com/t/request-url-too-long/24847 "2020-09-01T10:49:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jing](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jing/32/13521_2.png) [@jing](https://community.hubspot.com/u/jing)\
**Post date:** [September 1, 2020, 10:49am UTC](https://community.hubspot.com/t/request-url-too-long/24847/1 "2020-09-01T10:49:24Z")

</div>

When I am getting data from hubspot api, for example: [https://api.hubapi.com/crm/v3/objects/companies](https://api.hubapi.com/crm/v3/objects/companies). If I include all properties, an error would occur saying the ‘request url too long’. Is there any parameters that can select all properties automatically instead of passing wanted properties in request url?

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [September 2, 2020, 6:38am UTC](https://community.hubspot.com/t/request-url-too-long/24847/2 "2020-09-02T06:38:50Z")

</div>

Hey @jing,

Currently, there isn’t a way to select all properties automatically and one possible way to include all properties without exceeding the request url limit, is to use the [CRM API | Search](https://developers.hubspot.com/docs/api/crm/search).

In which you can control the returned properties on the POST body instead of the request url:

```lia-code-sample
curl https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=YOUR_HUBSPOT_API_KEY \
 --request POST \
 --header "Content-Type: application/json" \
 --data '{
 "properties": ["email", "state"]
 }'

```

---

<div class="post-metadata">

**Author:** ![jing](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jing/32/13521_2.png) [@jing](https://community.hubspot.com/u/jing)\
**Post date:** [September 2, 2020, 10:33am UTC](https://community.hubspot.com/t/request-url-too-long/24847/3 "2020-09-02T10:33:59Z")

</div>

Thank you so much! That is exactly what I want.
