{
  "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 reviews. All endpoints require x402 payment (USDC on Base mainnet).",
    "version": "1.1.0"
  },
  "servers": [
    {
      "url": "https://marketpulse.theaslangroupllc.com"
    }
  ],
  "paths": {
    "/api/market/llm-visibility": {
      "get": {
        "summary": "LLM visibility analysis",
        "description": "Assesses current AI-answer visibility across ChatGPT, Claude, Gemini and Google AI Overviews, scores the specific factors driving LLM citation, and returns quick wins plus a six-week improvement plan, for a given brand and/or topic.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "Acme Plumbing",
            "description": "The brand to assess AI-answer visibility for — provide brand and/or topic"
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "drain cleaning Austin TX",
            "description": "The topic or category to assess AI visibility within — provide brand and/or topic"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Content brief dual-optimized for traditional search and AI-answer citation: target queries, section-by-section structure, E-E-A-T requirements, schema recommendations and a unique-data angle, for a given topic, audience and goal.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "best CRM for small business 2026",
            "description": "The content topic or target query to brief"
          },
          {
            "name": "audience",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "small business owners comparing CRM tools",
            "description": "Who this content is written for — sharpens tone and structure"
          },
          {
            "name": "goal",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "rank and drive trial signups",
            "description": "What the content should accomplish"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Channel mix recommendation with specific budget percentages per channel, ROI rationale, a test-budget allocation and a first-30-days action plan, for a given business type, budget and stage.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "business_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "local plumbing company",
            "description": "The business or offer to plan a channel mix for"
          },
          {
            "name": "budget",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "$5,000/month",
            "description": "Monthly marketing budget, with currency and period"
          },
          {
            "name": "goals",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "more qualified leads",
            "description": "Primary marketing goal to optimize the mix around"
          },
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "growth",
            "description": "Business stage — startup, growth, or scale"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "de",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Channel-by-channel ROI forecast with industry benchmarks for CPC/CPM, conversion rate, CPA and ROAS, plus a confidence rating, breakeven point and scaling/kill-switch triggers, for a given industry, budget and channels.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "home services",
            "description": "The industry to benchmark ROI projections against"
          },
          {
            "name": "budget",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "$3,000/month",
            "description": "Marketing budget to forecast returns for, with currency and period"
          },
          {
            "name": "channels",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "google,meta,email",
            "description": "Comma-separated channels to forecast — defaults to a general digital-marketing mix"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Finds exploitable gaps in a competitor's marketing presence across content, channels and positioning, then returns quick wins and a six-month attack plan, for a given competitor and industry.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "competitor",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "HubSpot",
            "description": "The competitor brand or company to analyze"
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "CRM software",
            "description": "The industry or category the competitor operates in"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Ready-to-use ad copy variants (headline, primary text, CTA, why it works) plus a headline bank, hook bank, audience targeting and platform compliance notes for Meta, Google, LinkedIn or TikTok, for a given platform, product, audience and goal.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Meta",
            "description": "Ad platform to write copy for"
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "online bookkeeping software for freelancers",
            "description": "The product or service being advertised"
          },
          {
            "name": "audience",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "freelance graphic designers with under 5 employees",
            "description": "Target audience for the ad — sharpens the hook and targeting guidance"
          },
          {
            "name": "goal",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "trial signups",
            "description": "Campaign objective in plain language"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "es",
            "description": "Language to write the copy in — defaults to English"
          }
        ],
        "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",
        "description": "Complete, ready-to-use email sequence with real subject lines, preview text, send timing and body outlines for welcome, nurture, abandoned-cart, post-purchase or re-engagement flows, plus deliverability rules and the metrics to watch, for a given product and goal.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "online accounting software",
            "description": "The product or service the sequence is selling or supporting"
          },
          {
            "name": "goal",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "convert trial to paid",
            "description": "What this sequence should accomplish"
          },
          {
            "name": "sequence_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "nurture",
            "description": "Type of sequence to write — welcome, nurture, abandoned_cart, post_purchase, or re_engagement"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Organic content strategy with a specific posting cadence, ranked content formats, content pillars, hook formulas and what to stop doing, for a given platform and industry.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "TikTok",
            "description": "Social platform to build the strategy for"
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "fitness supplements",
            "description": "The industry or niche the account operates in"
          },
          {
            "name": "goal",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "generate demo requests",
            "description": "What organic social should accomplish"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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",
        "description": "Local SEO punch list covering Google Business Profile optimization, review-generation strategy, citation-building priorities and a six-month ranking roadmap, for a given business type and location.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "business",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "family dental practice",
            "description": "The type of business to build a local SEO plan for"
          },
          {
            "name": "location",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "Denver, CO",
            "description": "City and state/region the business serves — sharpens citation and competitor guidance"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "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-review": {
      "get": {
        "summary": "Technical SEO review",
        "description": "Technical SEO review covering Core Web Vitals, E-E-A-T, schema markup and AI-Overview readiness, returning a prioritized list of fixes ordered by impact, for a given website and industry.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "website",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "acmeplumbing.com",
            "description": "The website domain to review"
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "local plumbing",
            "description": "The industry the website operates in — sharpens E-E-A-T and content guidance"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Prioritized SEO checklist with Core Web Vitals and AI readiness"
          },
          "402": {
            "description": "$0.10"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/market/seo-audit": {
      "get": {
        "summary": "Technical SEO review",
        "description": "[DEPRECATED — use /api/market/seo-review] Technical SEO review covering Core Web Vitals, E-E-A-T, schema markup and AI-Overview readiness, returning a prioritized list of fixes ordered by impact, for a given website and industry.",
        "deprecated": true,
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "website",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "acmeplumbing.com",
            "description": "The website domain to review"
          },
          {
            "name": "industry",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "local plumbing",
            "description": "The industry the website operates in — sharpens E-E-A-T and content guidance"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "en",
            "description": "Language to respond in — defaults to English"
          }
        ],
        "responses": {
          "200": {
            "description": "Prioritized SEO checklist with Core Web Vitals and AI readiness"
          },
          "402": {
            "description": "$0.10"
          }
        },
        "x-agent-use-case": "on-demand"
      }
    }
  }
}
