# Filter API Request by timestamp

**URL:** <https://community.hubspot.com/t/filter-api-request-by-timestamp/45698>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [October 21, 2021, 9:15am UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698 "2021-10-21T09:15:19Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![HOrdonez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hordonez/32/78607_2.png) [@HOrdonez](https://community.hubspot.com/u/HOrdonez)\
**Post date:** [October 21, 2021, 9:15am UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/1 "2021-10-21T09:15:19Z")

</div>

Dear all,

I would like to ask if there is any way to add a timestamp (or date) in order to filter the results for an API request.

What I have beeen doing for now is getting all the data and filter by myself later on, but this solution is not scalable and I don’t want to collapse the API limit.

For example, if I want to get feedback submissions (in python), right now I’m doing:

`client.crm.objects.feedback_submissions.basic_api.get_page()`

Is there any way to add a time range, a `from` or a `to` in the request?

I would like to ask if there is any way to get the list of properties that I can add to the request.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 22, 2021, 2:51pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/2 "2021-10-22T14:51:26Z")

</div>

@HOrdonez ,

You should explore the [search endpoints](https://developers.hubspot.com/docs/api/crm/search). You can use a filter group with a from and to range

---

<div class="post-metadata">

**Author:** ![HOrdonez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hordonez/32/78607_2.png) [@HOrdonez](https://community.hubspot.com/u/HOrdonez)\
**Post date:** [October 26, 2021, 12:28pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/3 "2021-10-26T12:28:28Z")

</div>

Thank you for your answer @dennisedson . I cannot find which Object Type is associated with _ **feedback\_submissions** _ or if it’s available the _ **search** _ option for it.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 27, 2021, 6:11pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/4 "2021-10-27T18:11:52Z")

</div>

@HOrdonez

Feedback submissions is an Object.

You can see details on the endpoints, including search [here](https://developers.hubspot.com/docs/api/crm/feedback-submissions)

---

<div class="post-metadata">

**Author:** ![HOrdonez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hordonez/32/78607_2.png) [@HOrdonez](https://community.hubspot.com/u/HOrdonez)\
**Post date:** [October 28, 2021, 2:16pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/5 "2021-10-28T14:16:35Z")

</div>

Thank you @dennisedson. I see that Feedback Submission has a search endpoint in the documentation that you sent, but is not in the other one.

The Python proposed implementation is not updated.

This is the one you provide:

`client.crm.feedback_submissions.search_api.do_search(public_object_search_request=public_object_search_request)`

This is the one I think it should be:

`client.crm.objects.feedback_submissions.search_api.do_search( public_object_search_request=public_object_search_request)`

I would like to ask as well, if I want to filter the feedback submitted after yesterday using `hs_lastmodifieddate`, I declare the following object:

`public_object_search_request = PublicObjectSearchRequest(filter_groups=[{"filters":[{"value":"2021-10-27","propertyName":"hs_lastmodifieddate","operator":"GT"}]}], properties=["hs_lastmodifieddate"], limit=0, after=0)`

But I’m getting that exception, so I may be doing something wrong:

`hubspot.crm.objects.feedback_submissions.exceptions.ApiException: (400)Reason: Bad RequestHTTP response headers: HTTPHeaderDict({'Date': 'Thu, 28 Oct 2021 13:14:26 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': '123', 'Connection': 'keep-alive', 'CF-Ray': 'X', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Vary': 'Accept-Encoding', 'CF-Cache-Status': 'DYNAMIC', 'Access-Control-Allow-Credentials': 'false', 'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'X-HubSpot-Correlation-Id': 'X', 'X-HubSpot-RateLimit-Daily': '500000', 'X-HubSpot-RateLimit-Daily-Remaining': 'X', 'X-Trace': 'X', 'Report-To': '{"endpoints":[{"url":"x"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}', 'Server': 'cloudflare', 'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400'})HTTP response body: {"status":"error","message":"There was a problem with the request.","correlationId":"x"}`

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 28, 2021, 2:47pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/6 "2021-10-28T14:47:57Z")

</div>

@HOrdonez .

I will check with the team on why this object is not in the search documentation.

Why do you think that implementation is incorrect. It appears consistent with the other objects’ python examples.

As for the error, try using a unix timestamp as your value.

---

<div class="post-metadata">

**Author:** ![HOrdonez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hordonez/32/78607_2.png) [@HOrdonez](https://community.hubspot.com/u/HOrdonez)\
**Post date:** [October 28, 2021, 3:05pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/7 "2021-10-28T15:05:08Z")

</div>

@dennisedson The CRM Discovery object has not feedback\_submission property, this one is inside object as I mentioned.

If I change the timestamp to unix timestamp, the API call doesn’t have a Bad Request, but it returns nothing. Even using unix\_timestamp as 10, the response is empty.

`public_object_search_request = PublicObjectSearchRequest(filter_groups=[{"filters":[{"value":"10","propertyName":"hs_lastmodifieddate","operator":"GT"}]}], properties=["hs_lastmodifieddate"], limit=0, after=0)`

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![HOrdonez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hordonez/32/78607_2.png) [@HOrdonez](https://community.hubspot.com/u/HOrdonez)\
**Post date:** [November 2, 2021, 2:25pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/8 "2021-11-02T14:25:29Z")

</div>

Hi @dennisedson , any update?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [November 4, 2021, 1:37pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/9 "2021-11-04T13:37:56Z")

</div>

@HOrdonez , make sure you are using milliseconds for the unix timestamp.

I tested with this request successfully:

```lia-code-sample
{
 "filterGroups": [
 {
 "filters": [
 {
 "value": "1635032689886",
 "propertyName": "hs_lastmodifieddate",
 "operator": "GT"
 }
 ]
 }
 ]
}

```

---

<div class="post-metadata">

**Author:** ![HOrdonez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hordonez/32/78607_2.png) [@HOrdonez](https://community.hubspot.com/u/HOrdonez)\
**Post date:** [November 15, 2021, 9:52am UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/10 "2021-11-15T09:52:10Z")

</div>

@dennisedson thank you for your answer, it worked.

I would like to ask if it’s possible to get the properties of Feedback from some API.

Even Feedback is an Object type in Hubspot. This doesn’t work.

`client.crm.properties.core_api.get_all(object_type='FEEDBACK', archived=False)`

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [November 16, 2021, 3:49pm UTC](https://community.hubspot.com/t/filter-api-request-by-timestamp/45698/11 "2021-11-16T15:49:40Z")

</div>

@HOrdonez , you should be able to hit the [properties endpoint](https://developers.hubspot.com/docs/api/crm/properties)

_**[https://api.hubapi.com/crm/v3/properties/feedback\_submissions](https://api.hubapi.com/crm/v3/properties/feedback_submissions)**_
