1. Paginating Public Pins & Shop-the-Look Merchant Links
Every /v1/pins/search call returns normalized visual geometry, color DNA, and outbound e-commerce attribution.
- Zero-CLS Masonry Geometry: Use width, height, and aspect_ratio ('2:3', '3:4', '9:16') together with dominant_color placeholders so cards paint instantaneously before high-res images load.
- E-Commerce Outbound Intelligence: Filter is_shoppable === true and group by merchant_domain ('etsy.com', 'garmentory.com', 'hoppeshoppe.com', Shopify stores) to spot breakout D2C products early.
- Multi-Rail Automatic Failover: Every request is backed by our PostgreSQL 16 + Redis DB 7 warm visual index plus dual-rail upstream failover so production pipelines stay green 24/7.
Multi-Page Cursor Pagination in Python & TypeScript
Fetch multiple pages of shop-the-look ceramic & home decor pins and filter for verified outbound merchant links.
curl "https://api.pindataapi.com/v1/pins/search?query=stoneware+lamp&limit=20" \
-H "x-api-key: pn_live_your_api_key"import os, requests
API_KEY = os.environ["PINDATA_API_KEY"]
cursor = None
shoppable_pins = []
for page in range(3):
params = {"query": "stoneware lamp", "limit": 20}
if cursor:
params["cursor"] = cursor
res = requests.get(
"https://api.pindataapi.com/v1/pins/search",
params=params,
headers={"x-api-key": API_KEY},
timeout=20,
).json()
data = res["data"]
shoppable_pins.extend([p for p in data["pins"] if p.get("merchant_domain")])
cursor = data.get("next_cursor")
if not cursor:
break
print(f"Collected {len(shoppable_pins)} shoppable pins")const headers = { "x-api-key": process.env.PINDATA_API_KEY! };
let cursor: string | null = null;
const collected = [];
for (let page = 0; page < 3; page++) {
const qs = new URLSearchParams({ query: "stoneware lamp", limit: "20" });
if (cursor) qs.set("cursor", cursor);
const res = await fetch(`https://api.pindataapi.com/v1/pins/search?${qs}`, { headers });
const { data } = await res.json();
collected.push(...data.pins);
cursor = data.next_cursor;
if (!cursor) break;
}{
"code": 0,
"status": "ok",
"data": {
"query": "stoneware lamp",
"count": 20,
"next_cursor": "Y2JVSG81V2sxcmNHRlpWM1J5...",
"dominant_palette_summary": ["#C9B096", "#D4A373", "#867F73", "#54493C"],
"pins": [
{
"pin_id": "e1_AfqPShz5xeQTD1FJZlTKN6s0JR3fUX4uFFX1KnVLp1Tp_jZHb_B2Dw",
"title": "Short Mug in Sandstone",
"width": 1825,
"height": 2738,
"aspect_ratio": "2:3",
"dominant_color": "#C5C4C4",
"palette_hex": ["#C5C4C4", "#E5E5E0", "#CFD4D9", "#C2CBC9", "#F4EFE7"],
"is_shoppable": true,
"merchant_domain": "hoppeshoppe.com"
}
]
}
}2. Enriching Creator Profiles & Curated Aesthetic Boards
Combine /v1/boards/search and /v1/users/profile to map taste-makers, interior studios, and verified retail brands.
Creator boards act as human-curated taxonomy clusters: when thousands of users save an item to boards titled 'Japandi Entryway' or 'Quiet Luxury Knitwear', board titles reveal emerging consumer vocabulary months before search-engine keyword volume catches up.
Passing any @username or pinterest.com/{username} URL to GET /v1/users/profile returns follower counts, verified merchant status, dominant brand color swatches, and recent high-performing sample pins.
Interactive Studio Workbench · GET /v1/pins/search
Verify real-time latency, credit math & JSON schema
Frequently Asked Questions
- Can I pass a full pinterest.com/pin/... URL instead of parsing the Pin ID myself?
- Yes! Both /v1/pins/details?pin_id=... and our interactive /tools/pinterest-pin-id-extractor automatically normalize full Pinterest URLs, slugged URLs (e.g., /pin/handmade-mug--424605071146337183/), and token IDs.
- Does PinData API work inside Claude, Cursor, and Windsurf AI agents?
- Yes. Connect directly to our hosted Streamable HTTP MCP server at https://mcp.pindataapi.com or install @pindataapi/mcp-server locally — see /mcp for one-click configuration.