How To Detect App Blocks (Not App Embedded)?

Topic summary

Goal: Efficiently detect whether any page in a Shopify Online Store 2.0 theme uses App Blocks (distinct from App Embed blocks), without scanning every JSON template.

Key points:

  • App Embed blocks can be detected via theme settings (e.g., settings.json), but App Blocks aren’t centrally listed.
  • settings_data.json in a 2.0 theme may not contain a “blocks” section, so it’s not reliable for App Block detection.
  • As of Oct 2024, the Admin GraphQL API doesn’t expose this information.

Current workable approach:

  • Use the Asset REST Admin API to search theme assets for App Blocks that match your app type. The official Shopify docs (link shared) describe this method under “Detecting app blocks and app embed blocks.”
  • This relies on the legacy/“dying” REST API, but it functions and can identify both app blocks and app embed blocks by scanning theme files via the API rather than manual file-by-file checks.

Status: No single config source or GraphQL solution yet; REST Asset API scanning is the practical workaround. Discussion remains open for a more direct method.

Summarized with AI on December 16. AI used: gpt-5.

I have found a way to detect App Embedded Block by check the settings.json in the asset files. While I can also do the same for App Blocks by checking each json file for pages that has them, it is not efficient since I have to check every single file.

Is there a way to check if App Blocks is enabled for any page at all? Is there any config files that stores the app blocks info, or do I have to check all the json file to get it?

Did you ever find this out? We’re looking, the app block is installed but settings_data.json does not have a blocks section at all.. AND this is a 2.0 theme.. Sooo yea no idea here..

Oct 2024: Would be nice if the admin graphQL 10-2024 included this … but not yet …

On this page there is a section, which does work for me … but it uses the dying REST … jb

Detecting app blocks and app embed blocksAnchor link to section titled “Detecting app blocks and app embed blocks”

If you want to identify whether a merchant has added app blocks to their theme, or enabled app embed blocks, you can use the Asset REST Admin API resource to look for blocks that match your app type.

1 Like