{
  "openapi": "3.1.0",
  "info": {
    "title": "PolicyPulse API",
    "description": "PolicyPulse \u2014 global legislative intelligence: US Congress, EU (EUR-Lex), UK Parliament, India, Brazil, Australia, and 50+ jurisdictions. Bill summaries, sector impact, passage probability, treaty analysis.",
    "version": "1.2.0",
    "contact": {
      "email": "info@theaslangroupllc.com"
    },
    "x-agent-use-case": "on-demand",
    "x-agent-chaining": "Follow up with /tradepulse for tariff implications of trade legislation; /alphapulse for investment signals from regulatory changes; /filingspulse for SEC 10-K risk factors tied to legislation."
  },
  "servers": [
    {
      "url": "https://policypulse-ten.vercel.app"
    }
  ],
  "paths": {
    "/api/legislation": {
      "get": {
        "summary": "Legislation \u2014 plain English translation of any bill globally",
        "description": "Searches Congress.gov and real-time sources to translate any pending or enacted legislation into plain English with sector impact analysis and passage probability. Covers US federal, all 50 states, EU, UK, Canada, Australia, and more.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Bill name or topic (e.g. 'NLRB joint employer rule', 'ACA employer mandate', 'EU AI Act')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "eu",
                "uk",
                "ca",
                "au",
                "global"
              ],
              "default": "us"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "summary",
                "status",
                "impact",
                "timeline"
              ],
              "default": "summary"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Response language (ISO 639-1 code)",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Legislative intelligence brief"
          },
          "402": {
            "description": "Payment required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-price-usd": 0.15,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/impact": {
      "get": {
        "summary": "Impact \u2014 who is affected and what they must do",
        "description": "Deep impact analysis for any legislation. Identifies every affected entity type with required actions, deadlines, cost implications, exemptions, and penalty exposure.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Legislation or policy topic",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "description": "Sector focus (or 'all')",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "description": "Filter to specific entity type (e.g. 'employer under 50 employees')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Impact analysis"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.12,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/scenario": {
      "get": {
        "summary": "Scenarios \u2014 if/then sector impact modeling",
        "description": "Models the structural sector impact of any legislative or regulatory development. No investment advice. Covers entity types benefiting or facing headwinds across healthcare, employment, finance, environment, real estate, and more.",
        "parameters": [
          {
            "name": "trigger",
            "in": "query",
            "description": "The development to model (e.g. 'federal $15 minimum wage passes', 'FTC non-compete ban upheld', 'California single-payer healthcare enacted')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ifthen",
                "probability",
                "timeline"
              ],
              "default": "ifthen"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sector impact scenario brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/monitor": {
      "get": {
        "summary": "Monitor \u2014 weekly/monthly legislative activity brief",
        "description": "Synthesizes recent legislative and regulatory developments across all policy sectors or a specific sector. Weekly or monthly cadence.",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "week",
                "month"
              ],
              "default": "week"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "healthcare",
                "employment",
                "environment",
                "tech",
                "finance",
                "realestate",
                "immigration",
                "education",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Legislative activity brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/state": {
      "get": {
        "summary": "State \u2014 legislation across all 50 US states via Open States",
        "description": "Accesses all 50 US state legislatures via Open States API. Pending and enacted bills on any topic. Multi-state comparison (comma-separate state codes). Shows state landscape: leaders, laggers, recent movers.",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "description": "2-letter state code (TX) or comma-separated list (CA,TX,NY)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "description": "Topic to search (e.g. 'gig worker classification', 'minimum wage', 'rent control', 'cannabis')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "enacted",
                "compare"
              ],
              "default": "pending"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "State legislation intelligence"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/compliance": {
      "get": {
        "summary": "Compliance \u2014 what to do after a law passes",
        "description": "Step-by-step compliance guidance for any enacted law or regulation, by entity type. Specific actions, deadlines, costs, documentation requirements, safe harbor provisions, and when to get counsel.",
        "parameters": [
          {
            "name": "law",
            "in": "query",
            "description": "Law or regulation (e.g. 'OSHA heat stress standard', 'ADA', 'California CCPA', 'FTC non-compete ban')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "us"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "description": "Entity type (employer|landlord|healthcare_provider|tech_company|retailer|restaurant|contractor|etc)",
            "schema": {
              "type": "string",
              "default": "employer"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compliance guidance"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/regulation": {
      "get": {
        "summary": "Federal regulation \u2014 agency rules via Federal Register",
        "description": "Tracks proposed and final rules from every federal agency via the Federal Register API. Surfaces open comment periods (businesses can influence proposed rules during comment periods). Covers EPA, FDA, OSHA, FTC, CFPB, SEC, DOL, USDA, HHS, and all others.",
        "parameters": [
          {
            "name": "agency",
            "in": "query",
            "description": "Federal agency (EPA|FDA|OSHA|FTC|CFPB|SEC|DOL|USDA|HHS|FCC|etc)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "description": "Topic within agency (optional \u2014 leave blank for agency overview)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "proposed",
                "final",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Federal regulation intelligence"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.12,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/compare": {
      "get": {
        "summary": "Compare \u2014 cross-jurisdiction policy comparison",
        "description": "Compares how different jurisdictions handle the same policy issue. Covers enforcement intensity, notable features, practical implications for multi-jurisdiction businesses, and which approach is considered best practice.",
        "parameters": [
          {
            "name": "topic",
            "in": "query",
            "description": "Policy topic (e.g. 'data privacy', 'non-compete agreements', 'gig worker classification', 'cannabis', 'minimum wage')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdictions",
            "in": "query",
            "description": "Comma-separated jurisdictions (e.g. 'US,EU,UK,Canada,Australia')",
            "schema": {
              "type": "string",
              "default": "US,EU,UK,Canada,Australia"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cross-jurisdiction comparison"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/calendar": {
      "get": {
        "summary": "Calendar \u2014 upcoming regulatory deadlines and effective dates",
        "description": "Surfaces upcoming regulatory effective dates, compliance deadlines, open comment period closes, and sunset clauses within the next 30, 90, or 180 days. Uses Federal Register API plus Tavily for comprehensive coverage.",
        "parameters": [
          {
            "name": "sector",
            "in": "query",
            "description": "Policy sector (healthcare|employment|environment|tech|finance|realestate|food|all)",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "us"
            }
          },
          {
            "name": "lookahead",
            "in": "query",
            "description": "Days ahead to surface deadlines",
            "schema": {
              "type": "integer",
              "enum": [
                30,
                90,
                180
              ],
              "default": 90
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Regulatory calendar"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/translate": {
      "get": {
        "summary": "Translate \u2014 decode any legal or regulatory text into plain English",
        "description": "Accepts any legal or regulatory text (statute, contract clause, enforcement letter, agency notice) and returns plain English with obligations, rights, deadlines, red flags, and defined terms. Also accepts POST with body { text, context, entity_type, lang }.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "description": "Legal or regulatory text to decode (up to 4,000 chars; use POST for longer text)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "context",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "regulatory",
                "employment",
                "contract",
                "enforcement",
                "general"
              ],
              "default": "general"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "description": "The entity reading this text \u2014 changes what obligations and rights are highlighted",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plain English text decode"
          },
          "400": {
            "description": "Missing text parameter"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      },
      "post": {
        "summary": "Translate (POST) \u2014 decode large legal text",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Legal or regulatory text to decode"
                  },
                  "context": {
                    "type": "string",
                    "enum": [
                      "regulatory",
                      "employment",
                      "contract",
                      "enforcement",
                      "general"
                    ]
                  },
                  "entity_type": {
                    "type": "string"
                  },
                  "lang": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plain English text decode"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. USDC on Base mainnet. See /.well-known/agent.json for payment details."
      }
    }
  }
}