Liquid Lint API
Liquid / Shopify theme lint: POST {code}, get the bugs with line numbers. Deterministic — never rendered, no AI. Catches unbalanced/misnested blocks, unknown tags/filters with did-you-mean, the JS-isms every dev writes in Liquid (&&, !, ternaries, arithmetic in output, parens in conditions), deprecated img_url/include, and FULL {% schema %} validation: setting types, duplicate ids, range/select rules, blocks, presets. POST bare schema JSON to test just a schema. Max 128 KB.
Parameters
| Name | In | Description | |
|---|---|---|---|
code | body | required | Liquid template source to lint, max 128 KB |
Example request
curl -X POST "https://api.webbersites.com/api/lint/liquid" \
-H "Content-Type: application/json" \
-d '{"code":"{% if product.available && product.price %}\n {{ product.price + 10 | money }}\n{% endfor %}"}'
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"language": "liquid",
"syntax": {
"ok": false,
"errors": [
{
"line": 3,
"severity": "error",
"rule": "syntax/unbalanced-block",
"message": "{% endfor %} closes {% for %}, but the innermost open block is {% if %} (line 1)"
}
]
},
"issues": [
{
"line": 1,
"severity": "error",
"rule": "logic/js-operator",
"message": "'&&' is not Liquid (condition) — expressions with it fail",
"hint": "use 'and'"
}
],
"counts": {
"error": 3,
"warning": 0,
"info": 0
},
"verdict": "errors"
}How payment works
There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.