Back to API Presets
API Preset
November 14, 2025By Product API TeamTV

Building a TV API with The Product API: A Complete Guide

Build a TV Product API with screen size, resolution, display technology, smart features, and gaming capabilities. Great for electronics marketplaces and home theater platforms.

Introduction to TVs

Televisions are central to home entertainment, with numerous models available from brands like Samsung, LG, Sony, TCL, and Vizio. Finding the right TV with the right specifications can be overwhelming. Whether you're a home theater enthusiast seeking the best picture quality, a gamer needing low input lag, or a developer building an electronics marketplace, having structured TV product data is crucial.

Imagine being able to search for TVs and instantly get detailed information about each display - from screen size and resolution to display technology and smart features, from connectivity to audio capabilities. This is exactly what a specialized TV Product API can provide.

What Makes a TV API Special?

A TV Product API goes beyond basic product listings. It understands the unique characteristics that matter to TV buyers:

  • Display: Screen size, resolution, and display technology (OLED, QLED, LED)
  • Picture Quality: HDR support, refresh rate, and color accuracy
  • Smart Features: Operating system, app support, and voice control
  • Connectivity: HDMI ports, USB ports, and wireless connectivity
  • Audio: Built-in speakers, audio output options, and soundbar compatibility
  • Gaming: Input lag, VRR support, and gaming-specific features
  • Design: Bezel size, stand options, and wall-mount compatibility

With this structured data, you can build powerful features like filtering by screen size, comparing picture quality features, or recommending TVs based on use case.

Try It Out: Search for TVs

Use the search bar below to search for TVs. Try queries like "Samsung QLED 65 inch", "LG OLED C3", or "Sony Bravia XR". The results will include detailed specifications automatically extracted from product information across the web.

Try the TV API

Search for tvs and see detailed specifications automatically extracted from product information.

How It Works: Technical Implementation

Now that you've seen the API in action, let's dive into how it's implemented. This specialized TV API is built on top of The Product API which is an AI-based product search API that works with any product and any type of query. It responds with structured JSON and supports custom structured responses, allowing you to build specialized APIs for any product category.

The Product API's powerful custom_data_schema feature allows you to define additional structured fields specific to your product category, enabling you to create category-specific APIs like this TV API. For more details on how the API works, see the full documentation.

Understanding APIs for Product Data

An API (Application Programming Interface) enables different software applications to communicate. For product data:

  • Input: You send a search query (e.g., "TV Samsung QLED 65")
  • Processing: The API searches across multiple sources and uses AI to extract relevant information
  • Output: You receive structured product data in JSON format

The flexibility of a product API means you can customize it for specific categories by defining additional data fields through JSON Schema.

Creating a TV-Specific JSON Schema to pass as custom_data_schema of search request

Here's the JSON Schema we use for TV products:

{
  "type": "object",
  "properties": {
    "screen_size": {
      "type": "string",
      "description": "Screen size in inches (e.g., '43', '55', '65', '75', '85')"
    },
    "resolution": {
      "type": "string",
      "enum": ["4K UHD", "8K UHD", "1080p Full HD", "720p HD"],
      "description": "Display resolution"
    },
    "display_technology": {
      "type": "string",
      "enum": ["OLED", "QLED", "LED", "Mini LED", "MicroLED"],
      "description": "Display technology type"
    },
    "refresh_rate": {
      "type": "string",
      "description": "Refresh rate in Hz (e.g., '60Hz', '120Hz', '240Hz')"
    },
    "hdr_support": {
      "type": "array",
      "items": { "type": "string" },
      "description": "HDR formats supported (e.g., ['HDR10', 'HDR10+', 'Dolby Vision', 'HLG'])"
    },
    "smart_platform": {
      "type": "string",
      "enum": ["Android TV", "webOS", "Tizen", "Roku TV", "Fire TV", "Google TV"],
      "description": "Smart TV operating system"
    },
    "hdmi_ports": {
      "type": "number",
      "description": "Number of HDMI ports"
    },
    "hdmi_version": {
      "type": "string",
      "description": "HDMI version (e.g., 'HDMI 2.1', 'HDMI 2.0')"
    },
    "usb_ports": {
      "type": "number",
      "description": "Number of USB ports"
    },
    "wifi": {
      "type": "boolean",
      "description": "Wi-Fi connectivity support"
    },
    "ethernet": {
      "type": "boolean",
      "description": "Ethernet port availability"
    },
    "voice_control": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Voice assistant support (e.g., ['Alexa', 'Google Assistant', 'Bixby'])"
    },
    "input_lag": {
      "type": "string",
      "description": "Input lag in milliseconds (important for gaming)"
    },
    "vrr_support": {
      "type": "boolean",
      "description": "Variable Refresh Rate support (for gaming)"
    },
    "audio_output": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Audio output options (e.g., ['optical', 'ARC', 'eARC', 'headphone jack'])"
    },
    "speaker_power": {
      "type": "string",
      "description": "Built-in speaker power (e.g., '20W', '40W')"
    },
    "dimensions": {
      "type": "string",
      "description": "TV dimensions with stand (e.g., '57.1 x 35.1 x 11.3 inches')"
    },
    "weight": {
      "type": "string",
      "description": "Weight in pounds or kilograms"
    },
    "price_range": {
      "type": "string",
      "description": "Price range category (budget, mid-range, premium)"
    }
  },
  "required": ["screen_size", "resolution", "display_technology"]
}

Using the Category Prefix

When searching for TVs, we prefix the search query with "TV" to help the AI understand the context and return more relevant results.

Example Search Queries:

  • TV Samsung QLED 65 inch
  • TV LG OLED C3 55
  • TV Sony Bravia XR 75
  • TV TCL 6-Series 4K

The prefix "TV" ensures the API understands you're looking specifically for television displays and not other products.

Complete Example: Making a Request

Here's how to make a request to The Product API with a TV-specific schema. For complete API reference including authentication, endpoints, and all parameters, see the documentation:

const response = await fetch('https://api.example.com/api?search=TV%20Samsung%20QLED%2065&with_image=true', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    custom_data_schema: {
      type: "object",
      properties: {
        screen_size: {
          type: "string",
          description: "Screen size in inches"
        },
        resolution: {
          type: "string",
          enum: ["4K UHD", "8K UHD", "1080p Full HD", "720p HD"],
          description: "Display resolution"
        },
        display_technology: {
          type: "string",
          enum: ["OLED", "QLED", "LED", "Mini LED", "MicroLED"],
          description: "Display technology type"
        },
        refresh_rate: {
          type: "string",
          description: "Refresh rate in Hz"
        },
        hdr_support: {
          type: "array",
          items: { type: "string" },
          description: "HDR formats supported"
        },
        smart_platform: {
          type: "string",
          enum: ["Android TV", "webOS", "Tizen", "Roku TV", "Fire TV", "Google TV"],
          description: "Smart TV operating system"
        },
        hdmi_ports: {
          type: "number",
          description: "Number of HDMI ports"
        },
        hdmi_version: {
          type: "string",
          description: "HDMI version"
        },
        usb_ports: {
          type: "number",
          description: "Number of USB ports"
        },
        wifi: {
          type: "boolean",
          description: "Wi-Fi connectivity support"
        },
        ethernet: {
          type: "boolean",
          description: "Ethernet port availability"
        },
        voice_control: {
          type: "array",
          items: { type: "string" },
          description: "Voice assistant support"
        },
        input_lag: {
          type: "string",
          description: "Input lag in milliseconds"
        },
        vrr_support: {
          type: "boolean",
          description: "Variable Refresh Rate support"
        },
        audio_output: {
          type: "array",
          items: { type: "string" },
          description: "Audio output options"
        },
        speaker_power: {
          type: "string",
          description: "Built-in speaker power"
        },
        dimensions: {
          type: "string",
          description: "TV dimensions with stand"
        },
        weight: {
          type: "string",
          description: "Weight"
        },
        price_range: {
          type: "string",
          description: "Price range category"
        }
      },
      required: ["screen_size", "resolution", "display_technology"]
    }
  })
});

const data = await response.json();
console.log(data.products);

Expected Response

The API will return products with standard fields plus your custom custom_data field:

{
  "status": "success",
  "products": [
    {
      "name": "Samsung QN65Q90C QLED 4K Smart TV",
      "description": "The Samsung QN65Q90C features Quantum Dot technology...",
      "brand": "Samsung",
      "image": "https://example.com/image.jpg",
      "custom_data": {
        "screen_size": "65",
        "resolution": "4K UHD",
        "display_technology": "QLED",
        "refresh_rate": "120Hz",
        "hdr_support": ["HDR10", "HDR10+", "Dolby Vision"],
        "smart_platform": "Tizen",
        "hdmi_ports": 4,
        "hdmi_version": "HDMI 2.1",
        "usb_ports": 2,
        "wifi": true,
        "ethernet": true,
        "voice_control": ["Bixby", "Alexa", "Google Assistant"],
        "input_lag": "10ms",
        "vrr_support": true,
        "audio_output": ["optical", "eARC"],
        "speaker_power": "60W",
        "dimensions": "57.1 x 35.1 x 11.3 inches",
        "weight": "52.9 lbs",
        "price_range": "premium"
      }
    }
  ]
}

Conclusion

By combining the flexible Product API with a TV-specific JSON Schema, you can create a powerful, specialized API for television products. The key is:

  1. Define your schema based on what TV data matters to your application
  2. Use category prefixes in search queries for better context
  3. Leverage the custom_data field to build rich, category-specific features

The same approach works for any product category - you just need to define the right schema for your needs!

Ready to get started? Create your own product API on The Product API and start building your own category-specific APIs today!


Ready to build your own category-specific API? Check out our other API preset guides for cameras, gaming consoles, smartwatches, and more!