docsGuidesProduct Feed Specification

Product Feed Specification

This guide explains how to format and deliver product data to Lorn AI for indexing and search.


Overview

The Product Feed is how merchants share their catalog with Lorn AI. A well-structured feed enables:

  • Accurate product discovery via semantic search
  • Rich product displays with images, variants, and pricing
  • Reliable checkout with up-to-date inventory

Feed Delivery

Delivery Methods

MethodDescription
PushPOST your feed to Lorn AI’s ingestion endpoint
PullHost your feed at a URL for Lorn AI to fetch

File Formats

Lorn AI accepts feeds in:

  • JSON (recommended)
  • CSV
  • TSV
  • XML

Refresh Frequency

Update TypeRecommended Frequency
Full catalogDaily
Inventory/pricingEvery 15 minutes
New productsWithin 1 hour

Feed Structure

{
  "version": "1.0",
  "generated_at": "2024-01-15T10:00:00Z",
  "products": [
    {
      "id": "prod_abc123",
      "title": "Nike Air Zoom Pegasus 40",
      "description": "Responsive cushioning meets a breathable upper for a comfortable ride mile after mile.",
      "vendor": "Nike",
      "category": "Footwear > Running > Neutral",
      "price": 129.99,
      "currency": "USD",
      "availability": "in_stock",
      "inventory_quantity": 42,
      "tags": ["running", "athletic", "cushioned"],
      "images": [
        {
          "url": "https://cdn.example.com/nike-pegasus-main.jpg",
          "alt_text": "Nike Air Zoom Pegasus 40 - Side View"
        }
      ],
      "variants": [
        {
          "sku": "nike-pegasus-40-black-10",
          "title": "Black / Size 10",
          "price": 129.99,
          "attributes": {
            "Color": "Black",
            "Size": "10"
          },
          "inventory_quantity": 8
        }
      ],
      "attributes": {
        "Material": ["Mesh"],
        "Cushioning": ["Zoom Air"]
      },
      "weight": "280g",
      "brand": "Nike",
      "link": "https://your-store.com/products/nike-pegasus-40"
    }
  ]
}

Field Reference

Required Fields

FieldTypeDescriptionExample
idstringUnique product identifierprod_abc123
titlestringProduct name (max 150 chars)Nike Air Zoom Pegasus 40
descriptionstringFull description (max 5,000 chars)Responsive cushioning...
pricenumberBase price129.99
currencystringISO 4217 currency codeUSD
availabilitystringStock statusin_stock
linkstringProduct page URLhttps://...
image_linkstringMain product image URLhttps://...
FieldTypeDescriptionExample
vendorstringBrand/manufacturerNike
categorystringCategory hierarchy (use >)Footwear > Running
tagsstring[]Product tags["running", "athletic"]
inventory_quantityintegerStock count42
brandstringBrand nameNike
gtinstringGTIN/UPC/ISBN123456789543

Media Fields

FieldTypeDescription
image_linkstringMain product image URL
additional_image_linkstring[]Additional images
video_linkstringProduct video URL

Variant Fields

FieldTypeDescription
variantsVariant[]Product variants
item_group_idstringGroups variants together

Variant Object

{
  "sku": "nike-pegasus-40-black-10",
  "title": "Black / Size 10",
  "price": 129.99,
  "currency": "USD",
  "attributes": {
    "Color": "Black",
    "Size": "10"
  },
  "inventory_quantity": 8,
  "image": "https://cdn.example.com/black-variant.jpg"
}

Pricing Fields

FieldTypeDescriptionExample
pricenumberRegular price129.99
sale_pricenumberDiscounted price99.99
sale_price_effective_datestringSale window2024-01-01/2024-01-31
currencystringCurrency codeUSD

Availability Fields

FieldTypeValues
availabilitystringin_stock, out_of_stock, preorder
inventory_quantityintegerStock count
availability_datestringFor preorder items (ISO 8601)

Shipping & Fulfillment

FieldTypeDescriptionExample
shippingstringFormat: country:region:method:priceUS:CA:Ground:7.99 USD
weightstringProduct weight with unit280g
requires_shippingbooleanNeeds physical deliverytrue

Merchant Info

FieldTypeRequiredDescription
seller_namestringYesYour store name
seller_urlstringYesYour store URL
seller_privacy_policystringFor checkoutPrivacy policy URL
seller_tosstringFor checkoutTerms of service URL
return_policystringYesReturn policy URL
return_windowintegerYesDays allowed for returns

CSV Format

For CSV feeds, use these column headers:

id,title,description,price,currency,availability,link,image_link,vendor,category,tags,inventory_quantity,brand
prod_abc123,"Nike Air Zoom Pegasus 40","Responsive cushioning...",129.99,USD,in_stock,https://...,https://...,Nike,"Footwear > Running","running,athletic",42,Nike

CSV Requirements

  • UTF-8 encoding
  • First row must be headers
  • Quote fields containing commas
  • Use commas to separate multiple tags

Semantic search uses your product data to understand meaning. Optimize for better results:

Rich Descriptions

Good:

{
  "title": "Nike Air Zoom Pegasus 40",
  "description": "The Nike Air Zoom Pegasus 40 delivers responsive cushioning and a breathable mesh upper for a comfortable ride on daily training runs. Features Zoom Air units in the forefoot for energy return, making it ideal for runners seeking a versatile everyday trainer."
}

Bad:

{
  "title": "Nike Pegasus",
  "description": "Running shoe"
}

Descriptive Tags

Include terms users might search for:

{
  "tags": [
    "running shoes",
    "daily trainer",
    "cushioned",
    "neutral",
    "breathable",
    "lightweight",
    "marathon training"
  ]
}

Hierarchical Categories

Use clear category paths:

{
  "category": "Footwear > Running > Neutral > Daily Trainers"
}

Detailed Attributes

Include searchable attributes:

{
  "attributes": {
    "Upper Material": ["Engineered Mesh"],
    "Cushioning Technology": ["Zoom Air"],
    "Drop": ["10mm"],
    "Weight": ["280g"],
    "Arch Support": ["Neutral"],
    "Terrain": ["Road"]
  }
}

Variant Best Practices

Use item_group_id to link variants:

{
  "products": [
    {
      "id": "pegasus-black-10",
      "item_group_id": "pegasus-40",
      "title": "Nike Air Zoom Pegasus 40 - Black Size 10",
      "attributes": {"Color": "Black", "Size": "10"}
    },
    {
      "id": "pegasus-white-10",
      "item_group_id": "pegasus-40",
      "title": "Nike Air Zoom Pegasus 40 - White Size 10",
      "attributes": {"Color": "White", "Size": "10"}
    }
  ]
}

Variant-Specific Images

Include images for each color:

{
  "variants": [
    {
      "sku": "pegasus-black-10",
      "attributes": {"Color": "Black"},
      "image": "https://cdn.example.com/pegasus-black.jpg"
    },
    {
      "sku": "pegasus-white-10",
      "attributes": {"Color": "White"},
      "image": "https://cdn.example.com/pegasus-white.jpg"
    }
  ]
}

Validation Rules

ID Rules

RuleRequirement
Max length100 characters
UniquenessMust be unique within your catalog
StabilityDon’t change IDs for existing products
CharactersAlphanumeric, hyphens, underscores

Price Rules

RuleRequirement
FormatDecimal number
MinimumMust be > 0
Sale priceMust be ≤ regular price
CurrencyISO 4217 code

Image Rules

RuleRequirement
FormatJPEG or PNG
ProtocolHTTPS preferred
ResolutionMinimum 500x500 pixels
AccessibilityMust be publicly accessible

URL Rules

RuleRequirement
ProtocolHTTPS required for production
AccessibilityMust return HTTP 200
EncodingURL-encoded

Example: Complete Product

{
  "id": "prod_pegasus40",
  "gtin": "194501234567",
  "title": "Nike Air Zoom Pegasus 40",
  "description": "The Nike Air Zoom Pegasus 40 delivers responsive cushioning and a breathable mesh upper for a comfortable ride mile after mile. A widely loved favorite, the Pegasus returns with a familiar fit and updated midsole that provides more energy return.",
  "link": "https://your-store.com/products/nike-air-zoom-pegasus-40",
  "image_link": "https://cdn.your-store.com/images/pegasus40-main.jpg",
  "additional_image_link": [
    "https://cdn.your-store.com/images/pegasus40-side.jpg",
    "https://cdn.your-store.com/images/pegasus40-top.jpg"
  ],
  "vendor": "Nike",
  "brand": "Nike",
  "category": "Footwear > Running > Neutral",
  "price": 129.99,
  "sale_price": 99.99,
  "sale_price_effective_date": "2024-01-01/2024-01-31",
  "currency": "USD",
  "availability": "in_stock",
  "inventory_quantity": 42,
  "condition": "new",
  "tags": ["running", "athletic", "cushioned", "daily trainer", "neutral"],
  "attributes": {
    "Material": ["Mesh"],
    "Cushioning": ["Zoom Air"],
    "Drop": ["10mm"]
  },
  "weight": "280g",
  "item_group_id": "pegasus40",
  "variants": [
    {
      "sku": "pegasus40-black-10",
      "title": "Black / Size 10",
      "price": 129.99,
      "attributes": {"Color": "Black", "Size": "10"},
      "inventory_quantity": 8,
      "image": "https://cdn.your-store.com/images/pegasus40-black.jpg"
    },
    {
      "sku": "pegasus40-white-10",
      "title": "White / Size 10",
      "price": 129.99,
      "attributes": {"Color": "White", "Size": "10"},
      "inventory_quantity": 5,
      "image": "https://cdn.your-store.com/images/pegasus40-white.jpg"
    }
  ],
  "seller_name": "Your Store",
  "seller_url": "https://your-store.com",
  "return_policy": "https://your-store.com/returns",
  "return_window": 30,
  "shipping": "US::Ground:7.99 USD",
  "enable_search": true,
  "enable_checkout": true
}

Ingestion Process

1. Prepare Your Feed

Format your catalog according to this specification.

2. Validate

Check for required fields and proper formatting.

3. Submit

Push your feed to the ingestion endpoint or configure pull URL.

4. Monitor

Check ingestion status for any errors or warnings.

5. Test

Verify products appear correctly in search results.


Common Errors

ErrorCauseSolution
missing_required_fieldRequired field not providedAdd the missing field
invalid_pricePrice is negative or invalidUse positive decimal
invalid_urlURL doesn’t resolveCheck URL accessibility
duplicate_idSame ID used twiceEnsure unique IDs
invalid_currencyUnknown currency codeUse ISO 4217 code

See Also