How to Structure Rollup Property Filters in Notion API Queries

I’m having trouble with the correct syntax for filtering rollup properties when querying a Notion database through the API. I need to filter based on a rollup that shows original values from a Select property, but my current approach keeps failing.

Here’s what I’ve been trying:

{
    "filter": {
        "property": "Priority",
        "rollup": {
            "any": {
                "select": {
                    "equals": "Important"
                }
            }
        }
    }
}

The rollup field I’m working with displays original values from a Select property in a related database. Can someone share the proper structure for this type of filter? I’ve checked the documentation but I’m still getting syntax errors.

Had the same issue building a project management system. Those syntax errors aren’t from your filter - it’s the rollup property config. Check that your rollup is set to “Show original” not “Show unique values” - this actually matters for API calls. Your JSON looks fine, but the property name has to match Notion’s internal name exactly, which isn’t always what you see in the interface. Hit the database schema endpoint first to grab the real property name and settings. If your rollup connects through multiple relations, you might need extra permissions or a different query structure depending on how nested everything is.

Your filter structure looks right. The problem’s probably that you need to be more specific with the rollup config. I hit this same issue with rollup filters - the API can be picky and wants you to match exactly what’s in your database. First, check if your rollup property is set to “original values” in Notion. Sometimes they default to counts or other aggregations. Also make sure the related records actually have “Important” selected - empty values in the source can mess up filtering. One more thing: check if your rollup returns an array or single value. Arrays work with “any” conditions, but single values might need a different filter structure.

Had the same issue last week! Wrap your rollup filter in quotes and double-check the property name matches exactly. Also verify “Important” actually exists in your original database - Notion’s API can be picky about capitalization.