Programmatically create new cells?

I’m thinking about building a custom API explorer for a JSON web API. I’d like to be able to display a list of items from the API and have the user click on one of those items to trigger an additional API request to fetch more information about that specific item.

It struck me that it would be really interesting to dynamically create new cells based on the user’s interactions with previous ones. Is that possible? If not, is it something you could add? Some kind of JavaScript method for programmatically appending and executing a new cell to the current notebook.

1 Like