Blog API Methods

Get Comments from a Specific Blog

GET  /blog/v1/:blog_guid/comments.:ext

For a given blog, as identified by its GUID, list its comments.

For each comment, return key data, such as the comment GUID, and publication date / time.

Required Parameters How to use Description
Blog GUID Used in the request URL Unique identifier for a particular blog you want to list comments from.
HubSpot OAuth Access Token access_token=X - Used in the request URL The HubSpot API key for the portal that you're making the call for.
Optional Parameters How to use Description
Max &max=X - Used in the request URL The maximum number of comments to return from the blog.
Offset &offset=X - Used in the request URL By default, this call will return a max of 10 blog comments per page. You can use this "offset" parameter to get more comments. For instance, if you want to return comments 11-20, you should pass an "offset=10" parameter to your call.

Example URL requesting JSON:  https://api.hubapi.com/blog/v1/0d61e4ca-e395-4c1c-8766-afaa48bf68db/comments.json?access_token=demooooo-oooo-oooo-oooo-oooooooooooo&max=1

Example JSON output. It lists one post from a blog:

        [
            {
                "anonyEmail": "hapihp@hs.com",
                "anonyName": "hapihp comment Author",
                "anonyUrl": "http://hubspot.com",
                "approvedTimestamp": null,
                "blogGuid": "0d61e4ca-e395-4c1c-8766-afaa48bf68db",
                "blogUrl": "demo.hubapi.com/blog-for-testing",
                "comment": "hapihp test comment created a new one now",
                "createTimestamp": 1322620933000,
                "guid": "b3f67484-0e81-471d-a402-d240fad6cea6",
                "jsonUrl": "https://api.hubapi.com/blog/v1/comments/b3f67484-0e81-471d-a402-d240fad6cea6.json",
                "judgeIsSpam": false,
                "judgeScoredTimestamp": null,
                "notifiedModeratorsTimestamp": null,
                "notifiedNonModeratorsTimestamp": null,
                "notify": false,
                "portalId": 62515,
                "postGuid": "ae15391a-7bd9-454d-b51b-5c480a010497",
                "postTitle": "new improves Updated title",
                "postUrl": "http://demo.hubapi.com/blog-for-testing/bid/80149/",
                "referrer": "",
                "userAgent": "",
                "userEmail": "hapihp@hs.com",
                "userToken": ""
            }
        ]
    

Example URL requesting AtomPub:  https://api.hubapi.com/blog/v1/0d61e4ca-e395-4c1c-8766-afaa48bf68db/comments.atom?access_token=demooooo-oooo-oooo-oooo-oooooooooooo&max=1

Example AtomPub Output. It lists one post from a blog:

        <?xml version="1.0" encoding="UTF-8"?>
        <feed xmlns="http://www.w3.org/2005/Atom">
            <id>ae15391a-7bd9-454d-b51b-5c480a010497</id>
            <title type="text">new improves Updated title</title>
            <author>
                <name>testapi@hubspot.com</name>
                <email>testapi@hubspot.com</email>
            </author>
            <entry xmlns:hs="http://www.hubspot.com/">
                <id>b3f67484-0e81-471d-a402-d240fad6cea6</id>
                <author>
                    <name>hapihp comment Author</name>
                    <email>hapihp@hs.com</email>
                    <uri>http://hubspot.com</uri>
                </author>
                <content type="text">hapihp test comment created a new one now</content>
                <published>2011-11-30T02:42:13.000Z</published>
                <hs:blogGuid>0d61e4ca-e395-4c1c-8766-afaa48bf68db</hs:blogGuid>
                <hs:postGuid>ae15391a-7bd9-454d-b51b-5c480a010497</hs:postGuid>
                <hs:userToken></hs:userToken>
                <hs:judgeScoredTimestamp></hs:judgeScoredTimestamp>
                <hs:judgeIsSpam>false</hs:judgeIsSpam>
            </entry>
        </feed>