Skip to main content

AI Search with Product Listing Ads - Technical Overview

⚠️ Important: This use case demonstrates visual product cards displayed separately from LLM text, not text woven into LLM responses. For LLM text weaving, see AI Search Monetization (LLM Weaving).

📺 Live Demo: See this implementation in action at https://demo-aura.affinity.net/ai-search-pla

Executive Summary

This document outlines how AI publishers can integrate visual product listing ads into search results using standard IAB Native Ads 1.2 format. When users search for products on your AI platform, the system displays structured product cards with images, prices, and CTAs positioned above or alongside the LLM-generated answer.

Key Distinction: These are visual product ads displayed separately, not text recommendations woven into the LLM response. The LLM provides informational content, while product ads are rendered as distinct visual elements using IAB Native Ads 1.2 specification.

Key Benefits:

  • Visual Product Cards: Structured ads with images, prices, merchant info, and CTAs displayed above LLM response
  • Clear Separation: LLM provides informational content; product ads are displayed separately as visual cards
  • Industry Standard: Uses OpenRTB 2.6 + IAB Native Ads 1.2 specification
  • Easy Integration: Works with existing ad tech ecosystem (DSPs, SSPs, ad servers)
  • Performance-Based: Revenue from clicks and conversions, not just impressions
  • Privacy-First: Contextual targeting without PII requirements
  • Responsive Design: Adapts to desktop (4-column), tablet (2-column), and mobile (1-column)

Compare With:

Use Case Example

User Query: "What are the best wireless headphones under $200 for working out?"

AI Response (Text Answer):

Here are excellent wireless headphones under $200 perfect for workouts:

For workouts, you'll want headphones with:
- IPX4 or higher water resistance for sweat protection
- Secure fit with ear hooks or wingtips
- Good battery life (6+ hours)
- Active noise cancellation to block gym noise

Key features to consider: secure fit technology, sweat resistance rating,
battery life, and sound quality during movement.

Product Listing Ads (Visual Display):

Above the text answer, visual product cards are displayed:

┌─────────────────────────────────────┐
│ [Product Image] │
│ Sony WF-1000XM4 │
│ $178.00 │
│ Amazon │
└─────────────────────────────────────┘

┌─────────────────────────────────────┐
│ [Product Image] │
│ Jabra Elite 7 Active │
│ $149.99 │
│ Best Buy │
└─────────────────────────────────────┘

┌─────────────────────────────────────┐
│ [Product Image] │
│ Beats Fit Pro │
│ $199.95 │
│ Apple Store │
└─────────────────────────────────────┘

User Interaction:

  • Product listing ads are displayed above the LLM response as visual cards
  • LLM provides informational answer (text-based, no product mentions)
  • Each product card shows: image, title, price, merchant
  • Entire card is clickable and navigates to the merchant's product page
  • Clear visual separation between informational content and sponsored products

Why IAB Native Ads for Product Listing Ads?

1. Industry Standard

  • Built on OpenRTB 2.6 and IAB Native Ads 1.2 specification
  • No custom integrations needed for each retailer or brand
  • Works with existing ad tech ecosystem (DSPs, SSPs, ad servers)
  • Broad support across the advertising industry

2. Structured Visual Presentation

  • Retailers provide structured product data via native assets
  • Products are displayed as visual cards, not text in LLM responses
  • Standard asset types ensure consistency and quality

3. Privacy-First Design

  • No PII required in bid requests
  • Contextual targeting based on search intent and product categories
  • GDPR/CCPA compliant by design

4. Rich Analytics

  • Track impressions (when product appears in results)
  • Track clicks (when users view product details)
  • Track conversions (when users make purchases)
  • Standard tracking mechanisms across all publishers

5. Quality Control

  • IAB Native specification defines asset requirements
  • Validation ensures quality before serving
  • Your platform decides which products to display based on relevance

Architecture Overview

Key Points:

  • AI Publisher provides the LLM - The LLM is part of the AI publisher's platform and generates informational content only (no involvement with ads)
  • Affinity AI Bid API provides product ads - standard OpenRTB auction
  • Publisher combines both - displays product cards above LLM answer
  • Standard tracking - impression and click tracking via OpenRTB

IAB Native Ads Asset Mapping

Product Listing Native Assets

Following IAB Native Ads 1.2 specification, product listings use these standard asset types:

Required Assets:

IAB Asset TypeIDData TypePurpose
Title1-Product name
Image (Main)2type: 3Product image
Data (Price)3type: 3Product price

Optional Assets:

IAB Asset TypeIDData TypePurpose
Data (Desc)4type: 2Product description
Data (Sponsor)5type: 1Merchant/brand name
Data (CTA)6type: 12Call-to-action text

Note: The demo implementation uses a flexible asset mapping that checks both asset IDs and data types for compatibility with different bidders.

Native Request Structure

The native request follows IAB Native Ads 1.2 specification:

{
"ver": "1.2",
"assets": [
{
"id": 1,
"required": 1,
"title": {
"len": 100
}
},
{
"id": 2,
"required": 1,
"img": {
"type": 3,
"w": 300,
"h": 250
}
},
{
"id": 3,
"required": 1,
"data": {
"type": 3,
"len": 50
}
},
{
"id": 4,
"required": 0,
"data": {
"type": 2,
"len": 200
}
},
{
"id": 5,
"required": 0,
"data": {
"type": 1,
"len": 50
}
},
{
"id": 6,
"required": 0,
"data": {
"type": 12,
"len": 30
}
}
]
}

Key Points:

  • Asset ID 1: Product title (required, max 100 chars)
  • Asset ID 2: Product image (required, 300x250px, type 3 = main image)
  • Asset ID 3: Price (required, max 50 chars, data type 3 = price)
  • Asset ID 4: Description (optional, max 200 chars, data type 2 = description)
  • Asset ID 5: Merchant name (optional, max 50 chars, data type 1 = sponsored by)
  • Asset ID 6: CTA text (optional, max 30 chars, data type 12 = CTA)

OpenRTB Integration

Note: We use standard OpenRTB 2.6 with IAB Native Ads 1.2 for product listings. Context enhancement extensions are optional and can improve targeting.

Determining Number of Product Listings

Publishers control how many product listing ads to request and display by including multiple impression objects in the bid request. Each impression represents one product listing ad slot.

Best Practices:

  • Start with 2-3 product slots for most product searches
  • Increase to 4-5 for high-intent queries (e.g., "buy", "price", "best")
  • Reduce to 1-2 for informational queries
  • Monitor fill rates and adjust floor prices accordingly
  • Consider implementing a minimum relevance threshold

Protocol Mechanics: Requesting Multiple PLAs

How to Request Multiple Product Slots:

Include one impression object per desired product slot in your bid request. Each impression represents one product listing ad opportunity.

{
"id": "search-req-002",
"imp": [
{"id": "imp-1", "native": {...}},
{"id": "imp-2", "native": {...}},
{"id": "imp-3", "native": {...}}
],
"site": {...},
"device": {...}
}

What You Receive:

Affinity AI returns winning products for each impression slot. Each product in the response references its impression ID:

{
"id": "search-req-002",
"seatbid": [
{
"bid": [
{
"id": "bid-1",
"impid": "imp-1",
"price": 2.5,
"adm": "{...product 1}"
},
{
"id": "bid-2",
"impid": "imp-2",
"price": 2.3,
"adm": "{...product 2}"
},
{
"id": "bid-3",
"impid": "imp-3",
"price": 2.1,
"adm": "{...product 3}"
}
]
}
]
}

Your Control:

After receiving products from Affinity AI, you can:

  • Display All: Show all returned products
  • Filter: Apply your own relevance or quality filters
  • Limit: Display fewer products than requested (e.g., request 5, display 3)
  • Order: Sort products by price, relevance, or your own criteria
  • Diversify: Ensure variety in merchants or product types

Key Points:

  • One impression = One product slot: Request N impressions to get up to N products
  • Independent slots: Each impression can return a different product
  • Flexible display: You control which products to show and in what order
  • Standard OpenRTB: Uses standard multi-impression bid request/response

Bid Request Structure

Your platform sends standard OpenRTB 2.6 bid requests with native ad placement:

{
"id": "ai-search-req-1764002968047",
"imp": [
{
"id": "imp-1",
"native": {
"request": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":100}},{\"id\":2,\"required\":1,\"img\":{\"type\":3,\"w\":300,\"h\":250}},{\"id\":3,\"required\":1,\"data\":{\"type\":3,\"len\":50}},{\"id\":4,\"required\":0,\"data\":{\"type\":2,\"len\":200}},{\"id\":5,\"required\":0,\"data\":{\"type\":1,\"len\":50}},{\"id\":6,\"required\":0,\"data\":{\"type\":12,\"len\":30}}]}",
"ver": "1.2"
}
}
],
"site": {
"id": "ai-search-pla",
"keywords": "wireless bluetooth headphones, earbuds, audio",
"publisher": {
"id": "my-publisher-id"
}
},
"device": {
"language": "en",
"geo": {
"country": "US"
}
}
}

Key Request Components:

  • Request ID: Unique identifier for the bid request
  • Impressions: Array of impression objects (one per product slot)
  • Native Request: JSON-encoded IAB Native Ads 1.2 specification
  • Site: Publisher site information with keywords for contextual targeting. The keywords field accepts a comma-separated list — multiple keywords return ads matching any of the provided terms (e.g., "headphones, earbuds, audio" returns ads relevant to any of those three terms)
  • Device: User device and geo information for targeting

Optional Context Enhancement:

You can optionally include Affinity AI context enhancement extensions in ext.aura for improved targeting:

{
"ext": {
"aura": {
"intent": {
"value": "purchase_intent",
"confidence": 0.95,
"topics": ["consumer electronics", "audio equipment"]
},
"productContext": {
"category": "Electronics > Audio > Headphones",
"priceRange": {
"min": 0,
"max": 200,
"currency": "USD"
},
"attributes": ["wireless", "workout", "noise cancellation"]
}
}
}
}

Bid Response Structure

Retailers respond with standard IAB Native Ads 1.2 format:

{
"id": "ai-search-req-1764002968047",
"seatbid": [
{
"seat": "affilizz-products",
"bid": [
{
"id": "bid-002",
"impid": "imp-1",
"price": 2.5,
"adm": "{\"ver\":\"1.2\",\"link\":{\"url\":\"https://affilizz.top/product-url\",\"clicktrackers\":[\"https://track.example.com/click?id=123\"]},\"assets\":[{\"id\":1,\"title\":{\"text\":\"Apple iPhone 13 (512 GB) - Blau\"}},{\"id\":2,\"img\":{\"url\":\"https://m.media-amazon.com/images/I/31yhtohOT5L.jpg\",\"w\":300,\"h\":250}},{\"id\":3,\"data\":{\"type\":3,\"value\":\"899.99 EUR\"}},{\"id\":4,\"data\":{\"type\":2,\"value\":\"Premium smartphone with 512GB storage\"}},{\"id\":5,\"data\":{\"type\":1,\"value\":\"Amazon DE\"}},{\"id\":6,\"data\":{\"type\":12,\"value\":\"View Product\"}}],\"imptrackers\":[\"https://track.example.com/imp?id=123\"]}",
"adomain": ["amazon.de"],
"cid": "campaign-123",
"crid": "creative-456",
"cat": ["IAB19-6"],
"nurl": "https://track.example.com/win?price=${AUCTION_PRICE}"
}
]
}
],
"cur": "EUR"
}

Native Response Breakdown:

The adm field contains a JSON-encoded IAB Native Ads 1.2 response:

  • Link: Product URL with optional click trackers
  • Assets:
    • Asset 1 (Title): Product name - "Apple iPhone 13 (512 GB) - Blau"
    • Asset 2 (Image): Product image URL (300x250px)
    • Asset 3 (Data/Price): Price with currency - "899.99 EUR" (data type 3)
    • Asset 4 (Data/Description): Product description (data type 2)
    • Asset 5 (Data/Sponsored): Merchant name - "Amazon DE" (data type 1)
    • Asset 6 (Data/CTA): Call-to-action text - "View Product" (data type 12)
  • Impression Trackers: Array of impression tracking URLs
  • Win Notice (nurl): URL with ${AUCTION_PRICE} macro for win notification

Important: The native response can be in the adm field directly or wrapped in a native object for legacy compatibility. The demo parser handles both formats.

Product Display Integration

Important: Products Are Visual Ads, Not LLM Text

Product listing ads are displayed as visual product cards positioned ABOVE the LLM response, NOT as text within the LLM response. Your platform receives product data from Affinity AI and renders them as structured visual elements separate from any AI-generated content.

Parsing Native Ad Response

Your platform extracts product information from the IAB Native Ads 1.2 assets:

  1. Parse the JSON-encoded adm field from the bid response
  2. Handle both wrapped ({native: {...}}) and unwrapped formats
  3. Extract native assets by ID and data type:
    • Asset ID 1 (Title) → Product name
    • Asset ID 2 (Image) → Product image URL
    • Asset ID 3 (Data type 3) → Price with currency
    • Asset ID 4 (Data type 2) → Product description (optional)
    • Asset ID 5 (Data type 1) → Merchant name (optional)
    • Asset ID 6 (Data type 12) → Call-to-action text (optional, defaults to "View Product")
    • Link URL → Product page URL
    • Impression trackers → Array of tracking URLs
    • Click trackers → Array of tracking URLs
  4. Validate all URLs are HTTPS
  5. Sanitize text content to prevent XSS
  6. Render products as visual cards in your UI

Implementation Note: The demo uses flexible asset mapping that checks both asset IDs and data types for compatibility with different bidders.

Rendering Product Cards

Display each product as a visual card positioned above the LLM response:

  • Product Image: From Asset ID 2 (square 1:1 aspect ratio for consistency)
  • Product Title: From Asset ID 1 (2-line clamp for overflow)
  • Price: From Asset ID 3 (green color for emphasis)
  • Merchant: From Asset ID 5 (single line)
  • Clickable Card: Entire card is clickable, navigates to product URL

Responsive Grid Layout:

  • Desktop (1200px+): 4-column grid
  • Tablet (768-1199px): 2-column grid
  • Mobile (<768px): 1-column grid

Example Product Card Layout:

┌─────────────────────────────────────┐
│ [Product Image - Square 1:1] │
│ │
│ Sony WF-1000XM4 │
│ $178.00 │
│ Amazon │
└─────────────────────────────────────┘

Accessibility Features:

  • WCAG 2.1 AA compliant
  • Keyboard navigation (Tab, Enter, Space)
  • Screen reader support with ARIA labels
  • Focus indicators (2px blue outline)
  • High contrast mode support

Tracking Implementation

Fire tracking pixels at appropriate times using navigator.sendBeacon() with image pixel fallback:

  • Impression Trackers: When product card becomes 50% visible in viewport (Intersection Observer)
  • Click Trackers: When user clicks on product card (max 200ms wait before navigation)
  • Win Notice (nurl): Immediately after receiving bid response with ${AUCTION_PRICE} macro replaced

Implementation Details:

  • Uses Intersection Observer API with 0.5 threshold (50% visibility)
  • Fires impression only once per product per session (tracked in sessionStorage)
  • Fires impression before click if not already fired
  • All tracking URLs validated as HTTPS
  • Graceful degradation if tracking fails

User Experience Flow

1. Search Results Display

  • User enters search query in search box
  • Product listing ads are displayed ABOVE the LLM response as visual cards
  • Each product card shows: square image, title (2-line clamp), price (green), merchant
  • Entire card is clickable for better UX
  • Clear visual separation between product ads and informational content
  • Responsive grid adapts to screen size (4/2/1 columns)
  • Loading skeleton shown while fetching products

2. Click to Product Page

  • User clicks anywhere on product card
  • Click trackers fire (max 200ms wait)
  • Opens product URL in new tab
  • Impression tracker fires first if not already fired
  • User lands on merchant site to complete purchase

3. Tracking Events

  • Impression: Fired when product becomes 50% visible in viewport (once per session)
  • Click: Fired when user clicks product card (max 200ms delay)
  • Win Notice: Fired immediately after bid response with auction price

4. Error Handling

  • Graceful degradation if no products returned
  • Error message displayed if API fails
  • No mock data fallback - real API only

Benefits for AI Publishers

Revenue Generation

  • Performance-Based: Revenue tied to clicks and conversions
  • High Intent: Product searches indicate strong purchase intent
  • Premium CPCs: Product listing ads command premium rates
  • Standard Tracking: Industry-standard impression and click tracking

User Experience

  • Clear Separation: Informational content separate from product ads
  • Visual Product Cards: Products displayed as structured visual elements above LLM response
  • Relevant: Context enhancement ensures product relevance
  • Helpful: Users get both educational content and shopping options
  • Transparent: Clear presentation as sponsored products per IAB guidelines

Technical Advantages

  • Industry Standard: OpenRTB 2.6 + IAB Native Ads 1.2
  • Easy Integration: Works with existing ad tech infrastructure
  • Separation of Concerns: LLM generates content; UI renders product ads
  • Scalable: Handle millions of product searches per day
  • Broad Support: Compatible with all major ad platforms

Analytics & Optimization

  • Standard Metrics: Track impressions, clicks via IAB mechanisms
  • A/B Testing: Test different presentation strategies
  • Performance Data: Optimize based on click-through rates
  • Revenue Reporting: Standard programmatic advertising metrics

Implementation Considerations

Quality Control

  • Relevance Threshold: Only show highly relevant products
  • Asset Validation: Ensure all required native assets are present (title, image, price)
  • HTTPS Validation: All URLs (images, product links, trackers) must be HTTPS
  • XSS Prevention: Sanitize all text content before rendering
  • Image Quality: Validate image URLs are accessible
  • Flexible Parsing: Handle both wrapped and unwrapped native response formats
  • Performance: Target <50ms per product parsing

Privacy & Compliance

  • No PII Required: Contextual targeting only
  • GDPR Compliant: User consent management
  • CCPA Compliant: Privacy string support
  • IAB Guidelines: Follow IAB Native Ads disclosure requirements
  • Sponsored Labels: Clearly mark products as sponsored/ads

Performance

  • Low Latency: 5000ms timeout for development (500ms recommended for production)
  • Image Optimization: Use lazy loading for product images
  • Async Tracking: Fire tracking pixels asynchronously with sendBeacon
  • Graceful Degradation: Handle no-bid responses gracefully
  • Performance Targets:
    • Bid request construction: <10ms
    • Bid API response: <500ms (production)
    • Product parsing: <50ms per product
    • Impression tracking: <100ms
    • Click tracking: <50ms
    • Page load: <2s complete SERP

Native Ad Parsing

  • JSON Parsing: Properly parse JSON-encoded adm field
  • Format Compatibility: Handle both wrapped ({native: {...}}) and unwrapped formats
  • Flexible Asset Mapping: Check both asset IDs and data types for compatibility
  • Error Handling: Handle missing or malformed assets gracefully
  • Validation: Validate native response structure and required fields
  • HTTPS Enforcement: Reject non-HTTPS URLs
  • XSS Prevention: Sanitize all text content
  • No Fallback: Real API only, no mock data

Demo Implementation

A complete working demo is available at https://demo-aura.affinity.net/ai-search-pla:

Features:

  • Real Affinity AI Bid API integration (no mock data)
  • 8 pre-defined audio product search queries
  • IAB Native Ads 1.2 format parsing
  • Responsive product grid (4/2/1 columns)
  • Intersection Observer impression tracking
  • Click tracking with sendBeacon
  • WCAG 2.1 AA accessibility compliance

Demo Limitations:

  • Simulated LLM response (static Bluetooth headphones content)
  • Pre-defined search queries (8 headphones/earbuds searches)
  • Mock intent detection

Real Implementation:

  • Affinity AI Bid API integration
  • OpenRTB 2.6 protocol
  • IAB Native Ads 1.2 parsing
  • Impression/click tracking
  • Product data from real merchants

OpenRTB Components

Context Enhancement

External Standards

Version History

  • v1.1 (2025-12-12): Updated based on demo implementation
    • Corrected asset IDs and data types to match actual implementation
    • Added demo implementation details and limitations
    • Updated product card positioning (above LLM response)
    • Added responsive design specifications
    • Enhanced tracking implementation details
    • Added accessibility features
    • Clarified flexible asset mapping approach
    • Added performance targets
    • Removed references to unused optional assets
  • v1.0 (2025-11-19): Initial use case guide
    • Original IAB Native Ads 1.2 specification

Conclusion

IAB Native Ads enable AI publishers to monetize product searches through standard, visual product listing ads. This approach ensures:

  • Industry Standard: OpenRTB 2.6 + IAB Native Ads 1.2
  • Easy Integration: Works with all major ad platforms
  • Clear Separation: LLM provides informational content; product ads are displayed as visual cards above the response
  • Quality Experience: Educational content plus relevant product options
  • Strong Revenue: Performance-based monetization
  • Visual Product Ads: Structured product cards, not text in LLM responses
  • Context Enhancement: Optional rich targeting signals improve relevance
  • Responsive Design: Adapts to all screen sizes
  • Accessibility: WCAG 2.1 AA compliant

By using standard IAB Native Ads 1.2 with optional context enhancement, you can generate revenue from product searches while maintaining a high-quality user experience, clear separation between content and advertising, and broad compatibility with the advertising ecosystem.