{
  "version": "chem-plans-2026.1",
  "effectiveDate": "2026-09-20",
  "note": "Every plan reaches every endpoint and every field. Plans differ only in how much you may use, never in what you may reach. The paid tiers are catalogued but NOT open: there is no billing code in this service.",
  "currency": "USD",
  "model": "Every plan has EVERY feature. Plans differ only in how much you may use, never in what you may reach. No endpoint, field or dataset is reserved for a paying customer — a higher plan raises limits and nothing else. History is the same: every plan can query it, and a paid plan buys how far back. And where the limits are the only obstacle to public-interest work, they are lifted for free — see publicInterest.",
  "dataIsPublicDomain": "27 CFR is a work of the United States Government: it is public domain and carries no reuse restriction. You may redistribute every dataset here commercially without asking anyone. You are never paying for the data — only for hosted capacity.",
  "billing": {
    "status": "not-yet-available",
    "provider": "paypal",
    "note": "Paid plans are not live. No payment code runs in this service and no card or PayPal credential ever reaches it. When paid plans open they will be served from a separate domain backed by this same API, and subscriptions will be handled by PayPal Subscriptions; this service will only ever receive a signature-verified webhook that issues or revokes an API key.",
    "interestUrl": "https://apis.allanninal.dev/chem/pro.html"
  },
  "featureCatalogue": {
    "limits.read": "The federal composition maxima — volatile acidity by wine class and colour, total sulfur dioxide, and the sulfite-declaration threshold — each with its verbatim CFR sentence and citation.",
    "materials.read": "Every material TTB authorises for treating wine or juice under 27 CFR 24.246, with the specific TTB limitation where one applies and the FDA reference.",
    "lab.check": "Post a lab panel and get back which federal limits it breaches, the arithmetic, the citation and the verbatim regulation text.",
    "chemistry.calc": "Deterministic cellar chemistry: molecular SO2 from free SO2 and pH, potential alcohol from Brix, and unit conversion.",
    "production.read": "The amelioration, sweetening and cellar-treatment sections of 27 CFR part 24, with quantities kept in the sentences that condition them.",
    "bulk.download": "The complete datasets as static JSON files, cacheable and unmetered.",
    "history.asof": "Query the limits as they stood on a past date (?asOf=). eCFR serves the current issue; this service retains the earlier ones.",
    "history.changes": "A change feed: which limits or materials moved when TTB revised the part."
  },
  "limitDefinitions": {
    "requestsPerMinute": "Requests accepted in a rolling minute, per IP on the anonymous plan and per key otherwise.",
    "requestsPerDay": "Requests accepted in a rolling day, same identity.",
    "maxPageSize": "Largest value accepted for ?limit= on a search endpoint.",
    "bulkDownloadsPerDay": "Full static-dataset file downloads accepted per day (/api/v1/*.json). The files are free and complete; this caps how often one identity may re-pull them, because the cost is bandwidth. The per-record API under /v1 is counted separately.",
    "historyDays": "How far back ?asOf= and the change feed may reach, in days before today. null means the full retained history. Every plan can use both endpoints; this caps the depth, not the capability."
  },
  "plans": [
    {
      "id": "free",
      "name": "Free",
      "tagline": "Everything, no signup.",
      "price": {
        "monthly": 0,
        "annual": 0,
        "currency": "USD"
      },
      "signupRequired": false,
      "available": true,
      "limits": {
        "requestsPerMinute": 60,
        "requestsPerDay": 5000,
        "maxPageSize": 100,
        "bulkDownloadsPerDay": 50,
        "historyDays": 30
      },
      "features": [
        "limits.read",
        "materials.read",
        "lab.check",
        "chemistry.calc",
        "production.read",
        "bulk.download",
        "history.asof",
        "history.changes"
      ],
      "description": "Anonymous, budgeted by IP. Every federal composition limit, every treatment material, unlimited lab-panel checks within the budget, the full cellar-chemistry calculators, the complete datasets as static files, and 30 days of history.",
      "upgradeReason": null
    },
    {
      "id": "free-key",
      "name": "Free (with key)",
      "tagline": "Same data, a bigger budget.",
      "price": {
        "monthly": 0,
        "annual": 0,
        "currency": "USD"
      },
      "signupRequired": true,
      "available": true,
      "limits": {
        "requestsPerMinute": 300,
        "requestsPerDay": 50000,
        "maxPageSize": 100,
        "bulkDownloadsPerDay": 500,
        "historyDays": 30
      },
      "features": [
        "limits.read",
        "materials.read",
        "lab.check",
        "chemistry.calc",
        "production.read",
        "bulk.download",
        "history.asof",
        "history.changes"
      ],
      "description": "Ask for a key and the per-IP budget becomes a per-key budget ten times the size. Nothing else changes: a key does not unlock a field, a route or a record.",
      "upgradeReason": "You are hitting the anonymous per-IP limit."
    },
    {
      "id": "pro",
      "name": "Pro",
      "tagline": "Production volume and the full archive.",
      "price": {
        "monthly": 19,
        "annual": 190,
        "currency": "USD",
        "annualNote": "two months free"
      },
      "signupRequired": true,
      "available": false,
      "limits": {
        "requestsPerMinute": 1200,
        "requestsPerDay": 500000,
        "maxPageSize": 1000,
        "bulkDownloadsPerDay": 5000,
        "historyDays": null
      },
      "features": [
        "limits.read",
        "materials.read",
        "lab.check",
        "chemistry.calc",
        "production.read",
        "bulk.download",
        "history.asof",
        "history.changes"
      ],
      "description": "The same endpoints and the same data, at production request rates, with history reaching back as far as this service has retained it rather than 30 days.",
      "upgradeReason": "You need production request rates, or history older than 30 days."
    },
    {
      "id": "business",
      "name": "Business",
      "tagline": "Headroom for a platform.",
      "price": {
        "monthly": 49,
        "annual": 490,
        "currency": "USD",
        "annualNote": "two months free"
      },
      "signupRequired": true,
      "available": false,
      "limits": {
        "requestsPerMinute": 6000,
        "requestsPerDay": 5000000,
        "maxPageSize": 5000,
        "bulkDownloadsPerDay": 50000,
        "historyDays": null
      },
      "features": [
        "limits.read",
        "materials.read",
        "lab.check",
        "chemistry.calc",
        "production.read",
        "bulk.download",
        "history.asof",
        "history.changes"
      ],
      "description": "For putting this behind your own product. Still the same data and the same routes; the ceiling is simply high enough to stop thinking about.",
      "upgradeReason": "You are serving this to your own users and Pro's ceiling is in the way."
    },
    {
      "id": "public-interest",
      "name": "Public interest",
      "tagline": "Pro capability, free, by application.",
      "price": {
        "monthly": 0,
        "annual": 0,
        "currency": "USD"
      },
      "signupRequired": true,
      "available": true,
      "applicationRequired": true,
      "inUpgradeLadder": false,
      "limits": {
        "requestsPerMinute": 1200,
        "requestsPerDay": 500000,
        "maxPageSize": 1000,
        "bulkDownloadsPerDay": 5000,
        "historyDays": null
      },
      "features": [
        "limits.read",
        "materials.read",
        "lab.check",
        "chemistry.calc",
        "production.read",
        "bulk.download",
        "history.asof",
        "history.changes"
      ],
      "description": "Pro limits and full history at no cost, for journalists, academics, nonprofits and public-interest researchers.",
      "eligibility": [
        "Journalists and newsrooms reporting on trade policy or its cost to businesses and consumers.",
        "Academic researchers and students working on enology, food law or wine chemistry.",
        "Nonprofits and NGOs working on trade, agriculture or small-business policy.",
        "Transparency and civic-technology projects republishing public records.",
        "Small importers without a customs broker, where the free limits are genuinely in the way."
      ],
      "howToApply": "Message the author at https://www.linkedin.com/in/allanninal/ saying what you are working on. No proposal, no procurement, no annual review.",
      "support": "Best effort, same as every other plan.",
      "upgradeReason": "The free limits are in the way of public-interest work."
    }
  ],
  "fairUse": "The free plans are genuinely free and are not a trial. They are rate limited so one caller cannot take the service down for everyone — the scarce resource is a single shared host, not the data, which is public domain and which you are free to download in full and host yourself.",
  "selfHostNote": "Do not buy a plan to escape a rate limit — host it yourself. Every dataset is published as static JSON and the server is MIT-licensed, so you can run your own copy. A rate limit is a property of my hardware, not of the data.",
  "whyHistoryIsSold": "Honestly: less than you might expect. eCFR DOES keep a point-in-time archive — /api/versioner/v1/full/<date>/title-27.xml answers for dates years back — so unlike a source that overwrites its data and keeps nothing, the underlying history is not ours alone. What this service retains is the PARSED and DIFFED form: which limit moved, when, and what the sentence said before. That is work performed on public data, not privileged access to it, and if you would rather do the parsing yourself the archive is right there.",
  "historyNote": "History here is a convenience, not a monopoly. The raw point-in-time text is available from eCFR directly; what is retained here is the structured diff.",
  "publicInterest": {
    "summary": "Pro-level access is free for journalists, academics, nonprofits and public-interest researchers. Ask and it is granted.",
    "why": "This is public data about who pays what to bring goods into the United States, at a moment when those rates are changing by proclamation several times a year. The people most likely to do something useful with it — reporters tracking the cost of trade policy, researchers measuring it, small importers with no customs broker — are the least likely to have a budget for an API. Charging them would select against exactly the use this data exists for. The rate limits exist to protect one small shared server, not to ration public records, so where the limit is the only obstacle it is simply lifted.",
    "contact": "https://www.linkedin.com/in/allanninal/",
    "note": "No proposal, no procurement, no annual review. Contact is via LinkedIn rather than email, so the author can see a real person is asking. If the free tier's limits are in your way and you are doing work of this kind, say so and you will get a key.",
    "contactVia": "LinkedIn"
  },
  "pricingRationale": {
    "summary": "The paid tiers here are catalogued so the plan model is visible and testable, but they are NOT open: there is no billing code in this service and no way to pay for one.",
    "noComparisonYet": "The tariff sibling carries a researched comparison against named vendors because its paid tier was priced against a real market. No equivalent research has been done for wine QC compliance tooling, so no comparison is published here rather than an invented one.",
    "whatYouGetFree": "Everything. Every plan reaches every endpoint and every field; the free tier differs only in how much you may use.",
    "ifYouNeedMore": "Self-host. Every dataset is published as static JSON and the server is MIT-licensed."
  },
  "contact": {
    "via": "LinkedIn",
    "url": "https://www.linkedin.com/in/allanninal/",
    "note": "There is no public email address for this service. Reach the author on LinkedIn."
  }
}
