Title: APIs overview
Published: July 15, 2026
Last modified: July 16, 2026

---

# APIs overview

## In this article

 * [WordPress Playground APIs overview](https://developer.wordpress.org/playground/developers/apis/?output_format=md#wordpress-playground-apis-overview)
    - [Query API](https://developer.wordpress.org/playground/developers/apis/?output_format=md#query-api)
    - [Blueprints](https://developer.wordpress.org/playground/developers/apis/?output_format=md#blueprints)
    - [Sites API](https://developer.wordpress.org/playground/developers/apis/?output_format=md#sites-api)
    - [JavaScript API](https://developer.wordpress.org/playground/developers/apis/?output_format=md#javascript-api)
 * [Playground APIs Concepts](https://developer.wordpress.org/playground/developers/apis/?output_format=md#playground-apis-concepts)
    - [Link to the Playground site](https://developer.wordpress.org/playground/developers/apis/?output_format=md#link-to-the-playground-site)
    - [Browser APIs](https://developer.wordpress.org/playground/developers/apis/?output_format=md#browser-apis)
    - [In Node.js](https://developer.wordpress.org/playground/developers/apis/?output_format=md#in-node-js)

[ Back to top](https://developer.wordpress.org/playground/developers/apis/?output_format=md#wp--skip-link--target)

## 󠀁[WordPress Playground APIs overview](https://developer.wordpress.org/playground/developers/apis/?output_format=md#wordpress-playground-apis-overview)󠁿

WordPress Playground exposes a few APIs that you can use to interact with the Playground:

### 󠀁[Query API](https://developer.wordpress.org/playground/developers/apis/?output_format=md#query-api)󠁿

Basic operations can be done by adjusting the URL, for example here’s how you can
preinstall a coblocks plugin:

[https://playground.wordpress.net/?plugin=coblocks](https://playground.wordpress.net/?plugin=coblocks)

Or a theme:

[https://playground.wordpress.net/?theme=pendant](https://playground.wordpress.net/?theme=pendant)

This is called [Query API](https://developer.wordpress.org/playground/developers/apis/query-api/)
and you can learn more about it [here](https://developer.wordpress.org/playground/developers/apis/query-api/).
Once you have a URL that you like, you can embed it in your website using an iframe:

    ```html
    <iframe style="width: 800px; height: 500px;" src="https://playground.wordpress.net/?plugin=coblocks"></iframe>
    ```

Check the [Query API](https://developer.wordpress.org/playground/developers/apis/query-api)
section for more info.

### 󠀁[Blueprints](https://developer.wordpress.org/playground/developers/apis/?output_format=md#blueprints)󠁿

If you need more control over your Playground, you can use JSON Blueprints. For 
example, here’s how to create a post and install a plugin:

    ```language-json
    {
        "steps": [
            {
                "step": "login"
            },
            {
                "step": "installPlugin",
                "pluginData": {
                    "resource": "wordpress.org/plugins",
                    "slug": "friends"
                }
            },
            {
                "step": "runPHP",
                "code": "<?php require_once '/wordpress/wp-load.php'; wp_insert_post(array('post_title' => 'Post title', 'post_content' => 'Post content', 'post_status' => 'publish', 'post_author' => 1)); ?>"
            }
        ]
    }
    ```

[Try it out!](https://playground.wordpress.net/?mode=seamless#eyJzdGVwcyI6W3sic3RlcCI6ImxvZ2luIn0seyJzdGVwIjoiaW5zdGFsbFBsdWdpbiIsInBsdWdpbkRhdGEiOnsicmVzb3VyY2UiOiJ3b3JkcHJlc3Mub3JnL3BsdWdpbnMiLCJzbHVnIjoiZnJpZW5kcyJ9fSx7InN0ZXAiOiJydW5QSFAiLCJjb2RlIjoiPD9waHAgcmVxdWlyZV9vbmNlICcvd29yZHByZXNzL3dwLWxvYWQucGhwJzsgd3BfaW5zZXJ0X3Bvc3QoYXJyYXkoJ3Bvc3RfdGl0bGUnID0+ICdQb3N0IHRpdGxlJywgJ3Bvc3RfY29udGVudCcgPT4gJ1Bvc3QgY29udGVudCcsICdwb3N0X3N0YXR1cycgPT4gJ3B1Ymxpc2gnLCAncG9zdF9hdXRob3InID0+IDEpKTsgPz4ifV19)

Blueprints play a significant role in WordPress Playground, so they have their own
dedicated documentation hub. Learn more about JSON Blueprints at the [Blueprints Docs Hub](https://developer.wordpress.org/playground/blueprints).

### 󠀁[Sites API](https://developer.wordpress.org/playground/developers/apis/?output_format=md#sites-api)󠁿

The Playground website at [playground.wordpress.net](https://playground.wordpress.net)
exposes a `window.playgroundSites` object for managing the sites shown in the Dock’s**
Playgrounds** pane — listing them, creating new ones, persisting temporary sites
to OPFS or local disk, switching between them, and changing PHP version or networking.

    ```javascript
    await playgroundSites.createNewTemporarySite('demo', { phpVersion: '8.4' });
    await playgroundSites.saveInBrowser('My demo site');
    const client = playgroundSites.getClient();
    ```

Check the [Sites API](https://developer.wordpress.org/playground/developers/apis/sites-api)
section for more info.

### 󠀁[JavaScript API](https://developer.wordpress.org/playground/developers/apis/?output_format=md#javascript-api)󠁿

The `@wp-playground/client` package provides a JavaScript API you can use to fully
control your Playground instance. Here’s a simple example of what you can do:

    ```html
    <iframe id="wp" style="width: 100%; height: 300px; border: 1px solid #000;"></iframe>
    <script type="module">
        // Use unpkg for convenience

        const client = await startPlaygroundWeb({
            iframe: document.getElementById('wp'),
            remoteUrl: `https://playground.wordpress.net/remote.html`,
        });
        // Let's wait until Playground is fully loaded
        await client.isReady();
    </script>
    ```

Check the [JavaScript API](https://developer.wordpress.org/playground/developers/apis/javascript-api/)
section for more info.

## 󠀁[Playground APIs Concepts](https://developer.wordpress.org/playground/developers/apis/?output_format=md#playground-apis-concepts)󠁿

WordPress Playground in the browser is all about links and iframes. Regardless of
which API you choose, you will use it in one of the following ways:

### 󠀁[Link to the Playground site](https://developer.wordpress.org/playground/developers/apis/?output_format=md#link-to-the-playground-site)󠁿

You can customize WordPress Playground by modifying the https://playground.wordpress.
net/ link. You can, for example, create a post, request a specific plugin, or run
any PHP code.

To prepare such a link, use either the [Query API](https://developer.wordpress.org/playground/developers/apis/query-api)(
easy) or the [JSON Blueprints API](https://developer.wordpress.org/playground/blueprints)(
medium).

Once it’s ready, simply post it on your site. It makes a great “Try it yourself”
button in a tutorial, for example.

#### 󠀁[Embed in an <iframe>](https://developer.wordpress.org/playground/developers/apis/?output_format=md#embed-in-an-iframe)󠁿

WordPress Playground can be embedded in your app using an `<iframe>`:

    ```html
    <iframe src="https://playground.wordpress.net/"></iframe>
    ```

To customize that Playground instance, you can:

 * Load it from special link prepared using the [Query API](https://developer.wordpress.org/playground/developers/apis/query-api)(
   easy) or the [JSON Blueprints API](https://developer.wordpress.org/playground/blueprints)(
   medium).
 * Control it using the [JavaScript API](https://developer.wordpress.org/playground/developers/apis/javascript-api/).

The JavaScript API gives you the most control, but it is also the least convenient
option as it requires loading the Playground Client library.

**Careful with the demo site**

The site at [https://playground.wordpress.net](https://playground.wordpress.net)
is there to support the community, but there are no guarantees it will continue 
to work if the traffic grows significantly.

If you need certain availability, you should [host your own WordPress Playground](https://developer.wordpress.org/playground/developers/architecture/host-your-own-playground).

### 󠀁[Browser APIs](https://developer.wordpress.org/playground/developers/apis/?output_format=md#browser-apis)󠁿

The following Playground APIs are available in the browser:

 * [Query API](https://developer.wordpress.org/playground/developers/apis/query-api)
   enable basic operations using only query parameters
 * [Blueprints API](https://developer.wordpress.org/playground/blueprints) give 
   you a great degree of control with a simple JSON file
 * [Sites API](https://developer.wordpress.org/playground/developers/apis/sites-api)
   lets scripts running on playground.wordpress.net manage saved sites
 * [JavaScript API](https://developer.wordpress.org/playground/developers/apis/javascript-api)
   give you full control via a JavaScript client from an npm package

### 󠀁[In Node.js](https://developer.wordpress.org/playground/developers/apis/?output_format=md#in-node-js)󠁿

The following Playground APIs are available in Node.js:

 * [JSON Blueprints API](https://developer.wordpress.org/playground/blueprints)
 * [JavaScript API](https://developer.wordpress.org/playground/developers/apis/javascript-api/)

These APIs are very similar to their web counterparts, but, unsurprisingly, they
are not based or links or iframes.

First published

July 15, 2026

Last updated

July 16, 2026

Edit article

[ Improve it on GitHub: APIs overview ](https://raw.githubusercontent.com/WordPress/wordpress-playground/trunk/packages/docs/site/docs/developers/06-apis/01-index.md)

Changelog

[ See list of changes: APIs overview ](https://developer.wordpress.org/playground/developers/apis/?output_format=md#)

[  Previous: Getting Started with Xdebug](https://developer.wordpress.org/playground/developers/xdebug/getting-started/)

[  Next: Query API](https://developer.wordpress.org/playground/developers/apis/query-api/)