nilleb
nilleb

Reputation: 1012

How to get the url of a page via the Notion Public API?

As per the official Notion Public API documentation about how to retrieve a page, I can get the page properties and a little amount of metadata (ie. "object", "id", "created_time", "last_edited_time"). How can I obtain the page slug or URL given the available metadata? (I am trying to get the page URL for a database item).

Upvotes: 2

Views: 4042

Answers (1)

Quan You
Quan You

Reputation: 117

Query a database using https://api.notion.com/v1/databases/database_id/query and you can find your page id in results[].id from the list of responses. Omit dashes from results[].id. https://notion.so/page_id will be your page URL.

Upvotes: 3

Related Questions