メインコンテンツへスキップ
GET
/
blogs
/
v3
/
topics
/
{topic-id}
Get a blog topic by ID
curl --request GET \
  --url https://api.hubapi.com/blogs/v3/topics/{topic-id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.hubapi.com/blogs/v3/topics/{topic-id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.hubapi.com/blogs/v3/topics/{topic-id}', 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/blogs/v3/topics/{topic-id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$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/blogs/v3/topics/{topic-id}"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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/blogs/v3/topics/{topic-id}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/blogs/v3/topics/{topic-id}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": 349001328,
  "portalId": 62515,
  "name": "api-docs",
  "slug": "api-docs",
  "description": "",
  "created": 1381896200000,
  "updated": 1381896200000,
  "deletedAt": 0,
  "totalPosts": null,
  "livePosts": null,
  "lastUsed": null,
  "associatedBlogIds": [],
  "publicUrl": null,
  "status": "inactive"
}
{
  "message": "<string>",
  "correlationId": "<string>",
  "category": "<string>",
  "links": {}
}

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

パスパラメータ

topic-id
string
必須

Unique identifier for a particular topic

クエリパラメータ

casing
enum<string>

Use the casing=snake parameter to change the API's casing for returned JSON fields (below) to snake_case, rather than camelCase, which is the default. This option is provided for backwards-compatibility and ease of migration from Content v2 APIs, which used snake_case.

利用可能なオプション:
snake

レスポンス

successful operation

id
integer<int64>

The unique id of the topic

portalId
integer

The hub id

name
string

The topic name

slug
string

The URL-friendly version of the topic, used in blog urls

description
string

The topic description

created
integer<int64>

When the topic was first created, in milliseconds since the epoch

updated
integer<int64>

When the topic was last updated, in milliseconds since the epoch

deletedAt
integer<int64>

When the topic was deleted, in milliseconds since the epoch. Zero if the topic was never deleted. Use a DELETE request to properly soft delete a topic - do not set this value directly.

totalPosts
integer | null

The total count of posts (including drafts) associated with this topic.

livePosts
integer | null

The total count of published posts associated with this topic.

lastUsed
integer<int64> | null

The most recent publish date of a blog post associated with this topic, in milliseconds since the epoch.

associatedBlogIds
integer[]

A list of the blog IDs where this topic has been used.

publicUrl
string | null

The public URL for the topic

status
string

The status of the topic

最終更新日 2026年4月10日