Search Deals based on Deal Status

Is there a way to search or filter deals based on the calculated property of Deal Status using API. I’m trying to retrieve deals with Open status and there seems to be no direct way to do this using API.

The alternative approach seems to be to create a FilterGroup with filter conditions for all the Open stages in the pipeline. But there already is a restriction on the total number of filter groups and in some cases this is option is not possible

Any suggestions?

Hey @SR36,

You can use the CRM Search API to do this. See an example of how I request any deals in a specific stage below:

Thanks @coldrickjack for this answer. In the example show you are filtering on deal stage. I was wondering if we could filter on deal status (this is a calculated property) - HubSpot's default deal properties (Please look for the section Deals Calculated Information)

It would be much convenient if there was a filter for Open deals, Closed deals etc. But I could not find if the property is available via API

Ah ok, so unfortunatley in that case no, as those properties are only surfaced within the report tool. They’re not accessible via the API. I’m not sure why to be honest with you.

Not a pretty solution, but you could create a custom property and use workflows to set it to “Closed”, “Open” or “Lost” depending on the stage a deal is in and then use the Search API to query using that.