Introduction to Refrigerators
Refrigerators are essential appliances in every home, and with numerous models available from brands like Samsung, LG, Whirlpool, and GE, finding the right refrigerator can be overwhelming. Whether you're a homeowner shopping for a new fridge, a developer building an appliance marketplace, or a researcher analyzing home appliance trends, having structured refrigerator product data is crucial.
Imagine being able to search for refrigerators and instantly get detailed information about each appliance - from capacity and energy efficiency to door configuration and special features. This is exactly what a specialized Refrigerator Product API can provide.
What Makes a Refrigerator API Special?
A Refrigerator Product API goes beyond basic product listings. It understands the unique characteristics that matter to appliance buyers:
- Capacity: Total capacity and breakdown by section (refrigerator vs. freezer)
- Energy Efficiency: Energy Star ratings and annual energy consumption
- Door Configuration: Top freezer, bottom freezer, side-by-side, French door, etc.
- Features: Ice makers, water dispensers, smart connectivity
- Dimensions: Width, depth, and height for fitting into kitchen spaces
- Finish Options: Available colors and finishes
With this structured data, you can build powerful features like filtering by capacity, comparing energy efficiency, or recommending refrigerators based on kitchen size.
Try It Out: Search for Refrigerators
Use the search bar below to search for refrigerators. Try queries like "Samsung French door 25 cu ft", "LG side by side", or "Whirlpool top freezer Energy Star". The results will include detailed specifications automatically extracted from product information across the web.
Try the Refrigerator API
Search for refrigerators 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 Refrigerator 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 Refrigerator 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., "fridge Samsung French door")
- 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 Refrigerator-Specific JSON Schema to pass as custom_data_schema of search request
Here's the JSON Schema we use for refrigerator products:
{ "type": "object", "properties": { "total_capacity": { "type": "string", "description": "Total capacity in cubic feet (e.g., '25.5 cu ft')" }, "refrigerator_capacity": { "type": "string", "description": "Refrigerator section capacity in cubic feet" }, "freezer_capacity": { "type": "string", "description": "Freezer section capacity in cubic feet" }, "door_configuration": { "type": "string", "enum": ["top_freezer", "bottom_freezer", "side_by_side", "french_door", "single_door"], "description": "Refrigerator door configuration" }, "energy_star_rated": { "type": "boolean", "description": "Whether the refrigerator is Energy Star certified" }, "annual_energy_consumption": { "type": "string", "description": "Annual energy consumption in kWh (e.g., '608 kWh/year')" }, "ice_maker": { "type": "string", "enum": ["built_in", "external", "none"], "description": "Type of ice maker" }, "water_dispenser": { "type": "boolean", "description": "Whether it has a water dispenser" }, "width": { "type": "string", "description": "Width in inches (e.g., '36 inches')" }, "depth": { "type": "string", "description": "Depth in inches" }, "height": { "type": "string", "description": "Height in inches" }, "color_finish": { "type": "array", "items": { "type": "string" }, "description": "Available color/finish options (e.g., ['stainless steel', 'black', 'white'])" }, "special_features": { "type": "array", "items": { "type": "string" }, "description": "Special features (e.g., ['flexible storage', 'smart connectivity', 'dual cooling'])" }, "price_range": { "type": "string", "description": "Price range category (budget, mid-range, premium)" } }, "required": ["total_capacity", "door_configuration"] }
Using the Category Prefix
When searching for refrigerators, we prefix the search query with "fridge" or "refrigerator" to help the AI understand the context and return more relevant results.
Example Search Queries:
fridge Samsung French door 25 cu ftrefrigerator LG side by sidefridge Whirlpool top freezerrefrigerator GE bottom freezer Energy Star
The prefix "fridge" or "refrigerator" ensures the API understands you're looking specifically for refrigerator products and not other appliances.
Complete Example: Making a Request
Here's how to make a request to The Product API with a refrigerator-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=fridge%20Samsung%20French%20door&with_image=true', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY' }, body: JSON.stringify({ custom_data_schema: { type: "object", properties: { total_capacity: { type: "string", description: "Total capacity in cubic feet" }, refrigerator_capacity: { type: "string", description: "Refrigerator section capacity" }, freezer_capacity: { type: "string", description: "Freezer section capacity" }, door_configuration: { type: "string", enum: ["top_freezer", "bottom_freezer", "side_by_side", "french_door", "single_door"], description: "Door configuration" }, energy_star_rated: { type: "boolean", description: "Energy Star certification" }, annual_energy_consumption: { type: "string", description: "Annual energy consumption" }, ice_maker: { type: "string", enum: ["built_in", "external", "none"], description: "Type of ice maker" }, water_dispenser: { type: "boolean", description: "Water dispenser availability" }, width: { type: "string", description: "Width in inches" }, depth: { type: "string", description: "Depth in inches" }, height: { type: "string", description: "Height in inches" }, color_finish: { type: "array", items: { type: "string" }, description: "Available color/finish options" }, special_features: { type: "array", items: { type: "string" }, description: "Special features" }, price_range: { type: "string", description: "Price range category" } }, required: ["total_capacity", "door_configuration"] } }) }); 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 RF28R7351SG French Door Refrigerator", "description": "The Samsung RF28R7351SG features a spacious 28 cu ft capacity...", "brand": "Samsung", "image": "https://example.com/image.jpg", "custom_data": { "total_capacity": "28 cu ft", "refrigerator_capacity": "19.3 cu ft", "freezer_capacity": "8.7 cu ft", "door_configuration": "french_door", "energy_star_rated": true, "annual_energy_consumption": "608 kWh/year", "ice_maker": "built_in", "water_dispenser": true, "width": "36 inches", "depth": "34.5 inches", "height": "70.75 inches", "color_finish": ["stainless steel", "black stainless"], "special_features": ["flexible storage", "smart connectivity", "dual cooling"], "price_range": "premium" } } ] }
Conclusion
By combining the flexible Product API with a refrigerator-specific JSON Schema, you can create a powerful, specialized API for refrigerator products. The key is:
- Define your schema based on what refrigerator data matters to your application
- Use category prefixes in search queries for better context
- 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 guitars, smartphones, drills, cars, and more!