Gallery Structured API
How the Gallery Structured Data API Works
The Gallery Structured Data API follows a server-side workflow. When an AI crawler or search engine bot visits your page, your server calls this API to retrieve structured data markup and embeds it directly into the HTML response before returning it to the crawler.
Workflow
- Crawler visits your page — A search engine crawler (Googlebot) or AI engine (GPTBot, ClaudeBot, PerplexityBot) requests your product detail page, homepage, or category page.
- Server reads User-Agent header — Your server examines the
User-Agentheader from the incoming request to determine if the visitor is a crawler. - User-Agent validated against known crawlers — The header is checked against known search engine and AI crawler identifiers (e.g.,
Googlebot,GPTBot,ClaudeBot,PerplexityBot). - Server calls Gallery Structured Data API — If the User-Agent matches a known crawler, your server calls the Gallery Structured Data API at
edge.curalate.com/v1/structured-data/content, forwarding the original crawler's User-Agent via theBv-Forwarded-User-Agentheader. - Embed response into HTML — The API returns structured data markup (JSON-LD by default). Your server embeds this directly into the HTML
<head>section before returning the page to the crawler.
If no crawler is detected, the page renders normally with client-side JavaScript handling the visual gallery display for human visitors.
Block bad bots viarobots.txtor WAF rules before requests reach your pages. This API should only receive legitimate crawler traffic—do not call it for every page view.
Content Types
| Content Type | Description |
|---|---|
| Images | Static image content from social media (ex. Instagram posts) and uploaded brand media. Returned as Schema.org ImageObject with full-resolution URLs, thumbnails, creator info, engagement metrics, and tagged products. |
| Videos | Video content from Instagram Reels, TikTok, YouTube, and other sources. Returned as Schema.org VideoObject with video URLs, poster thumbnails, creator attribution, and interaction statistics. |
Response Formats
| Accept Header Value | Description |
|---|---|
text/javascript (default) | Returns JSON-LD wrapped in <script type="application/ld+json"> tags. Ready to embed directly into your HTML <head> without modification. |
application/ld+json | Returns raw JSON-LD objects without script wrappers. Use when you need to programmatically manipulate the data before embedding. |
text/html | Returns HTML with Schema.org Microdata attributes. Fallback for environments that cannot use JSON-LD. |
Anti-Cloaking Requirement
Search engines penalize "cloaking" — showing different content to crawlers vs. humans. To avoid penalties:
- Use the same
dataSourceIdas your frontend C&C widget - Use the same
filterexpression as your frontend widget - Use the same
limit, Sort(or fewer items) as your frontend displays - If your widget filters by network source, use the same
networkSource
Example: If your frontend widget shows 8 Instagram posts filtered by productId:SKU123, your API call should use filter: productId:SKU123 with limit: 8.
Updated 25 days ago
