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

Reference / SEO

SEO API

7 endpoints for seo 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/seo/schema-validate1 credit / call

JSON-LD validator

Validate JSON-LD syntax and the core @context and @type fields.

ParameterTypeRequiredDescription
jsonstringYesJSON-LD document.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/schema-validate \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"json":"{\"@context\":\"https://schema.org\",\"@type\":\"Article\"}"}'

Response

{
  "ok": true,
  "data": {
    "valid": true
  }
}
POST/v1/seo/sitemap-generate1 credit / call

XML sitemap generator

Generate a standards-compatible XML sitemap from newline- or comma-separated HTTP(S) URLs.

ParameterTypeRequiredDescription
urlsstringYesNewline- or comma-separated URLs.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/sitemap-generate \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"urls":"https://example.com/\nhttps://example.com/about"}'

Response

{
  "ok": true,
  "data": {
    "count": 2
  }
}
POST/v1/seo/sitemap-validate1 credit / call

XML sitemap validator

Validate sitemap structure, URL count and HTTP(S) loc entries without fetching the URLs.

ParameterTypeRequiredDescription
xmlstringYesXML sitemap source.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/sitemap-validate \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"xml":"<urlset><url><loc>https://example.com/</loc></url></urlset>"}'

Response

{
  "ok": true,
  "data": {
    "valid": true,
    "urlCount": 1
  }
}
POST/v1/seo/headings1 credit / call

HTML heading outline

Extract H1-H6 headings and flag missing H1, multiple H1 and skipped levels.

ParameterTypeRequiredDescription
htmlstringYesHTML source.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/headings \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Title</h1><h2>Section</h2>"}'

Response

{
  "ok": true,
  "data": {
    "headings": [
      {
        "level": 1,
        "text": "Title"
      }
    ]
  }
}
POST/v1/seo/robots-test1 credit / call

robots.txt path tester

Evaluate Allow and Disallow prefix rules for a path and user agent without making a network request.

ParameterTypeRequiredDescription
robotsstringYesrobots.txt source.
pathstringYesURL path beginning with /.
userAgentstringNoUser-agent token. Default: *.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/robots-test \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"robots":"User-agent: *\nDisallow: /private","path":"/private/page"}'

Response

{
  "ok": true,
  "data": {
    "allowed": false
  }
}
POST/v1/seo/hreflang-generate1 credit / call

Hreflang generator

Generate alternate link tags from language-and-URL entries.

ParameterTypeRequiredDescription
entriesstringYesOne language|URL entry per line.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/hreflang-generate \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"entries":"en|https://example.com/\nfr|https://example.com/fr"}'

Response

{
  "ok": true,
  "data": {
    "tags": []
  }
}
POST/v1/seo/hreflang-validate1 credit / call

Hreflang validator

Extract and validate alternate hreflang link tags from HTML.

ParameterTypeRequiredDescription
htmlstringYesHTML containing alternate link tags.

Request

curl -X POST https://toolsonduty.com/api/v1/seo/hreflang-validate \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"html":"<link rel=\"alternate\" hreflang=\"en\" href=\"https://example.com/\">"}'

Response

{
  "ok": true,
  "data": {
    "valid": true
  }
}