{
  "openapi": "3.1.0",
  "info": {
    "title": "MarketPulse API",
    "description": "Marketing intelligence API for the AI era. LLM visibility, channel mix, content briefs, ad copy, local SEO, email sequences, competitor gap analysis, social strategy, ROI forecasting, and technical SEO audits. All endpoints require x402 payment (USDC on Base mainnet).",
    "version": "1.1.0"
  },
  "servers": [
    {
      "url": "https://marketpulse-brown.vercel.app"
    }
  ],
  "paths": {
    "/api/market/llm-visibility": {
      "get": {
        "summary": "LLM visibility analysis",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AI citation assessment with E-E-A-T gaps and 6-week roadmap"
          },
          "402": {
            "description": "$0.15"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/content-brief": {
      "get": {
        "summary": "Dual-optimized content brief",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "goal",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Content brief optimized for Google and AI Overview citation"
          },
          "402": {
            "description": "$0.15"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/channel-mix": {
      "get": {
        "summary": "Marketing channel mix strategy",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "business_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budget",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "goals",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel allocation with budget percentages and first-30-days plan"
          },
          "402": {
            "description": "$0.10"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/roi-forecast": {
      "get": {
        "summary": "Marketing ROI forecast",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budget",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channels",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Projected ROI with industry benchmarks and scaling triggers"
          },
          "402": {
            "description": "$0.08"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/competitor-gap": {
      "get": {
        "summary": "Competitor gap analysis",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "competitor",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exploitable gaps with prioritized attack plan"
          },
          "402": {
            "description": "$0.10"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/ad-copy": {
      "get": {
        "summary": "Ready-to-use ad copy variants",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "goal",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "3 ad copy variants with headline bank and targeting guidance"
          },
          "402": {
            "description": "$0.08"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/email-sequence": {
      "get": {
        "summary": "Email nurture sequence",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "goal",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sequence_type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Complete sequence with subject lines, preview text, and deliverability rules"
          },
          "402": {
            "description": "$0.15"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/social-strategy": {
      "get": {
        "summary": "Platform social media strategy",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "goal",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Posting cadence, content pillars, hook formulas, algorithm guidance"
          },
          "402": {
            "description": "$0.08"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/local-seo": {
      "get": {
        "summary": "Local SEO optimization guide",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "business",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "GBP optimization, citation strategy, review system, 6-month roadmap"
          },
          "402": {
            "description": "$0.08"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/seo-audit": {
      "get": {
        "summary": "Technical SEO audit",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "website",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Prioritized SEO checklist with Core Web Vitals and AI readiness"
          },
          "402": {
            "description": "$0.10"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    }
  }
}
