Discussions

Ask a Question
Back to all

What's the most reliable way to retreive recent form responses?

I've been trying to pull the most recently submitted form responses via the API and haven't found a reliable method yet.

What I've tried:

Assumed results were pre-sorted desc by submission date. Mostly true, but I found stale/old submissions showing up on page 2 of 18, so this isn't safe to rely on.


v1's modified_since param exists but doesn't quite fit this use case.


The Manage Responses page in the browser sends sort_data[field]=submitted&sort_data[direction]=DESC in its dev tools network tab, but that param doesn't do anything when called externally.


I also tried a handful of common sort conventions from other APIs, none had any effect:

sort=created&order=desc
sort=-created
order_by=created&direction=desc

Right now my workaround is paginating through and doing date comparison logic client-side to find the newest responses, which works but adds unnecessary overhead and API calls. This would be trivial to solve if a sort/order param (or something equivalent to what the internal UI already uses) were exposed on the public endpoint.

An alternate idea I've been considering

Instead of relying on the responses endpoint at all, I've thought about restructuring the automation around groups: have the form dump new submitters into a group, query that group's members, query each member's individual form submissions, then remove them from the group once processed. It would work as a "queue" of sorts, but it is roughly 4x's the number of API calls needed compared to just being able to sort responses directly, so it's not ideal.

Has anyone found an actual solution to the sorting problem?