SEO Service

Enrich the information search engines like Google use to index your pages with content from Conversation, Social Reviews and Live Blog

The OpenWeb SEO service API returns SEO markup used by Google and other search engines to index your pages. The JSON-LD structure of the response is based on the schema.org protocol. OpenWeb supports several specific schemas from this protocol to align with your site's content.

To provide you flexibility, the SEO service API can be enabled through either a backend (recommended) or frontend integration.


Backend Integration

Implementation

The SEO API backend integration requires your backend to perform the following actions during the rendering of a page:

  1. Make a POST https://seo.spot.im/ call.

    The following are several examples of POST calls. Be sure to replace SPOT_ID with your Spot ID,POST_ID with the post ID of the current article, and {kebob-case-schema} with a valid schema.org name, if applicable.

    💡

    To return JSON data instead of a JSON-LD script snippet, append ?json=true to the API call.

POST https://seo.spot.im/v2/article/SPOT_ID/POST_ID
POST https://seo.spot.im/v2/comment/SPOT_ID/POST_ID
POST https://seo.spot.im/v2/article/live-blog/SPOT_ID/LIVE_BLOG_ID
<-! Returns aggregate score and the individual reviews ->
POST https://seo.spot.im/stars-and-reviews/SPOT_ID/POST_ID

<-! Returns only the aggregate score ->
POST https://seo.spot.im/stars-rating/SPOT_ID/POST_ID
<-! Returns JSON-LD markup ->
<-! Replace {kebob-case-schema} with a valid schema.org name. ->
POST https://seo.spot.im/{kebob-case-schema}/SPOT_ID/POST_ID

  1. (Optional) Add a JSON body to the API call to enrich the SEO data returned.
curl -L -X POST 'https://seo.spot.im/v2/article/SPOT_ID/POST_ID' \
     -H "Content-Type: application/json" \
     -d '{"author": {"@type":"Person", "name":"Carol Smith"}}'
  1. Ingest the API response.
  2. Append the SEO markup into HTML code of your page.

Validation

Use the following steps to validate your implementation:

  1. In Google's Structured Data Testing Tool, click FETCH URL or CODE SNIPPET.
  2. Enter the public URL of your page or copy and paste the HTML code of your page.
  3. Click RUN TEST.


Frontend integration

To enable the OpenWeb service API for a frontend integration, add the data-seo-enabled="true" attribute to your launcher code.

<script 
    async 
    src="https://launcher.spot.im/spot/SPOT_ID"
    data-spotim-module="spotim-launcher"
    data-seo-enabled="true">
</script>

When your page is rendering, OpenWeb makes an API call to the SEO API. Then, OpenWeb embeds the SEO markup into the HTML code of your page.

ProductSEO markup returned
ConversationArticle schema
LiveBlogLiveBlog schema


Supported Schemas

OpenWeb supports the following schemas:

  • Generic: Used with articles and comments on Conversation pages; "@type": "Article" is strongly recommended for most standard implementations to align with the LD+JSON schema of the site)
  • LiveBlogPosting: Used with Live Blog
  • Recipe: Used with Social Reviews

An example of each schema is shown below.

<script type="application/ld+json">{
    "@context": "http://schema.org/",
    "@type": {:type},
    "headline": "From Man Cave to Kid Cave: Get the Most out of Your Home Theater",
    "name": "From Man Cave to Kid Cave: Get the Most out of Your Home Theater",
    "thumbnailUrl": "https://www.copyrightfreecontent.com/wp-content/uploads/2011/03/HomeTheater_SOCC.jpg",
    "description": "The term “home theater” used to mean a small room designated for the enjoyment of watching movies.",
    "url": "https://www.this-is-the-article-url.com", 
    "image": {
        "@context": "http://schema.org/",
        "@type": "ImageObject",
        "url": "https://www.copyrightfreecontent.com/wp-content/uploads/2011/03/HomeTheater_SOCC.jpg", 
        "width": "1778",
        "height": "1000"
    },
    "commentCount": 2, 
    "comment": [
        {
            "@context": "http://schema.org/", 
            "@type": "Comment", 
            "datePublished": "2020-10-25", 
            "author": {
                "@context": "http://schema.org/", 
                "@type": "Person",
                "name": "June Jellysmythers", 
                "givenName": "June", 
                "familyName": "Jellysmythers"
            },
            "text": "Interesting! I never really thought about the impact of lighting.",
            "upvoteCount": 26,
            "downvoteCount": 0
        }, 
        {
            "@context": "http://schema.org/", 
            "@type": "Comment", 
            "datePublished": "2020-10-25", 
            "author": {
                "@context": "http://schema.org/", 
                "@type": "Person",
                "name": "Michael Wesshausenler", 
                "givenName": "Michael", 
                "familyName": "Wesshausenler"
            },
            "text": "Lightning? All I needed was lightning?", 
            "upvoteCount": 147,
            "downvoteCount": 0
        }
    ]
}</script>
<script type="application/ld+json">{
    "@context": "http://schema.org/",
    "@type": "LiveBlogPosting",
    "headline": "Live Updates: Cat vs Cucumber",
    "name": "Live Updates: Cat vs Cucumber",
    "thumbnailUrl": "",
    "description": "Epic cat vs cucumber challenge. Who will win?",
    "image": {
        "@context": "http://schema.org/",
        "@type": "ImageObject",
        "url": "", 
        "width": "1280",
        "height": "720"
    },
    "coverageStartTime": "2020-09-23 20:30:00 0000", 
    "coverageEndTime": "2020-09-23 21:00:00 0000", 
    "liveBlogUpdate": [
        {
            "@context": "http://schema.org/",
            "@type": "BlogPosting",
            "datePublished": "2020-09-23 20:31:03 0000", 
            "author": {
                "@context": "http://schema.org/", 
                "@type": "Person",
                "name": "meow-the-cat-blogger"
            },
            "articleBody": "Fluffy confidently enters the room. No sign of 'Cuke the Cucumber'." 
            "headline": "Entrance of Fluffy", 
            "publisher": {
                "@type": "Organization", 
                "name": "Me-yowh Times", 
                "logo": {
                    "@context": "http://schema.org/", 
                    "@type": "ImageObject",
                    "url": ""
                }
            },
            "image": "", 
            "mainEntityOfPage": "LiveBlogPosting",
            "dateModified": "2020-09-23 20:31:03 0000"
        }
    ]
}</script>
/* Aggregate score returned from POST https://seo.spot.im/stars-rating/SPOT_ID/POST_ID
*/

<script type="application/ld+json">{
    "@context": "http://schema.org/",
    "@type": "Recipe",
    "name": "Crockpot White Chicken Chili Is The Perfect Cold Weather Dinner",
    "image": "https://images.spot.im/image/upload/q_70,fl_lossy,dpr_3,h_180,w_180,c_thumb/v200/production/yz4ohcwlnwoa7te7ucdz",
    "description": "Hearty, creamy, and full of your favorite chili flavors.",
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": 3.7777777,
        "reviewCount": 9,
        "worstRating": 0,
        "bestRating": 5
    }
}</script>




/* Individual reviews returned from POST https://seo.spot.im/conversation/SPOT_ID/POST_ID
*/

<script type="application/ld+json">[{
    "@context": "http://schema.org/",
    "@type": "Review",
    "itemReviewed": {
        "name": "Crockpot White Chicken Chili Is The Perfect Cold Weather Dinner",
        "url": null,
        "image": "https://images.spot.im/image/upload/q_70,fl_lossy,dpr_3,h_180,w_180,c_thumb/v200/production/yz4ohcwlnwoa7te7ucdz",
        "@type": "Recipe"
    },
    "datePublished": "2020-02-19",
    "author": {
        "@type": "Person",
        "name": "GreenTea"
    },
    "reviewBody": "Followed the directions and it turned out AMAZING!"
}, {
    ...
}]</script>




/* Aggregate score and individual reviews returned from https://seo.spot.im/stars-and-reviews/SPOT_ID/POST_ID
*/

<script type="application/ld+json">{
    "@context": "http://schema.org/",
    "@type": "Recipe",
    "name": "Crockpot White Chicken Chili Is The Perfect Cold Weather Dinner",
    "image": "https://images.spot.im/image/upload/q_70,fl_lossy,dpr_3,h_180,w_180,c_thumb/v200/production/yz4ohcwlnwoa7te7ucdz",
    "description": "",
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": 3.7777777,
        "reviewCount": 9,
        "worstRating": 0,
        "bestRating": 5
    }
}</script>
<script type="application/ld+json">[{
    "@context": "http://schema.org/",
    "@type": "Review",
    "itemReviewed": {
        "name": "Crockpot White Chicken Chili Is The Perfect Cold Weather Dinner",
        "url": null,
        "image": "https://images.spot.im/image/upload/q_70,fl_lossy,dpr_3,h_180,w_180,c_thumb/v200/production/yz4ohcwlnwoa7te7ucdz",
        "@type": "Recipe"
    },
    "datePublished": "2020-02-19",
    "author": {
        "@type": "Person",
        "name": "GreenTea"
    },
    "reviewBody": "Followed the directions and it turned out AMAZING!"
}, {
    ...
}]</script>