Developer API

Run HTMLToolz from scripts, CI, and internal tools.

The paid API turns the browser toolbox into a dependable automation surface: format code, validate JSON, decode tokens, generate slugs, hash text, run batches, and sync extension data with one API key.

Tool runner

Use /api/v1/tools/run for one stable endpoint across supported tools.

Batch automation

Run multiple transforms in one request. Pro, Team, and Agency get graduated batch sizes.

Entitlements

/api/v1/me reports plan, limits, usage, and whether API/MCP access is active.

Tool packs and workflow recipes

Need a real starting point? Tool packs show the outcome, free tools, paid unlocks, API batch JSON, and matching MCP prompts for launch QA, payload cleanup, email HTML repair, and assistant context packs.

Open tool packs Workflow library

Test your API key

Runs in your browser against /api/v1/tools/run. Your key is only sent to HTMLToolz for this request and is not stored.

Response will appear here.

Authentication

Every paid API request needs your key in the Authorization header:

Authorization: Bearer htk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keys are shown once, stored as hashes, and can be revoked instantly from your account. GET /api/v1/me works for every valid key; transform endpoints return 403 when the account lacks API access.

Buy Pro for an API key

Quick start

curl -X POST https://htmltoolz.com/api/v1/tools/run \
  -H "Authorization: Bearer htk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tool":"json-formatter","input":"{\"hello\":\"world\"}","options":{"minify":false}}'
{"ok":true,"tool":"json-formatter","output":"{\n    \"hello\": \"world\"\n}"}

Endpoints

MethodEndpointPurpose
GET/api/v1/mePlan, entitlements, and usage.
GET/api/v1/toolsSupported paid API tool catalog.
POST/api/v1/tools/runRun one supported tool with tool, input, and optional options.
POST/api/v1/batchRun multiple tool operations in one request.
PUT/api/v1/ext/sync?kind=promptsCloud sync storage for extension prompts.

Supported tools

json-formatterValidate, format, and minify JSON
html-formatterBeautify HTML
html-minifierCompact HTML
html-stripperHTML to plain text
html-entity-encoderEncode/decode entities
css-minifierCompact CSS
base64Encode/decode Base64
url-encoderEncode/decode URL components
jwt-decoderDecode JWT header and payload
hash-generatorGenerate SHA/MD5 hashes
slug-generatorCreate URL slugs
case-converterChange text casing
text-statisticsCount text metrics
uuid-generatorGenerate UUIDs
timestamp-converterUnix timestamp to ISO

Batch example

curl -X POST https://htmltoolz.com/api/v1/batch \
  -H "Authorization: Bearer htk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operations":[
    {"tool":"slug-generator","input":"Launch Notes: HTMLToolz API"},
    {"tool":"hash-generator","input":"release-v2","options":{"algorithm":"sha256"}},
    {"tool":"text-statistics","input":"One API. Many tools."}
  ]}'

Batch limits are plan-based: Pro handles quick scripts, Team handles shared workflows, and Agency handles higher-volume client automation.

Errors

StatusMeaning
401Missing, invalid, or revoked API key.
403The key is valid, but the account plan does not include this feature.
413Request body or batch operation count is too large.
422Bad input, unsupported tool, invalid JSON, or invalid tool options.
429Daily API rate limit exceeded.

Ads API Ads plan

Two endpoints proxy calls to your connected Google Ads (and Microsoft Ads beta) account. Requires the Ads add-on plan and an OAuth-connected ad account. The Ads connector page covers setup; the MCP page covers the npm package.

Endpoints

MethodEndpointPurpose
GET/api/v1/ads/statusList connected accounts, write access, and today's ad call usage.
POST/api/v1/ads/callProxy a tool call to your connected ad account.

GET /api/v1/ads/status

curl https://htmltoolz.com/api/v1/ads/status \
  -H "Authorization: Bearer htk_live_YOUR_KEY"
{
  "ok": true,
  "connections": [
    { "provider": "google", "account_id": "123-456-7890", "label": "My Account", "connected_at": "2025-01-01" }
  ],
  "ads_write": true,
  "daily": { "used": 12, "limit": 5000 }
}

POST /api/v1/ads/call

curl -X POST https://htmltoolz.com/api/v1/ads/call \
  -H "Authorization: Bearer htk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "google",
    "method": "campaign_report",
    "args": { "date_range": "LAST_30_DAYS" }
  }'
{
  "ok": true,
  "result": [
    { "campaign": "Brand", "impressions": 14200, "clicks": 830, "cost": 412.50, "ctr": 0.0584, "avg_cpc": 0.50 }
  ]
}

Available methods

list_accountsAccessible Google Ads customer accounts.
list_campaignsCampaigns with status and daily budget.
campaign_reportPer-campaign performance metrics.
search_terms_reportTop search terms by cost.
keyword_ideasSearch volume + competition for seed keywords.
searchRaw GAQL query.
update_campaign_statusEnable or pause a campaign. (write)
update_campaign_budgetSet daily budget. (write)
add_campaign_negative_keywordAdd a negative keyword. (write)

Write methods require ads_write entitlement (included in Ads plan). Pass "provider": "microsoft" with "method": "verify_auth" to test a Microsoft Ads connection (full methods coming soon).