Skip to content
ToolsOnDuty - free online tools
ToolsOnDuty / docs
Browse documentation

Reference / Data Formats

Data Formats API

3 endpoints for data formats workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/convert/json-to-jsonp1 credit / call

JSON to JSONP

Parse JSON and wrap it in a validated JavaScript callback.

ParameterTypeRequiredDescription
jsonstringYesValid JSON text.
callbackstringNoJavaScript callback name or dotted path. Default: callback.

Request

curl -X POST https://toolsonduty.com/api/v1/convert/json-to-jsonp \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"json":"{\"ok\":true}","callback":"handle"}'

Response

{
  "ok": true,
  "data": {
    "result": "handle({\"ok\":true});"
  }
}
POST/v1/convert/rss-json1 credit / call

RSS to JSON

Convert RSS or Atom channel metadata and up to 500 entries into JSON.

ParameterTypeRequiredDescription
xmlstringYesRSS or Atom XML.

Request

curl -X POST https://toolsonduty.com/api/v1/convert/rss-json \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<rss><channel><title>Feed</title><item><title>Post</title></item></channel></rss>"}'

Response

{
  "ok": true,
  "data": {
    "title": "Feed",
    "itemCount": 1,
    "items": [
      {
        "title": "Post"
      }
    ]
  }
}
POST/v1/convert/markdown-html1 credit / call

Markdown to HTML

Convert common Markdown constructs to escaped, sanitized HTML without fetching external resources.

ParameterTypeRequiredDescription
markdownstringYesMarkdown source.

Request

curl -X POST https://toolsonduty.com/api/v1/convert/markdown-html \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Hello"}'

Response

{
  "ok": true,
  "data": {
    "html": "<h1>Hello</h1>"
  }
}