# Pinterest 加密编号换图钉编号 API (pinterest.resolve_pin)

- Canonical page: [https://everyinfra.com/pinterest-api/resolve_pin](https://everyinfra.com/pinterest-api/resolve_pin?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "pinterest", "action": "resolve_pin", "params": {...}}
- Price: $0.000556 per call ($0.56 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=resolve_pin

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 列表行里 e1_ 开头的加密编号（search、board_pins、section_pins、product_search、similar_pins 的 id），或用它拼的 /pin/e1_…/ 链接。 |
| image_url | not declared | yes | not declared | 必填：那一行 image_urls 的第一个（视频图钉给 thumbnail_url）。 |
| username | not declared | yes | not declared | 必填：那一行的 author_username。 |
| board_url | not declared | no | not declared | 那一行的 board_url，可不传；传了先在这个画板里找，更快。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| pin_id | 数字的图钉编号：resolve_pin 里是加密编号换出的编号，能拿去给 pin、comments；comments 里是评论所在的图钉，只在请求传了 url 时有。 |
| encrypted_id | 换成数字编号的那个 e1_ 加密编号。 |
| url | 该记录在原平台上的可访问链接。 |
| 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": "resolve_pin",
  "params": {
    "url": "<E1_ID>",
    "image_url": "<IMAGE_URL>",
    "username": "<AUTHOR_USERNAME>"
  }
}'
```

```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": "resolve_pin",
        "params": {
            "url": "<E1_ID>",
            "image_url": "<IMAGE_URL>",
            "username": "<AUTHOR_USERNAME>",
        },
    },
    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": "resolve_pin",
  "results": {
    "pin_id": …,
    "encrypted_id": …,
    "url": …,
    "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
