NotionX / NotionX/react-notion-x
What's the difference between collection ID and database ID? How to get the former?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Description
I assumed that database ID is collection ID, so I passed it to getCollectionData of the notion-client.
It returned a 400 response.
After further research, I've learned that they are different things. Collection ID can be extracted from recordMap.collection.
A database ID can be parsed from a database url, it follows this pattern:
`https://www.notion.so/{databaseID}?v={viewID}
Is there a way to tell the collection ID from Notion UI, without calling getPage()?
Notion Test Page ID
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by tracing the notion-client getCollectionData and getPage entry points, then inspect how recordMap.collection is obtained for the linked public database. Done means clearly documenting whether the collection ID can be obtained without getPage, or identifying the supported alternative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100