POST

接口健康状态

24h 健康值
正常
  • 健康 / 正常
  • 可用
  • 少量可用
  • 基本不可用
正常

24 小时趋势

30 天趋势

主页或对象详情:返回单个对象;主要字段 user_id、username、name、bio、avatar_url、follower_count。

请求发到 POST https://api.everyinfra.com/api/v1/social,platform 填 pinterest,action 填 profile。 单价 $1.39 / 千次(每次 $0.001389),失败和空结果都不收费。 同步返回;慢任务可在请求体加 "mode": "async",先拿 job_id 再轮询。

AI 提示词

#
请帮我用 EveryInfra 的「Pinterest 主页或对象详情」接口(pinterest/profile)写一个数据采集脚本。

接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 pinterest,action 填 profile,参数放在 params 里。
- 必填参数:
  - username:profile / user_posts / boards 的 Pinterest 用户短名,可带开头的 @;此字段不解析完整主页 URL。
- 返回一个对象,主要字段:user_id、username、name、bio、avatar_url、follower_count、following_count、pin_count(Pin 数)、board_count(画板数)、video_count(视频数)、website、is_verified;一共 14 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=pinterest。
- 示例请求体:
{
  "platform": "pinterest",
  "action": "profile",
  "params": {
    "username": "pinterest"
  }
}
- 计费:$1.39 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。

写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。

请求参数

#
参数名位置类型必填默认值说明
Authorizationheaderstring是-Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。
platformbodystring是pinterest平台标识,固定值。
actionbodystring是profile能力标识,固定值。
usernamebody.paramsstring是-profile / user_posts / boards 的 Pinterest 用户短名,可带开头的 @;此字段不解析完整主页 URL。

代码示例

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "pinterest",
  "action": "profile",
  "params": {
    "username": "pinterest"
  }
}'

OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。

响应示例

#
2026年9月26日 16:56(北京时间)用上方代码示例的参数真实调用所得。results 与 count 是那次的真实返回,已隐去名字、账号、头像、主页链接、联系方式等个人信息;id、billing、quota 每次调用都不同,只给结构。
json
{  "id": "req_…",  "platform": "pinterest",  "action": "profile",  "results": {    "user_id": "•••",    "username": "pinterest",    "name": "Pinterest",    "bio": "Find your reason to go offline. 📌",    "avatar_url": "https://i.pinimg.com/•••",    "follower_count": 6264682,    "following_count": 396,    "pin_count": 96710,    "board_count": 136,    "video_count": 0,    "website": "http://www.pinterest.com",    "is_verified": true,    "is_private": false,    "created_at": "2012-08-16T06:25:03+00:00",    "platform": "pinterest"  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

返回字段

#

业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。

字段含义
user_id用户在原平台的唯一 ID。
username用户名(@handle)。
name名称。用于账号/商品/商家类能力,指该对象本身的名字。
bio个人简介,账号自己填写的文本。可能含换行和 emoji。
avatar_url头像图片链接。部分平台给的是带尺寸参数的 CDN 链接,可能有时效。
follower_count粉丝数。null 表示不公开,不等于 0。
following_count关注数。null 表示不公开,不等于 0。
pin_countPin 数。
board_count画板数。
video_count视频数。
website账号或商家填写的外链网址。
is_verified是否为平台认证账号(蓝V等)。null 表示无法判定。
is_private是否私密。
created_at创建时间,格式同 posted_at。
platform数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。

错误与计费

#
401
缺少 Key 或 Key 无效。
402
余额不足,先充值。
422
参数名或取值不对,按错误信息给的候选改;不扣费。
429
超过每分钟请求上限,按 Retry-After 等待后再试。
503
暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
200 空结果
没有数据,不扣费。

错误码

Google Analytics 同意才加载 隐私