How to get form submissions by date and/or filtered by a field value

Hello,

I would like to know if it is possible, via the API, to get forms submissions (for a specific form) filtered by date or by field value.

In my case I have to retrieve the number of submissions of a form by country (with a country field in the form) monthly.
Example : Get the number of submissions on the form with ID “xxx-xxx-xxx” where the submissions were created on january 2021 (from january 1st to 31) and where the country field of each submission is “France”

The only option I found for now is to use this method : Accounts Dashboard | HubSpot
I’ll have to parse every submission to check country field value, this is not a problem, but I would like to know if there is any possiblity to filter on the field value during the request.

And for the date, I read that submissions are returned in reverse chronological order. It’s okay to retrieve data from 1 or 2 months ago, but if I need to get data from older months, it’ll be a bit difficult and weird. I’ll have to parse every submission, check the “submittedAt” value until I reach the needed date. Is there a parameter or another API call that can help me get the data I need ?

I also looked at analytics data ( Accounts Dashboard | HubSpot ). With this method, I have the date filter and it directly return the number of submissions, which is what I need in the end. But I can’t see any possibility to pass parameters to filter on submissions field value. And I think this method is not available for professional license, when I tried, I got a 403 error, but I can’t find on the API documentation what methods are restricted by license/account type.

Why does the “submissions/forms” method can’t accept a date parameter while the “reports/:object_type” the method can ?

Thanks in advance for your help,
Valentin - Concept Image

Hey @ConceptImage

Are you still messing around with this?

I am going to have to default to the sage advice that @tjoyce can hopefully offer.

@ConceptImage - I tried some of the usually flags like ‘orderBy=-submittedAt’ with no luck. I don’t think it’s possible.

Your best bet might be to save some of the data to a local database where you can do better reporting with say mySQL or postgres