Back to API Presets
API Preset
November 14, 2025By Product API TeamGarden Tools

Building a Garden Tools API with The Product API: A Complete Guide

Create a specialized Garden Tools Product API with tool type, material, size, and specifications. Perfect for garden supply stores and landscaping equipment marketplaces.

Introduction to Garden Tools

Garden tools are essential equipment for maintaining beautiful gardens, from shovels and rakes to pruners and trowels. Finding the right garden tool with the right specifications can make all the difference in your gardening tasks. Whether you're a professional landscaper needing heavy-duty equipment, a home gardener looking for hand tools, or a developer building a garden supply marketplace, having structured garden tool product data is crucial.

Imagine being able to search for garden tools and instantly get detailed information about each tool - from tool type and material to handle length and weight. This is exactly what a specialized Garden Tools Product API can provide.

What Makes a Garden Tools API Special?

A Garden Tools Product API goes beyond basic product listings. It understands the unique characteristics that matter to garden tool buyers:

  • Tool Type: Shovel, rake, hoe, pruner, shears, trowel, spade, fork, and more
  • Material: Steel, stainless steel, aluminum, fiberglass, wood, and more
  • Handle: Length and material for comfort and durability
  • Weight: Tool weight for ease of use
  • Durability: Build quality and material selection

With this structured data, you can build powerful features like filtering by tool type, comparing materials, or recommending tools based on gardening needs.

Try It Out: Search for Garden Tools

Use the search bar below to search for garden tools. Try queries like "Fiskars steel shovel", "Corona bypass pruner", or "garden rake fiberglass". The results will include detailed specifications automatically extracted from product information across the web.

Try the Garden Tools API

Search for garden toolss 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 Garden Tools 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 Garden Tools 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., "garden tools Fiskars shovel")
  • 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 Garden Tools-Specific JSON Schema to pass as custom_data_schema of search request

Here's the simple JSON Schema we use for garden tool products:

{
  "type": "object",
  "properties": {
    "tool_type": {
      "type": "string",
      "enum": ["shovel", "rake", "hoe", "pruner", "shears", "trowel", "spade", "fork", "weeder", "cultivator", "wheelbarrow", "watering_can", "hose", "gloves"],
      "description": "Type of garden tool"
    },
    "material": {
      "type": "string",
      "enum": ["steel", "stainless_steel", "aluminum", "fiberglass", "wood", "plastic", "rubber"],
      "description": "Primary material"
    },
    "handle_length": {
      "type": "string",
      "description": "Handle length in inches or centimeters"
    },
    "weight": {
      "type": "string",
      "description": "Weight of the tool"
    },
    "price_range": {
      "type": "string",
      "description": "Price range category"
    }
  },
  "required": ["tool_type", "material"]
}

Using the Category Prefix

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

Example Search Queries:

  • garden tools Fiskars steel shovel
  • garden tools Corona bypass pruner
  • garden tools fiberglass rake
  • garden tools trowel stainless steel

The prefix "garden tools" ensures the API understands you're looking specifically for garden tools and not other products.

Complete Example: Making a Request

Here's how to make a request to The Product API with a garden tools-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=garden%20tools%20Fiskars%20shovel&with_image=true', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    custom_data_schema: {
      type: "object",
      properties: {
        tool_type: {
          type: "string",
          enum: ["shovel", "rake", "hoe", "pruner", "shears", "trowel", "spade", "fork", "weeder", "cultivator", "wheelbarrow", "watering_can", "hose", "gloves"],
          description: "Type of garden tool"
        },
        material: {
          type: "string",
          enum: ["steel", "stainless_steel", "aluminum", "fiberglass", "wood", "plastic", "rubber"],
          description: "Primary material"
        },
        handle_length: {
          type: "string",
          description: "Handle length in inches or centimeters"
        },
        weight: {
          type: "string",
          description: "Weight of the tool"
        },
        price_range: {
          type: "string",
          description: "Price range category"
        }
      },
      required: ["tool_type", "material"]
    }
  })
});

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": "Fiskars Steel D-Handle Square Point Shovel",
      "description": "The Fiskars Steel D-Handle Square Point Shovel features a durable steel blade...",
      "brand": "Fiskars",
      "image": "https://example.com/image.jpg",
      "custom_data": {
        "tool_type": "shovel",
        "material": "steel",
        "handle_length": "48 inches",
        "weight": "4.5 lbs",
        "price_range": "mid-range"
      }
    }
  ]
}

Conclusion

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

  1. Define your schema based on what garden tool 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 hammers, drills, lawn mowers, and more!