{
  "openapi": "3.0.3",
  "info": {
    "title": "TLProject Lab Commerce, Extension & Web Intelligence API Suite",
    "version": "2.0.0",
    "description": "Combined OpenAPI specification for Shopify Store Intelligence, Chrome Web Store Intelligence, WooCommerce Store Intelligence, and Website SEO & Tech Stack Auditor.",
    "contact": {
      "name": "TLProject Lab",
      "url": "https://tlprojectlab.xyz",
      "email": "hello@tlprojectlab.xyz"
    }
  },
  "servers": [
    {
      "url": "https://tlp-intel-api.reviewradar-21ed95.workers.dev",
      "description": "Cloudflare Workers Global Edge"
    }
  ],
  "paths": {
    "/v1/shopify/analyze": {
      "get": {
        "operationId": "analyzeShopifyStore",
        "summary": "Analyze a Shopify storefront (tech stack, apps, pricing & sitemap)",
        "description": "Extracts Shopify storefront verification, theme metadata, 55+ app/pixel fingerprints, product catalog pricing distribution, in-stock & discount percentages, sitemap SKU estimates, and public social/policy links.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Store domain or URL (e.g. allbirds.com or https://www.brooklinen.com)",
            "schema": {
              "type": "string",
              "example": "allbirds.com"
            }
          },
          {
            "name": "maxProducts",
            "in": "query",
            "required": false,
            "description": "Max products sampled from /products.json (0-250, default 25)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          },
          {
            "name": "checkSitemap",
            "in": "query",
            "required": false,
            "description": "Whether to inspect /sitemap.xml for total catalog size estimate (default true)",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "includeProducts",
            "in": "query",
            "required": false,
            "description": "Include normalized product list in JSON response (default false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured Shopify store intelligence JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL or query parameter"
          },
          "401": {
            "description": "Unauthorized origin request"
          }
        }
      },
      "post": {
        "operationId": "analyzeShopifyStorePost",
        "summary": "Analyze a Shopify storefront via JSON body",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "example": "allbirds.com"
                  },
                  "maxProducts": {
                    "type": "integer",
                    "default": 25
                  },
                  "checkSitemap": {
                    "type": "boolean",
                    "default": true
                  },
                  "includeProducts": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured Shopify store intelligence JSON"
          },
          "400": {
            "description": "Invalid request body"
          }
        }
      }
    },
    "/v1/shopify/apps": {
      "get": {
        "operationId": "detectShopifyApps",
        "summary": "Fast Shopify theme & 55+ app/pixel detector (<300ms)",
        "description": "Lightweight single-request endpoint that detects Shopify status, theme name/ID, 55+ installed apps & marketing pixels, and social links without fetching product catalog or sitemaps.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Store domain or URL (e.g. allbirds.com)",
            "schema": {
              "type": "string",
              "example": "allbirds.com"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Theme & detected app signatures JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL parameter"
          }
        }
      }
    },
    "/v1/cws/extension": {
      "get": {
        "operationId": "getChromeExtensionIntel",
        "summary": "Get full Chrome Web Store extension metadata, manifest & opportunity score",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "32-char Chrome Extension ID or full Chrome Web Store URL",
            "schema": {
              "type": "string",
              "example": "jdanjneidfleaakcdpajooiomlkjojbl"
            }
          },
          {
            "name": "includeReviews",
            "in": "query",
            "required": false,
            "description": "Also extract recent public user reviews in the same call (default false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "maxReviews",
            "in": "query",
            "required": false,
            "description": "Max reviews returned when includeReviews=true (1-50, default 10)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Store locale code (default en)",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full extension intelligence JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Chrome Extension ID or URL"
          }
        }
      }
    },
    "/v1/cws/search": {
      "get": {
        "operationId": "searchChromeExtensions",
        "summary": "Search Chrome Web Store extensions by keyword",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search keyword (e.g. amazon review exporter)",
            "schema": {
              "type": "string",
              "example": "amazon review exporter"
            }
          },
          {
            "name": "maxResults",
            "in": "query",
            "required": false,
            "description": "Maximum results to return (1-40, default 10)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 40,
              "default": 10
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Store locale code (default en)",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results JSON array with install counts and ratings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cws/reviews": {
      "get": {
        "operationId": "getChromeExtensionReviews",
        "summary": "Extract structured public user reviews for a Chrome extension",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "32-char Chrome Extension ID or Chrome Web Store URL",
            "schema": {
              "type": "string",
              "example": "jdanjneidfleaakcdpajooiomlkjojbl"
            }
          },
          {
            "name": "maxReviews",
            "in": "query",
            "required": false,
            "description": "Maximum reviews to return (1-50, default 20)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Store locale code (default en)",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured public reviews JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/woo/analyze": {
      "get": {
        "operationId": "analyzeWooStore",
        "summary": "Analyze a WooCommerce / WordPress storefront (plugins, theme, pricing & sitemap)",
        "description": "Extracts WordPress & WooCommerce verification, active/parent theme, 78+ curated plugin fingerprints, raw plugin slugs, Store API catalog pricing statistics, in-stock & on-sale percentages, sitemap SKU estimates, and public social/policy links.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Target WooCommerce store domain or URL (e.g. porterandyork.com)",
            "schema": {
              "type": "string",
              "example": "porterandyork.com"
            }
          },
          {
            "name": "maxProducts",
            "in": "query",
            "required": false,
            "description": "Max products sampled from Store API (0-250, default 25)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 250,
              "default": 25
            }
          },
          {
            "name": "checkSitemap",
            "in": "query",
            "required": false,
            "description": "Inspect WordPress/Yoast sitemaps for catalog size estimates (default true)",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "includeProducts",
            "in": "query",
            "required": false,
            "description": "Include normalized product list in JSON response (default false)",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured WooCommerce store intelligence JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL or query parameter"
          },
          "401": {
            "description": "Unauthorized origin request"
          }
        }
      },
      "post": {
        "operationId": "analyzeWooStorePost",
        "summary": "Analyze a WooCommerce storefront via JSON body",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "example": "porterandyork.com"
                  },
                  "maxProducts": {
                    "type": "integer",
                    "default": 25
                  },
                  "checkSitemap": {
                    "type": "boolean",
                    "default": true
                  },
                  "includeProducts": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured WooCommerce store intelligence JSON"
          },
          "400": {
            "description": "Invalid request body"
          }
        }
      }
    },
    "/v1/woo/plugins": {
      "get": {
        "operationId": "detectWooPlugins",
        "summary": "Fast WordPress/WooCommerce theme & 78+ plugin detector (<300ms)",
        "description": "Lightweight single-request endpoint that detects WordPress/WooCommerce status, active theme, 78+ curated plugins, raw plugin slugs, and public social links without fetching product catalog or sitemaps.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Store domain or URL (e.g. porterandyork.com)",
            "schema": {
              "type": "string",
              "example": "porterandyork.com"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "WordPress/WooCommerce theme & plugin signatures JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL parameter"
          }
        }
      }
    },
    "/v1/site/audit": {
      "get": {
        "operationId": "auditWebsite",
        "summary": "Full technical SEO, 90+ tech stack, JSON-LD & public leads audit",
        "description": "Computes a deterministic 0-100 SEO Health Score with actionable issues, extracts meta/OG/Twitter tags, heading hierarchy, image alt coverage, JSON-LD types, 90+ technology fingerprints, security headers, robots.txt & sitemap.xml health, public contact emails, and social profiles.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Target website domain or URL (e.g. tlprojectlab.xyz or stripe.com)",
            "schema": {
              "type": "string",
              "example": "tlprojectlab.xyz"
            }
          },
          {
            "name": "checkRobotsAndSitemap",
            "in": "query",
            "required": false,
            "description": "Whether to fetch /robots.txt and /sitemap.xml in parallel (default true)",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured SEO, tech stack, schema & leads audit JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL or query parameter"
          },
          "401": {
            "description": "Unauthorized origin request"
          }
        }
      },
      "post": {
        "operationId": "auditWebsitePost",
        "summary": "Audit a website via JSON body",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "example": "tlprojectlab.xyz"
                  },
                  "checkRobotsAndSitemap": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured website audit JSON"
          },
          "400": {
            "description": "Invalid request body"
          }
        }
      }
    },
    "/v1/site/tech": {
      "get": {
        "operationId": "detectSiteTech",
        "summary": "Fast 90+ technology stack & public leads detector (<300ms)",
        "description": "Single-request endpoint that identifies CMS, frontend frameworks, CDN/hosting, analytics, CRM, payment gateways, live chat, security headers, and public social/email leads.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Target website domain or URL (e.g. stripe.com)",
            "schema": {
              "type": "string",
              "example": "stripe.com"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Detected technology stack & public leads JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL parameter"
          }
        }
      }
    }
  }
}