API Documentation

Structured data APIs for AI crawlers and developers

Overview

Giggle Trade provides structured data APIs that return product and device information in Markdown format, making it easy for AI crawlers and developers to access and parse our catalog data.

All APIs return data in JSON format with embedded Markdown content, allowing for easy integration with AI systems and automated tools.

Product Catalog API

Endpoint

GET /api/ai/catalog

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber100Items per page (max: 500)

Response Structure

{
  "format": "markdown",
  "lastUpdated": "2024-01-01T00:00:00.000Z",
  "products": [
    {
      "title": "iPhone 14 Plus 256G",
      "description": "Product description...",
      "price": 500,
      "grade": "A",
      "specifications": {
        "type": "Refur",
        "version": "US",
        "source": "Trade-in"
      },
      "markdown": "# iPhone 14 Plus 256G\n\n...",
      "url": "https://giggletrade.com/market/catalog/..."
    }
  ],
  "total": 1000,
  "pagination": {
    "current_page": 1,
    "per_page": 100,
    "total_pages": 10,
    "total_records": 1000
  }
}

Example Request

GET /api/ai/catalog?page=1&limit=50

Device Stock API

Endpoint

GET /api/ai/devices

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber100Items per page (max: 500)

Response Structure

{
  "format": "markdown",
  "lastUpdated": "2024-01-01T00:00:00.000Z",
  "devices": [
    {
      "title": "iPhone 14 Plus 256G",
      "description": "Device description...",
      "price": 500,
      "grade": "B",
      "imei": "353696743975821",
      "specifications": {
        "type": "Refur",
        "version": "US",
        "color": "Starlight"
      },
      "markdown": "# iPhone 14 Plus 256G\n\n...",
      "url": "https://giggletrade.com/market/stock/353696743975821"
    }
  ],
  "total": 1000,
  "pagination": {
    "current_page": 1,
    "per_page": 100,
    "total_pages": 10,
    "total_records": 1000
  }
}

Example Request

GET /api/ai/devices?page=1&limit=50

Features

  • Structured JSON responses with embedded Markdown content
  • Pagination support for large datasets
  • Maximum limit of 500 items per request to ensure performance
  • Automatic URL formatting and normalization
  • Comprehensive product and device specifications
  • Optimized for AI crawlers and automated tools

Rate Limiting & Best Practices

  • Use pagination to retrieve large datasets efficiently
  • Respect the maximum limit of 500 items per request
  • Cache responses when possible to reduce server load
  • Use appropriate timeouts and retry logic
  • Parse Markdown content using standard Markdown parsers

For MCP (Model Context Protocol) server — tools, resources and prompts for Cursor & AI — see MCP Server.