文档已更新。
中文(简体) 译文尚未完成。
英语更新时间:10月17日
中文(简体) 更新时间:8月27日

Overview

You may use the Threads API to enable people to create and publish content on a person’s behalf on Threads, and to display those posts within your app solely to the person who created it.

The Threads API can be accessed by either graph.threads.com or graph.threads.net.

Rate Limiting

对 Threads API 的调用次数会计入调用应用的调用次数中。每个应用和应用用户对都拥有各自的应用调用次数,该次数是指应用在连续 24 小时内已发出的调用数量。其计算方式如下:
Calls within 24 hours = 4800 * Number of Impressions
“Number of Impressions”是指过去 24 小时内来自应用用户 Threads 账户中的任何内容在某个用户的屏幕上显示的次数。流量限制也可能受到每天总 CPU 时间的限制:
720000 * number_of_impressions for total_cputime
2880000 * Number of Impressions for total_time
注意:展示次数的最小值是 10(因此,如果展示次数小于 10,此值将默认为 10)。

Posts

Threads profiles are limited to 250 API-published posts within a 24-hour moving period. Carousels count as a single post. This limit is enforced on the POST /{threads-user-id}/threads_publish endpoint when attempting to publish a media container. We recommend that your app also enforces the publishing rate limit, especially if your app allows app users to schedule posts to be published in the future.

To check a profile's current Threads API rate limit usage, query the GET /{threads-user-id}/threads_publishing_limit endpoint.

Note: This endpoint requires the threads_basic and threads_content_publish permissions.

Fields

NameDescription

quota_usage

Threads publishing count over the last 24 hours.

config

Threads publishing rate limit config object, which contains the quota_total and quota_duration fields.

Example Request

curl -s -X GET \
  "https:graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publishing_limit?fields=quota_usage,config&access_token=<ACCESS_TOKEN>"

Example Response

{
  "data": [
    {
      "quota_usage": 4,
      "config": {
        "quota_total": 250,
        "quota_duration": 86400
      }
    }
  ]
}

Replies

Threads profiles are limited to 1,000 replies within a 24-hour moving period.

To check a profile's current Threads replies rate limit usage, query the GET /{threads-user-id}/threads_publishing_limit endpoint. See the Reply Management documentation for more information.

Note: This endpoint requires the threads_basic, threads_content_publish, and threads_manage_replies permissions.

Fields

NameDescription

reply_quota_usage

Threads reply publishing count over the last 24 hours.

reply_config

Threads reply publishing rate limit config object, which contains the quota_total and quota_duration fields.

Example Request

curl -s -X GET \
  "https://graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publishing_limit?fields=reply_quota_usage,reply_config&access_token=<ACCESS_TOKEN>"

Example Response

{
  "data": [
    {
      "reply_quota_usage": 1,
      "reply_config": {
        "quota_total": 1000,
        "quota_duration": 86400
      }
    }
  ]
}

Deletion

Threads profiles are limited to 100 deletions within a 24-hour moving period.

To check a profile's current Threads deletion rate limit usage, query the GET /{threads-user-id}/threads_publishing_limit endpoint. See the Delete Posts documentation for more information.

Note: This endpoint requires the threads_basic and threads_delete permissions.

Fields

NameDescription

delete_quota_usage

Threads deletion count over the last 24 hours.

delete_config

Threads deletion rate limit config object, which contains the quota_total and quota_duration fields.

Example Request

curl -s -X GET \
  "https://graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publishing_limit?fields=delete_quota_usage,delete_config&access_token=<ACCESS_TOKEN>"

Example Response

{
  "data": [
    {
      "delete_quota_usage": 1,
      "delete_config": {
        "quota_total": 100,
        "quota_duration": 86400
      }
    }
  ]
}

Location Search

Threads profiles are limited to 500 location searches within a 24-hour moving period.

To check a profile's current Threads location search rate limit usage, query the GET /{threads-user-id}/threads_publishing_limit endpoint. See the Location Search documentation for more information.

Note: This endpoint requires the threads_basic and threads_location_tagging permissions.

Fields

NameDescription

location_search_quota_usage

Threads location search count over the last 24 hours.

location_search_config

Threads location search rate limit config object, which contains the quota_total and quota_duration fields.

Example Request

curl -s -X GET \
  "https://graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publishing_limit?fields=location_search_quota_usage,location_search_config&access_token=<ACCESS_TOKEN>"

Example Response

{
  "data": [
    {
      "location_search_quota_usage": 1,
      "location_search_config": {
        "quota_total": 500,
        "quota_duration": 86400
      }
    }
  ]
}

Limitations and Specifications

图片参数

  • 格式:JPEG 和 PNG 图片类型是官方支持的图片帖子的格式。
  • 文件大小:最大 8 MB。
  • 宽高比限制:10:1
  • 最小宽度:320(必要时将扩大至最小值)
  • 最大宽度:1440(必要时将缩小至最大值)
  • 高度:发生变化(取决于宽度和宽高比)
  • 色彩空间:sRGB。若图片使用其他色彩空间,系统会将其色彩空间转换为 sRGB。

视频规格

  • 容器:MOV 或 MP4 (MPEG-4 Part 14),没有编辑列表,文件以 moov atom 开头。
  • 音频编解码器:AAC,采样率不超过 48khz,1 或 2 个通道(单声道或立体声)。
  • 视频编解码器:HEVC 或 H264,逐行扫描,封闭式图片组,4:2:0 色度抽样。
  • 帧率:23-60 FPS
  • 图片尺寸:
    • 最大列数(水平像素):1920
    • 宽高比要求为 0.01:1 至 10:1,但我们建议使用 9:16 的宽高比,以避免图片被裁剪或出现空白位置。
  • 视频比特率:VBR,最高 100 Mbps。
  • 音频比特率:128 kbps。
  • 时长:最多 300 秒(5 分钟),最少超过 0 秒。
  • 文件大小:最大 1 GB。

Other Limitations

  • Text posts are limited to 500 characters.
  • Carousel posts must have a maximum of 20 children and a minimum of 2 children.
  • For additional limitations, refer to each endpoint's reference.