{
  "openapi": "3.0.0",
  "info": {
    "title": "Local360Connect Public API",
    "version": "1.0.0",
    "description": "Read-only hyperlocal data for Telangana, India. Designed for AI consumers (ChatGPT, Gemini, Claude, Perplexity) and third-party developers. All responses are schema.org-flavored JSON-LD. License: CC BY 4.0.",
    "contact": { "email": "info@local360connect.in", "url": "https://local360connect.in" }
  },
  "servers": [
    { "url": "https://local360connect.in/api/v1/public" }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "API index — list of available endpoints",
        "operationId": "getIndex",
        "responses": { "200": { "description": "DataCatalog" } }
      }
    },
    "/businesses.php": {
      "get": {
        "summary": "List verified businesses, paginated and filterable",
        "operationId": "listBusinesses",
        "parameters": [
          { "name": "city",     "in": "query", "schema": { "type": "string" }, "description": "City slug e.g. khammam" },
          { "name": "category", "in": "query", "schema": { "type": "string" }, "description": "Category slug e.g. restaurants" },
          { "name": "q",        "in": "query", "schema": { "type": "string" }, "description": "Free-text search across name, description, category" },
          { "name": "limit",    "in": "query", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 } },
          { "name": "offset",   "in": "query", "schema": { "type": "integer", "default": 0 } }
        ],
        "responses": { "200": { "description": "ItemList of LocalBusiness" } }
      }
    },
    "/business.php": {
      "get": {
        "summary": "Full record for a single business by slug",
        "operationId": "getBusiness",
        "parameters": [
          { "name": "slug", "in": "query", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "LocalBusiness" },
          "404": { "description": "Not found" }
        }
      }
    },
    "/categories.php": {
      "get": {
        "summary": "All categories with live business counts",
        "operationId": "listCategories",
        "responses": { "200": { "description": "ItemList of Thing" } }
      }
    },
    "/locations.php": {
      "get": {
        "summary": "All cities served, with counts and coordinates",
        "operationId": "listLocations",
        "responses": { "200": { "description": "ItemList of City" } }
      }
    },
    "/offers.php": {
      "get": {
        "summary": "Active offers across all businesses",
        "operationId": "listOffers",
        "parameters": [
          { "name": "city",     "in": "query", "schema": { "type": "string" } },
          { "name": "category", "in": "query", "schema": { "type": "string" } },
          { "name": "limit",    "in": "query", "schema": { "type": "integer", "default": 20, "maximum": 100 } },
          { "name": "offset",   "in": "query", "schema": { "type": "integer", "default": 0 } }
        ],
        "responses": { "200": { "description": "ItemList of Offer" } }
      }
    },
    "/events.php": {
      "get": {
        "summary": "Upcoming local events",
        "operationId": "listEvents",
        "parameters": [
          { "name": "city",   "in": "query", "schema": { "type": "string" } },
          { "name": "limit",  "in": "query", "schema": { "type": "integer", "default": 20, "maximum": 100 } },
          { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } }
        ],
        "responses": { "200": { "description": "ItemList of Event" } }
      }
    },
    "/knowledge.php": {
      "get": {
        "summary": "One-shot platform summary — stats, top categories, top cities",
        "operationId": "getKnowledge",
        "responses": { "200": { "description": "Dataset" } }
      }
    }
  }
}
