Notion API: Querying a Database via Unique Identifier

Attempting to filter my Notion database using a custom identifier fails. Despite correct property naming, my API call returns an error. New code:

{
  "query": {
    "attribute": "UniqueKey",
    "value_condition": {
      "isEqualTo": 92
    }
  }
}

I encountered a similar issue when filtering a Notion database. It turned out that the problem was due to a mismatch in the property type expectations. In my case, checking the database schema and confirming that the property was indeed a number made a difference. I also discovered that sometimes API filters are more sensitive to minor discrepancies in naming conventions. It helped to double-check the parameter names against the official Notion API documentation and adjust the types accordingly.

try wrapping the filter formatting exactly as notion expects; i had a similar hiccup and ended up switching from number to string and it worked. check the schema carefully.