# Write API — target specific block or instance, not entire page

**URL:** <https://forum.builder.io/t/write-api-target-specific-block-or-instance-not-entire-page/3964>\
**Category:** Technical Questions\
**Tags:** api\
**Created:** [July 30, 2023, 1:04pm UTC](https://forum.builder.io/t/write-api-target-specific-block-or-instance-not-entire-page/3964 "2023-07-30T13:04:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanLand](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@JonathanLand](https://forum.builder.io/u/JonathanLand)\
**Post date:** [July 30, 2023, 1:04pm UTC](https://forum.builder.io/t/write-api-target-specific-block-or-instance-not-entire-page/3964/1 "2023-07-30T13:04:49Z")

</div>

I’m trying to build a process to programmatically make changes to all instances of a block. The goal is to be able to change a block’s API and migrate the data of all existing instances.

For example we would want to change the `size` input in a block called `Heading` from being an enum of `["large","small"]` into a number from `1` to `5`, and replace all instances of `"large"` with `4` and instances of `"small"` to `2`.

Ideally I would be able to query the database and find every instance of `Heading`, and change the `size` field of each instance. However, the docs ([Builder.io Write API - Builder.io](https://www.builder.io/c/docs/write-api)) only show the ability to target entire pages. Is there any way to target every instance of a specific block? Targeting instances by their ID would also be fine, since I can get those from a general query.

---

<div class="post-metadata">

**Author:** ![aziz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/aziz/32/2551_2.png) [@aziz](https://forum.builder.io/u/aziz)\
**Post date:** [July 30, 2023, 3:34pm UTC](https://forum.builder.io/t/write-api-target-specific-block-or-instance-not-entire-page/3964/2 "2023-07-30T15:34:13Z")

</div>

This is possible:

- Check this [post](https://forum.builder.io/t/how-do-i-find-all-content-that-use-a-specific-custom-component/3965) to find all content instances that use a specific component.

- There’s a helper method to transform all instances of a custom component in one content entry, in `@builder.io/utils` package, [https://github.com/BuilderIO/builder/tree/main/packages/utils#transformcomponents](https://github.com/BuilderIO/builder/tree/main/packages/utils#transformcomponents)

Once transformed, you’ll get a new json of the content that you can use to send a `POST` to the write API
