An interesting proposition made possible by Gutenberg is to have all metadata saved and managed through blocks on the blog post itself (instead of saving it on some different place, such as a custom table), and then to retrieve and filter the data through an API, either REST or GraphQL.

For instance, this REST endpoint extracts the metadata from a specific post, and in the process removes also all the HTML contained in the metadata, so it can also power an app.

This endpoint extracts all block metadata from all posts. We can also filter it. For instance, this endpoint extracts all the Youtube videos from several posts, and it can also specify to extract the URL property only and nothing else.

To achieve this, I created a plugin, which exports the block metadata in a medium-agnostic format, and a REST+GraphQL API to access it and filter it.