Finding block identifiers when using Notion's API

I’m working with Notion’s API and need to add child blocks to an existing block. The problem is that I need the block identifier to do this operation.

I’ve been looking through the API documentation but I can’t seem to find clear instructions on how to retrieve block IDs. When I try to append new blocks as children, the API requires this identifier but I’m not sure where to get it from.

I’ve tried different approaches but nothing seems to work. The documentation mentions block IDs but doesn’t explain how to actually obtain them from existing blocks.

Can someone explain the correct way to get these block identifiers? I need this to successfully add child blocks to my Notion pages through the API.

Been there countless times. The approaches mentioned work but get messy with multiple pages or regular use.

I automated block ID extraction using Latenode. Set up a workflow that connects to Notion’s API, pulls page structure, extracts all block IDs, and stores them cleanly. No more manual URL copying or custom API calls.

The workflow handles authentication, makes GET requests for block children, parses responses, and maps block hierarchy. Takes 10 minutes to set up, then trigger whenever you need IDs.

Best part - chain it with your block creation logic. Get block IDs → add child blocks → done. All automated.

Way better than manual work every time.

Block IDs show up in a few different spots depending on how you’re working. When you create a page via API, the response gives you a page ID that’s also the root block ID. After that, any API calls pulling page content will return nested blocks with their IDs in the response. I’ve had the best luck querying the page first with the pages endpoint, then going through the returned block objects one by one. Each block object has an ‘id’ field - that’s what you need for the children endpoint. One gotcha that tripped me up early on: handle pagination properly when pulling blocks. Big pages split results across multiple API calls, so you’ll miss block IDs if you only process the first batch.

To retrieve block identifiers in Notion’s API, use the ‘Retrieve block children’ endpoint. Initiate a GET request to https://api.notion.com/v1/blocks/{block_id}/children. This will return the child blocks along with their unique IDs. Remember to start with the parent block ID, which you can obtain from the ‘Retrieve a page’ endpoint or through your database queries. Once you have the block ID, you can navigate the structure to locate where your new child blocks should be added.

I ran into this exact same problem building my CMS integration. The breakthrough was realizing Notion treats everything as blocks - even the page itself. When you grab a page through the pages endpoint, that page ID is actually the top-level block ID too. Then you just walk down the block tree from there. I built a recursive function that maps all the blocks and caches their IDs locally. Saves tons of API calls later when you need specific blocks. Since nested content can get really deep, I found it’s way better to map the whole hierarchy upfront rather than making calls on the fly. Just heads up - database blocks need special handling for their children.

yep totally get it. just look at the url for the block in ur browser, that long string after the last dash is the block id. way simpler than dealing with the api if ur just messin around.