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

  1. Crawler visits your page — A search engine crawler (Googlebot) or AI engine (GPTBot, ClaudeBot, PerplexityBot) requests your product detail page, homepage, or category page.
  2. Server reads User-Agent header — Your server examines the User-Agent header from the incoming request to determine if the visitor is a crawler.
  3. User-Agent validated against known crawlers — The header is checked against known search engine and AI crawler identifiers (e.g., Googlebot, GPTBot, ClaudeBot, PerplexityBot).
  4. 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 the Bv-Forwarded-User-Agent header.
  5. 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 via robots.txt or 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 TypeDescription
ImagesStatic 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.
VideosVideo 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 ValueDescription
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+jsonReturns raw JSON-LD objects without script wrappers. Use when you need to programmatically manipulate the data before embedding.
text/htmlReturns HTML with Schema.org Microdata attributes. Fallback for environments that cannot use JSON-LD.

Anti-Cloaking Requirement

The gallery content returned by this API must match what human visitors see on your page.

Search engines penalize "cloaking" — showing different content to crawlers vs. humans. To avoid penalties:

  1. Use the same dataSourceId as your frontend C&C widget
  2. Use the same filter expression as your frontend widget
  3. Use the same limit, Sort (or fewer items) as your frontend displays
  4. 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.




Did this page help you?