# Pinterest 关键词人群 API (pinterest.keyword_audience)

- Canonical page: [https://everyinfra.com/pinterest-api/keyword_audience](https://everyinfra.com/pinterest-api/keyword_audience?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "pinterest", "action": "keyword_audience", "params": {...}}
- Price: $0.016 per call ($16 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- 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=keyword_audience

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 英文关键词（不分大小写，最多 100 个字）；返回近一年搜这个词的人的年龄、性别占比。太冷的词没有数据，返回空结果、不扣费。 |
| region | enum: ar / au+nz / br / ca / co / cr+do+ec+gt+pe / cy+cz+gr+hu+mt+pl+ro+sk / de / de+at+ch / eg / es / fr / gb+ie / id / in / it / it+es+pt+gr+mt / kr / mx / mx+ar+co+cl / my / nl+be+lu / ph / pl+ro+hu+sk+cz / sa / se+dk+fi+no / th / tr / us | no | not declared | 地区，不传是 US（美国）。可选：US、CA、GB+IE、DE、DE+AT+CH、FR、IT、ES、IT+ES+PT+GR+MT、SE+DK+FI+NO、NL+BE+LU、PL+RO+HU+SK+CZ、CY+CZ+GR+HU+MT+PL+RO+SK、MX、AR、CO、MX+AR+CO+CL、CR+DO+EC+GT+PE、BR、AU+NZ、KR、ID、IN、MY、PH、TH、SA、EG、TR。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| keyword | 关键词：search_suggest 里是联想出的词（推荐账号的行是账号名）；search_refinements、keyword_audience 里是问的那个词；related_keyword_trends 里是相关的搜索词。 |
| age_distribution | 各年龄段的占比（百分数），键是 18-24、25-34、35-44、45-49、50-54、55-64、65+。 |
| gender_distribution | 各性别的占比（百分数），键是 female、male、unspecified。 |
| date | 平台数据最新到哪天（YYYY-MM-DD），一般比今天早几天。 |
| period_days | 占比统计的天数（365 就是近一年）。 |
| 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": "keyword_audience",
  "params": {
    "keyword": "home decor"
  }
}'
```

```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": "keyword_audience",
        "params": {
            "keyword": "home decor",
        },
    },
    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": "keyword_audience",
  "results": {
    "keyword": …,
    "age_distribution": …,
    "gender_distribution": …,
    "date": …,
    "period_days": …,
    "collected_at": …,
    "platform": …
  },
  "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
