# Pinterest 广告素材 API (pinterest.ads)

- Canonical page: [https://everyinfra.com/pinterest-api/ads](https://everyinfra.com/pinterest-api/ads?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "pinterest", "action": "ads", "params": {...}}
- Price: $0.001597 per call ($1.6 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 25 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=pinterest&action=ads

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| country | enum: at / be / bg / br / cy / cz / de / dk / ee / es / fi / fr / gr / hr / hu / ie / it / lt / lu / lv / mt / nl / no / pl / pt / ro / se / si / sk / tr | yes | not declared | 广告投放的国家，两位代码：AT、BE、BG、BR、CY、CZ、DE、DK、EE、ES、FI、FR、GR、HR、HU、IE、IT、LT、LU、LV、MT、NL、NO、PL、PT、RO、SE、SI、SK、TR。 |
| advertiser | not declared | no | not declared | 只要这个广告主的广告，名字照 advertiser_search 返回的写。 |
| age | enum: 18-24 / 25-34 / 35-44 / 45-49 / 50-54 / 55-64 / 65+ | no | not declared | 只要投给这个年龄段的：18-24、25-34、35-44、45-49、50-54、55-64、65+，只能选一个。 |
| end_date | not declared | no | not declared | 到哪天（YYYY-MM-DD），和 start_date 最多差 31 天；不传是今天（UTC），只传了 start_date 时是它往后 30 天（不超过今天）。要更长分几段查。 |
| gender | enum: female / male | no | not declared | 只要投给这个性别的：female 或 male。 |
| page_token | not declared | no | not declared | 翻页令牌：第一页不传；把上一页回包里的 next_page_token 原样传回拿下一页，其余参数和第一页一样。每页算一次调用。 |
| start_date | not declared | no | not declared | 从哪天（YYYY-MM-DD），最早是一年前再往前一天；不传是 end_date 往前 30 天。投放日子和这段时间有重叠的广告都算。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| advertiser_names | 广告主名字；ads 列表里一般没有，要的话拿 id 查 ad_detail。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| description | 简介或描述，通常比 text 短。 |
| creator_name | 原创作者的昵称。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| video_url | 视频链接。 |
| start_date | 开始的日子（YYYY-MM-DD）：trend_reports 里是报告时间段的第一天，ads、ad_detail 里是投放开始的那天。 |
| end_date | 结束的日子（YYYY-MM-DD）：trend_reports 里是报告时间段的最后一天，ads、ad_detail 里是投放结束的那天。 |
| countries | 投放的国家。 |
| regions | 投放的地区。 |
| metros | 投放的城市。 |
| postal_codes | 投放的邮编。 |
| has_excluded_locations | 是否排除了某些地点。 |
| age_buckets | 投放的年龄段。 |
| genders | 投放的性别。 |
| interests | 投放的兴趣。 |
| audience_list_types | 用到的受众名单类型。 |
| devices | 投放的设备。 |
| internet_service_providers | 投放的网络运营商。 |
| has_keywords | 是否用了关键词定向。 |
| has_negative_keywords | 是否用了否定关键词。 |
| reach_by_country | 各国的覆盖人数档：键是国家，值是平台给的档位（如 0 - 10000）。 |
| reach_eu_label | 在欧盟的覆盖人数档（如 0 - 10000）。 |
| is_commercial | 是否商业内容。 |
| is_local_inventory | 是否本地库存广告。 |
| review_status | 审核情况。 |
| violation_source | 违规是怎么发现的。 |
| violation_decision_means | 违规是怎么判定的。 |
| statement_of_reasons | 处理理由说明。 |
| rank | 这一行在榜单或结果里的名次，从 1 开始；榜单口径（按什么排、统计多久）以能力说明为准。 |
| collected_at | 这条数据的抓取时刻（ISO 8601，UTC）。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```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": "ads",
  "params": {
    "country": "de"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "pinterest",
        "action": "ads",
        "params": {
            "country": "de",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "pinterest",
  "action": "ads",
  "results": [
    {
      "id": …,
      "advertiser_names": …,
      "title": …,
      "description": …,
      "creator_name": …,
      "image_url": …,
      "video_url": …,
      "start_date": …,
      "end_date": …,
      "countries": …,
      "regions": …,
      "metros": …,
      "postal_codes": …,
      "has_excluded_locations": …,
      "age_buckets": …,
      "genders": …,
      "interests": …,
      "audience_list_types": …,
      "devices": …,
      "internet_service_providers": …,
      "has_keywords": …,
      "has_negative_keywords": …,
      "reach_by_country": …,
      "reach_eu_label": …,
      "is_commercial": …,
      "is_local_inventory": …,
      "review_status": …,
      "violation_source": …,
      "violation_decision_means": …,
      "statement_of_reasons": …,
      "rank": …,
      "collected_at": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=pinterest
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
