Empty relation property returned by Notion API despite UI showing linked pages

I’m having trouble with the Notion API. I’m trying to get a relation property, but it’s coming back empty even though the Notion UI shows linked pages. I’ve tried both the page endpoint and the property endpoint, but I still get no data. The API response shows an empty relation list when it should have two pages.

Here’s what I get:

{
  "Personagens": {
    "id": "pPhq",
    "type": "relation",
    "relation": [],
    "has_more": false
  }
}

My app has read permissions for both databases and the relation is two-way. Any ideas why this is happening or how to fix it? It’s really frustrating!

I’ve dealt with this exact problem before, and it’s a real pain. One thing that worked for me was clearing the browser cache and cookies, then logging out and back into Notion. Sometimes the API gets out of sync with what’s displayed in the UI.

Another trick is to make a small edit to the relation field in the Notion interface, like removing and re-adding a linked page. This can force a sync between the database and the API.

If those don’t work, you might want to check if there are any filters or views applied to your database that could be affecting the API response. The API sometimes behaves differently with certain view configurations.

Lastly, if you’re comfortable with it, try using the beta version of the API. They often have fixes for these kinds of edge cases before they make it to the stable release.

I encountered a similar issue recently. Have you verified that the relation property is configured correctly on both sides? Sometimes, the problem lies in the database setup rather than the API itself. Additionally, ensure you’re using the latest version of the Notion API, as older versions had some quirks with relation properties. If all else fails, try creating a new test database with a simple relation and see if you can retrieve that data successfully. This can help isolate whether it’s a specific database issue or a more general API problem.

hey there! i’ve run into this before. double-check ur integration token has the right permissions for both databases. sometimes it’s a sneaky permissions issue even if u think it’s set up right. also, try querying the linked pages directly to see if u can access them that way. hope this helps!