BLOG | OFFICE OF THE CTO

Preparing Applications and APIs for Generative AI with JSON-LD

Lori MacVittie Thumbnail
Lori MacVittie
Published January 22, 2025

Generative AI and emerging AI agents are driving significant changes in how web applications and APIs are constructed. Like the indexing bots that built search engines, generative AI relies on reading and understanding Internet content: your products, services, location, hours, and APIs. And it's happening now.

  • Over 50% of consumers now use generative AI tools over traditional search engines for recommendations. (Statista)
  • 42% increase in chatbot usage boosted online holiday sales in 2024. (Reuters)
  • Traffic from AI sources to online retailers rose tenfold between July and September 2024. (The Times)

Obviously, generative AI is already able to access your information. But if you want to optimize how it consumes and understands that information—as well as represents it to consumers—then read on, my friend.

Metadata and AI optimization

To ensure generative AI can accurately retrieve and process your content, optimizing metadata is critical:

  • Metadata (OpenGraph, Schema.org): Helps AI interpret content, improving indexing, sharing, and response accuracy.
  • Structured Content: Semantic tags like <article>, <section>, <header>, and breadcrumbs provide clear content hierarchy and relationships.
  • JSON-LD: Defines structured data explicitly, making key information like product prices and availability accessible to AI tools. Google also uses JSON-LD to generate visually rich snippets in search results.

What is JSON-LD?

JavaScript Object Notation for Linked Data (JSON-LD) is a lightweight, machine-readable format that has become the de facto standard for structuring data, adopted by W3C in 2014. It is based on JSON and makes it easier for machines (like search engines, AI tools, or APIs) to understand the relationships between entities and the context of content.

Its simplicity has made it the go-to for major retailers, search engines, and social platforms. Adding JSON-LD ensures AI tools can fully leverage your APIs and applications, improving discoverability and usability.

Adding JSON-LD at scale

For organizations managing hundreds of apps (and from our research we know that’s most of them), manually updating each to include JSON-LD can be costly and time consuming. However, programmable application delivery controllers (ADCs) (like F5 BIG-IP or F5 NGINX) can add JSON-LD programmatically given that many applications leverage similar frameworks and constructs, such as including breadcrumbs as navigation elements and semantic tags in applications.

The programmable ADC extracts breadcrumbs and semantic tags already present in the unmodified response, formats those elements into JSON-LD constructs, and injects them into the application.

This approach can further be tailored to only modify responses intended for AI or machine consumers, as adding JSON-LD does not enhance the human experience with the content.

Using a programmable ADC also allows a single rule to scale across multiple applications and APIs, enhancing AI interaction without additional development costs.

A programmatic approach to modernizing applications and APIs ensures both are AI-ready, enhancing automation and enabling better outcomes from generative AI tools without incurring significant costs or time investments.

Find out how F5 is leading enterprise AI delivery and security.