接口说明

Pinterest Home API 获取 Pinterest 主页资料及首屏作品数据。

使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。

请求URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/pinterest-home

请求头

参数名参数值类型说明
Content-Typeapplication/jsonstring数据格式
AuthorizationBearer xxxstring认证凭证

采集最长约75秒,客户端超时建议设为90秒。

请求参数

参数必填类型说明
targetYesstring主页链接; 也可直接传用户名 (可带 @)

仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。

附带首屏作品;更多作品请使用对应作品接口(如提供)。

响应值

返回值类型说明
codeinteger状态码,0 表示成功
messagestring响应信息,成功时为 ok
pointCostnumber本次请求实际消耗的积点
dataobject返回数据,结构见下表
metaobject请求标识及耗时(毫秒)
billingobject计费条数、单价及规则版本

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“home”]
profileobjectProfile
worksobject[]主页首屏 Pin (不翻页)

data.profile 字段说明

返回值类型说明
accountIdstring | null用户 id
userIdstring | null用户 id (同 accountId)
usernamestring | null用户名
nicknamestring | null显示名, 没有时用用户名
fullNamestring | null全名
firstNamestring | null名
profileUrlstring主页链接
avatarstring | null头像 (大图)
followersCountnumber | null粉丝数
followingCountnumber | null关注数
postsCountnumber | nullPin 数
biostring | null简介
registerTimeobject注册时间
isPrivateboolean是否私密主页
verifiedboolean是否认证商家
contactEmailstring | null从简介里提取的邮箱
externalLinksstring[]外链 (网站 / 域名 / Impressum / Instagram)
boardCountnumber | null画板数
websiteUrlstring | null个人网站
domainUrlstring | null认领的域名
domainVerifiedboolean域名是否已验证
instagramUsernamestring | null绑定的 Instagram 用户名
targetUrlstring请求的链接

data.profile.registerTime 字段说明

返回值类型说明
textstring | null原文 (RFC 2822)
timestampnumber | null毫秒时间戳
isostring | nullISO 时间

data.works[] 字段说明

返回值类型说明
workIdstringPin id
pinIdstringPin id (同 workId)
workTypestring作品类型
可用值: [“pin”]
urlstringPin 链接
titlestring | null标题
contentstring | null描述
descriptionstring | null描述 (同 content)
coverstring | null封面图 (736 宽)
imagestring | null图片 (同 cover)
imageWidthnumber | null图片宽
imageHeightnumber | null图片高
commentsnumber | null评论数; 主页首屏通常不给
repinCountnumber | null保存数; 主页首屏通常不给
createdAtstring | null发布时间原文 (RFC 2822)
publishedAtnumber | null发布时间毫秒时间戳
linkstring | null外链
linkDomainstring | null外链域名
isVideoboolean是否视频
dominantColorstring | null主色
reactionCountsobject | null按表情类型的回应数
boardobject | null所在画板 (上游原样)

请求示例

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/pinterest-home \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://www.pinterest.com/nasa/"
}'

返回示例

下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "home",
    "profile": {
      "accountId": "142567281862381039",
      "userId": "142567281862381039",
      "username": "nasa",
      "nickname": "NASA",
      "fullName": "NASA",
      "firstName": "NASA",
      "profileUrl": "https://www.pinterest.com/nasa/",
      "avatar": "https://i.pinimg.com/280x280_RS/37/a1/75/37a175e6d2431425576f0b8f81389394.jpg",
      "followersCount": 556594,
      "followingCount": 5,
      "postsCount": 10554,
      "bio": "Explore the universe and discover our home planet with the official NASA boards on Pinterest. Visit us at www.nasa.gov",
      "registerTime": {
        "text": "Mon, 05 Mar 2012 16:37:07 +0000",
        "timestamp": 1330965427000,
        "iso": "2012-03-05T16:37:07.000Z"
      },
      "isPrivate": false,
      "verified": false,
      "contactEmail": null,
      "externalLinks": [
        "http://www.nasa.gov/"
      ],
      "boardCount": 82,
      "websiteUrl": "http://www.nasa.gov/",
      "domainUrl": "https://www.nasa.gov",
      "domainVerified": true,
      "instagramUsername": null,
      "targetUrl": "https://www.pinterest.com/nasa/"
    },
    "works": [
      {
        "workId": "142567144449081155",
        "pinId": "142567144449081155",
        "workType": "pin",
        "url": "https://www.pinterest.com/pin/142567144449081155/",
        "title": null,
        "content": null,
        "description": null,
        "cover": "https://i.pinimg.com/736x/bb/a1/e7/bba1e7fb6fe37433e1314ad3cf4e3434.jpg",
        "image": "https://i.pinimg.com/736x/bb/a1/e7/bba1e7fb6fe37433e1314ad3cf4e3434.jpg",
        "imageWidth": 736,
        "imageHeight": 1104,
        "comments": null,
        "repinCount": null,
        "createdAt": null,
        "publishedAt": null,
        "link": null,
        "linkDomain": null,
        "isVideo": false,
        "dominantColor": "#efbd8a",
        "reactionCounts": null,
        "board": null
      }
    ]
  },
  "meta": {
    "requestId": "pg-audit-r1-pinterest-home-1793954239275631000",
    "durationMs": 5888
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

每份主页资料消耗 0.8 积点,附带作品免费。

空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

在线调试