Get container

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

JSON LD Integration for SEO/GEO

Node.js + Express integration example

Add the jsonLd=true query parameter to your existing container API call, then inject
the returned block into your page's <head>.

const express = require('express');
const app = express();

app.get('/', async (req, res) => {
    // Fetch the container from the JOIN Stories API with JSON-LD enabled
    const apiResponse = await fetch(
        'https://api.stories.studio/v3/teams/MY_TEAM_ID/containers/MY_CONTAINER_ALIAS?jsonLd=true'
    );
    const data = await apiResponse.json();

    // Serialize the JSON-LD block into a <script> tag if present
    const jsonLdScript = data.jsonLd
        ? `<script type="application/ld+json">${JSON.stringify(data.jsonLd)}</script>`
        : '';

    res.send(`
        <!DOCTYPE html>
        <html>
            <head>
                <title>My products page</title>
                ${jsonLdScript}
            </head>
            <body>
                <h1>My products page</h1>

                <!-- JOIN Stories widget -->
                <div id="join-widget-MY_CONTAINER_ALIAS" style="display:block;"></div>
                <script
                    src="https://widget.stories.studio/widgets/MY_CONTAINER_ALIAS/index.js"
                    data-join-widget-id="join-widget-MY_CONTAINER_ALIAS"
                    data-join-widget-alias="MY_CONTAINER_ALIAS"
                    type="text/javascript"
                ></script>
            </body>
        </html>
    `);
});

Note: jsonLd is only included in the response when using API version v3
and payloadType is not set to sdk.

Path Params
string
required

The teamId that JOIN will give to you

string
required

Alias of your container

Query Params
string
enum
Defaults to full

payload's format. It is tailored for different needs. If you are working with the mobile SDK, you HAVE to use "sdk".

Allowed:
int32

set width for the container's covers.

int32

set height for the container's covers.

string

add a constraint on container's audiences. {param} should be replaced by the property's name. See Audiences for more informations.

boolean

If 'true', it will only return the container if it is published.

string

Select product's Stories to display - Only used by product matcher

boolean
Defaults to false

Coming soon - Structured data for Schema json+ld

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json