{"slug":"code-halowerk-com-v1-code-format-203708","title":"Format source code with prettier (JS/TS/JSX, JSON, CSS/SCSS/Less, HTML, Vue, Ang","host":"code.halowerk.com","method":"POST","resource":"https://code.halowerk.com/v1/code-format","category":"code","description":"Format source code with prettier (JS/TS/JSX, JSON, CSS/SCSS/Less, HTML, Vue, Angular, Handlebars, Markdown/MDX, YAML, GraphQL) or SQL with sql-formatter. Runs prettier 3.9.10 with the chosen options and returns the formatted text plus whether anything changed. SQL is formatted with sql-formatter 15.","price_listed":0.003,"price_asked":0.003,"state":"answering","state_label":"Answering","checks_7d":7,"answered_7d":7,"latency_ms_median":890,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"code":"interface A{a:string;b?:number}\nconst x:A={a:\"1\"}","language":"typescript"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"code":{"maxLength":500000,"type":"string"},"keyword_case":{"default":"preserve","enum":["preserve","upper","lower"],"type":"string"},"language":{"enum":["javascript","jsx","typescript","tsx","flow","json","json5","jsonc","css","scss","less","html","vue","angular","handlebars","markdown","mdx","yaml","graphql","sql","python","go","rust"],"type":"string"},"print_width":{"default":80,"maximum":200,"minimum":40,"type":"integer"},"prose_wrap":{"default":"preserve","enum":["always","never","preserve"],"type":"string"},"semi":{"default":true,"type":"boolean"},"single_quote":{"default":false,"type":"boolean"},"sql_dialect":{"default":"sql","enum":["sql","mysql","mariadb","postgresql","bigquery","snowflake","duckdb","sqlite","tsql","redshift","trino","spark","db2","plsql"],"type":"string"},"tab_width":{"default":2,"maximum":8,"minimum":1,"type":"integer"},"trailing_comma":{"default":"all","enum":["all","es5","none"],"type":"string"},"use_tabs":{"default":false,"type":"boolean"}},"required":["code","language"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":988,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":899,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":904,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":890,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":866,"error":null},{"day":"2026-11-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":874,"error":null},{"day":"2026-11-20","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.003,"price_match":true,"latency_ms":885,"error":null}],"description_full":"Format source code with prettier (JS/TS/JSX, JSON, CSS/SCSS/Less, HTML, Vue, Angular, Handlebars, Markdown/MDX, YAML, GraphQL) or SQL with sql-formatter. Runs prettier 3.9.10 with the chosen options and returns the formatted text plus whether anything changed. SQL is formatted with sql-formatter 15.9.0 for the selected dialect.","last_updated":"2026-11-20T12:17:11.177Z","schemes":["exact"]}