I’m trying to work with the Notion API and I’m running into some issues. When I fetch the children of a block, most of them come back as unsupported
types. The only ones that seem to work are text
blocks.
Is this normal? Are there other block types that should be working? I’m a bit confused about what I can actually do with the API.
Here’s a quick example of what I’m seeing:
const response = await notion.blocks.children.list({
block_id: 'my_block_id',
});
console.log(response.results);
// Most items have { type: 'unsupported' }
// Only text blocks seem to work
Any help or clarification would be really appreciated. Thanks!
As someone who’s been working with the Notion API for a while now, I can say it’s not just you experiencing this issue. The API can be a bit finicky at times.
In my experience, you should be able to work with more than just text blocks. I’ve successfully used paragraph blocks, headings (h1, h2, h3), bulleted and numbered lists, to-do lists, and even code blocks.
One thing that helped me was explicitly specifying the block types I wanted to retrieve. Instead of using the generic ‘children’ endpoint, try using specific endpoints for the block types you’re interested in.
Also, make sure you’re using the most recent version of the API. Notion has been expanding its API capabilities, so an older version might be limiting your access to certain block types.
If you’re still having trouble, it might be worth reaching out to Notion’s support team. They’ve been quite helpful in the past when I’ve run into API-related issues.
Hey DancingButterfly, i’ve run into similar issues. The API can be tricky! From my experience, besides text blocks, you should be able to work with paragraphs, headings, to-do lists, and some others. Make sure ur using the latest API version. If ur still seeing mostly ‘unsupported’, might be worth checking ur authentication or permissions. good luck!
I’ve encountered this issue as well. The Notion API supports more block types than just text, including paragraphs, headings, lists, tables, and even databases. If you’re primarily seeing ‘unsupported’ types, it could be due to an outdated API version or insufficient permissions.
Double-check your authentication token and ensure it has the necessary scopes. Also, verify that you’re using the latest API version in your requests. If the problem persists, try fetching a different page or database to rule out any content-specific issues.
Remember that some block types might require additional API calls to retrieve their full content. The Notion API documentation provides a comprehensive list of supported block types and their structures, which can be helpful for troubleshooting.