メインコンテンツへスキップ
GET
/
comments
/
v3
/
comments
List comments
curl --request GET \
  --url https://api.hubapi.com/comments/v3/comments
import requests

url = "https://api.hubapi.com/comments/v3/comments"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.hubapi.com/comments/v3/comments', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.hubapi.com/comments/v3/comments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.hubapi.com/comments/v3/comments"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.hubapi.com/comments/v3/comments")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/comments/v3/comments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "objects": [
    {
      "id": 409695529,
      "portalId": 62515,
      "contentId": 6860971618,
      "contentTitle": "Test Blog",
      "contentPermalink": "http://demo-hubapi.hs-sites.com/tb-es/test-blog",
      "collectionId": 6513512292,
      "createdAt": 1550182973778,
      "deletedAt": 0,
      "userName": "test testerson",
      "firstName": "test testerson",
      "lastName": "",
      "userEmail": "test@gmail.com",
      "comment": "sample test comment",
      "userUrl": "",
      "state": "APPROVED",
      "userIp": null,
      "userReferrer": null,
      "userAgent": null,
      "contentAuthorEmail": "testapi@hubspot.com",
      "contentAuthorName": "Test 2",
      "contentCreatedAt": 1545651277462,
      "threadId": "0001.0000.0000.0000.0000.0000.0000.0000.0000.0000",
      "replyingTo": null,
      "parentId": 0,
      "legacyId": 0,
      "extraContext": null,
      "parent": null
    }
  ],
  "total": 17,
  "limit": 1,
  "offset": 0
}
{
  "status": "<string>",
  "message": "<string>"
}

クエリパラメータ

limit
integer<int32>

The number of items to return. Defaults to 20.

offset
integer<int32>

The offset set to start returning rows from. Defaults to 0.

portalId
integer<int64>

The portal number associated with your api key/token.

state
enum<string>

Comment state. Options are: APPROVED, SPAM, REJECTED, PENDING_MODERATION.

利用可能なオプション:
APPROVED,
SPAM,
REJECTED,
PENDING_MODERATION
contentId
integer<int64>

Allows you get comments for a specific blog post. Include contentId={post ID} to only get comments for that post.

reverse
boolean

If you want comments oldest to newest, supply 'reverse=true'.

query
string

Matches arbitrary text within a comment.

レスポンス

A list of blog comments.

objects
object[]
total
integer
limit
integer
offset
integer
最終更新日 2026年4月10日