1. Zero-Download Color Genome & Moodboard Clustering
Traditional computer-vision pipelines download gigabytes of JPEGs to extract k-means RGB clusters. PinData API ships pre-extracted hex swatches inside the JSON payload.
- Palette Summary Header: Read data.dominant_palette_summary on /v1/pins/search for an instant 4-swatch collection summary across the entire search query.
- Per-Card 5-Swatch Harmony: Use pin.palette_hex (5 hex strings) to generate CSS gradients, match complementary products in your catalog, or render interactive click-to-copy color chips.
- Cross-Domain Travel & Interior Matching: Match a user's saved interior moodboard hex palette from /v1/boards/search against boutique stays in /v1/stays/search.
Aggregate Dominant Hex Swatches & Top Merchant Domains
Rank trending hex tones and outbound retail domains across any aesthetic category in 15 lines of code.
curl "https://api.pindataapi.com/v1/pins/search?query=japandi+ceramic+vase&limit=20" \
-H "x-api-key: pn_live_your_api_key"from collections import Counter
import requests
res = requests.get(
"https://api.pindataapi.com/v1/pins/search",
params={"query": "japandi ceramic vase", "limit": 20},
headers={"x-api-key": "pn_live_your_api_key"},
timeout=20,
).json()
pins = res["data"]["pins"]
top_colors = Counter(p["dominant_color"] for p in pins).most_common(5)
top_merchants = Counter(p["merchant_domain"] for p in pins if p["merchant_domain"]).most_common(5)
print("Top Hex Swatches:", top_colors)
print("Top Merchants:", top_merchants)const res = await fetch(
"https://api.pindataapi.com/v1/pins/search?query=japandi+ceramic+vase&limit=20",
{ headers: { "x-api-key": process.env.PINDATA_API_KEY } }
);
const { data } = await res.json();
const merchants = data.pins.map((p: any) => p.merchant_domain).filter(Boolean);
console.log("Summary Palette:", data.dominant_palette_summary, "Merchants:", merchants);{
"code": 0,
"status": "ok",
"data": {
"query": "japandi ceramic vase",
"dominant_palette_summary": ["#D4A373", "#C9B096", "#867F73", "#2A9D8F"],
"count": 20
}
}2. Connecting Claude, Cursor & Custom Agents via Remote MCP
Point any MCP-compatible AI client to https://mcp.pindataapi.com/v1/mcp (OAuth 2.1) or https://api.pindataapi.com/mcp (x-api-key header) to give LLMs real-time visual eyes.
Once connected, an AI creative director or travel concierge can chain pins_search -> boards_search -> users_profile -> stays_search autonomously in a single prompt.
Start prototyping immediately with 12,000 instant free credits at /signup, or explore our browser-based /tools/pinterest-color-palette-extractor.
Interactive Studio Workbench · Interactive Studio
Verify real-time latency, credit math & JSON schema
Frequently Asked Questions
- Can I test dominant hex color extraction in the browser without writing code?
- Yes — try our free interactive /tools/pinterest-color-palette-extractor or switch between all 4 visual & stay streams right on the pindataapi.com homepage Masonry Studio.
- Are image URLs returned at full original resolution?
- Yes. Every pin includes both the high-resolution original image_url (e.g., 1080×1620 or 1825×2738) and a fast-loading 236px thumbnail_url alongside exact pixel width and height.