> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Threads API

> Threads を検索し、公開プロフィール、投稿、返信を JSON で読み取ります。いいね、返信、再投稿、引用、シェアの数と公開日時も受け取れます。

公開されている Threads のデータを非同期タスク API で JSON として読み取ります。`taskType` `SOCIAL` に `platform` `threads` を指定し、`action` で読み取る対象を選びます。完了したリクエスト 1 件につき **0.5 クレジット**です。

## リクエスト

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "SOCIAL", "payload": { "platform": "threads", "action": "search", "query": "running shoes", "limit": 20 } }'
```

タスクを送信したあと、`GET /v1/async/task/{id}` をポーリングするか Webhook で受け取ります。[非同期タスク](https://docs.querying.ai/ja/concepts/async-tasks.md)を参照してください。

## アクション

| `action` | 読み取る内容 | 必須 |
| - | - | - |
| `search` (デフォルト) | キーワードの投稿 | `query` |
| `profile` | 公開プロフィールと最近の投稿 | `username` |
| `post` | 1 件の投稿 | `postUrl` |
| `replies` | 投稿への返信 | `postUrl` |

`username` にはユーザー名かプロフィール URL を指定します。`postUrl` には `https://www.threads.com/@natgeo/post/Dfzi22JJSYp` のような投稿 URL を指定します。

## パラメータ

* `query`: `search` では必須です。
* `limit`: 任意。`search` と `profile` は 1-50 でデフォルトは 10、`replies` は 1-500 でデフォルトは 50 です。

## レスポンス例

```json theme={"theme":"css-variables"}
{
  "platform": "threads",
  "action": "search",
  "query": "running shoes",
  "returnedCount": 1,
  "posts": [
    {
      "id": "4032816753373504516",
      "code": "Df3cXhtEmQE",
      "url": "https://www.threads.com/@bongdgzmn/post/Df3cXhtEmQE",
      "text": "Gave in to the hype as I am also looking for a new pair of daily running shoes.",
      "author": "bongdgzmn",
      "authorVerified": false,
      "publishedAt": "2026-11-18T02:34:01.000Z",
      "mediaType": "carousel",
      "likeCount": 62,
      "replyCount": 42,
      "repostCount": 1,
      "quoteCount": 0,
      "shareCount": 19,
      "isReply": false
    }
  ]
}
```

## 結果フィールド

* すべてのレスポンスは `platform` と `action` をそのまま返します。一覧には `returnedCount` があります。
* 投稿には `id`、`code`、`url`、`text`、`author`、`authorVerified`、`publishedAt`、`mediaType` (`text`、`image`、`video`、`carousel`)、`images`、`videoUrl`、`likeCount`、`replyCount`、`repostCount`、`quoteCount`、`shareCount`、`isReply` があります。返信には、返信先のユーザー名を示す `replyTo` が加わります。
* `search` は Threads が表示する順に `posts` を最大 50 件ほど返します。
* `profile` は `id`、`username`、`displayName`、`biography`、`bioLinks`、`avatarUrl`、`profileUrl`、`isVerified`、`isPrivate`、`followerCount`、`threadCount`、`recentPosts` を返します。`recentPosts` はプロフィールページに表示される最近の投稿 4-13 件です。
* `post` は `post` を返します。`replies` は `replies` を返し、投稿 1 件につき 10 件ほどです。`availableCount` は投稿の返信数で、`partial: true` は投稿者が返信を非表示にした場合など、一覧がその数より短いことを示します。
* 存在しないか公開されていないプロフィールや投稿は、タスクを `PAGE_UNAVAILABLE` で終了させます。課金されるのは完了したリクエストだけです。

## 関連

* [Instagram](https://docs.querying.ai/ja/engines/instagram.md)
* [YouTube](https://docs.querying.ai/ja/engines/youtube.md)
* [エンジン一覧](https://docs.querying.ai/ja/engines/overview.md)
* [クレジットと上限](https://docs.querying.ai/ja/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.