Getting a count of the number of times a form has been submitted via the API?

When I view my forms in the console, there is a field that tells me how many times a page has been viewed and how many times that form has been submitted.

This data does not appear to exist in the documentation when it comes to querying the forms API.

Is there any way to get this data programatically via the Python client?

Hey @proffalken,

You can pull this data by using this endpoint. It’s part of the “Reporting APIs”. It looks like v3 aren’t ready yet so it redirects to the older v2 endpoint. When making a request you can get all forms or specify the GUID of the form. It returns a “totals” object in the response with “submissions” property.

"totals": {
 "formViews": 26,
 "clickThroughPerFormView": 1.0,
 "submissionsPerFormView": 0.46153846153846156,
 "submissions": 12,
 "submissionsPerClickThrough": 0.46153846153846156,
 "visibles": 26,
 "nonContactSubmissions": 2,
 "contactSubmissions": 10,
 "interactions": 5
}

Hope this helps!

Thanks - I assume I’d need to use requests or similar to access that endpoint rather than the python client?

I’d imagine so but truthfully I’m more experienced with the Node client. I know that has a way of using the client for any unwrapped endpoints (below) but I don’t believe the same exists with the Python client (that I can tell)

hubspotClient.apiRequest({
 method: 'PUT',
 path: '/some/api/not/wrapped/yet',
 body: { key: 'value' },
})

ok, thanks, I’ll give it a go!