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

Reference / Text Analysis

Text Analysis API

17 endpoints for text analysis 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/text/anagram1 credit / call

Anagram detector

Check whether two values contain the same Unicode letters and numbers after normalization.

ParameterTypeRequiredDescription
firststringYesFirst word or phrase.
secondstringYesSecond word or phrase.

Request

curl -X POST https://toolsonduty.com/api/v1/text/anagram \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"first":"listen","second":"silent"}'

Response

{
  "ok": true,
  "data": {
    "isAnagram": true,
    "normalizedFirst": "eilnst",
    "normalizedSecond": "eilnst"
  }
}
POST/v1/text/palindrome1 credit / call

Palindrome checker

Check whether text reads the same forwards and backwards after ignoring punctuation, spacing and case.

ParameterTypeRequiredDescription
textstringYesText to check.

Request

curl -X POST https://toolsonduty.com/api/v1/text/palindrome \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"Never odd or even"}'

Response

{
  "ok": true,
  "data": {
    "isPalindrome": true,
    "normalized": "neveroddoreven"
  }
}
POST/v1/text/levenshtein1 credit / call

Levenshtein distance

Calculate the minimum insertions, deletions and substitutions between two strings.

ParameterTypeRequiredDescription
firststringYesFirst string, up to 2,000 characters.
secondstringYesSecond string, up to 2,000 characters.

Request

curl -X POST https://toolsonduty.com/api/v1/text/levenshtein \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"first":"kitten","second":"sitting"}'

Response

{
  "ok": true,
  "data": {
    "distance": 3
  }
}
POST/v1/text/similarity1 credit / call

Text similarity

Compare two strings using normalized Levenshtein distance.

ParameterTypeRequiredDescription
firststringYesFirst string, up to 2,000 characters.
secondstringYesSecond string, up to 2,000 characters.

Request

curl -X POST https://toolsonduty.com/api/v1/text/similarity \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"first":"hello","second":"hallo"}'

Response

{
  "ok": true,
  "data": {
    "distance": 1,
    "similarity": 80
  }
}
POST/v1/text/syllables1 credit / call

English syllable counter

Estimate total and per-word English syllable counts.

ParameterTypeRequiredDescription
textstringYesEnglish text to analyze.

Request

curl -X POST https://toolsonduty.com/api/v1/text/syllables \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"Beautiful language"}'

Response

{
  "ok": true,
  "data": {
    "syllables": 5,
    "words": 2
  }
}
POST/v1/text/vowels1 credit / call

Vowel counter

Count A, E, I, O and U occurrences in text.

ParameterTypeRequiredDescription
textstringYesText to analyze.

Request

curl -X POST https://toolsonduty.com/api/v1/text/vowels \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"ToolsOnDuty"}'

Response

{
  "ok": true,
  "data": {
    "total": 4,
    "counts": {
      "a": 0,
      "e": 0,
      "i": 0,
      "o": 3,
      "u": 1
    }
  }
}
POST/v1/text/soundex1 credit / call

Soundex phonetic encoder

Encode an English name or word as a four-character American Soundex code.

ParameterTypeRequiredDescription
textstringYesEnglish name or word.

Request

curl -X POST https://toolsonduty.com/api/v1/text/soundex \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"Robert"}'

Response

{
  "ok": true,
  "data": {
    "soundex": "R163"
  }
}
POST/v1/text/expand-acronyms1 credit / call

Acronym expander

Expand built-in common technology, web and business acronyms.

ParameterTypeRequiredDescription
textstringYesText containing acronyms.

Request

curl -X POST https://toolsonduty.com/api/v1/text/expand-acronyms \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"Use the API over HTTPS."}'

Response

{
  "ok": true,
  "data": {
    "expandedText": "Use the Application Programming Interface over Hypertext Transfer Protocol Secure."
  }
}
POST/v1/text/parse-human-name1 credit / call

Human name parser

Heuristically split a Western-style name into prefix, first, middle, last and suffix fields.

ParameterTypeRequiredDescription
namestringYesFull personal name.

Request

curl -X POST https://toolsonduty.com/api/v1/text/parse-human-name \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dr. Ada Lovelace PhD"}'

Response

{
  "ok": true,
  "data": {
    "prefix": "Dr.",
    "firstName": "Ada",
    "middleNames": [],
    "lastName": "Lovelace",
    "suffix": "PhD"
  }
}
POST/v1/text/parse-address1 credit / call

Street-address parser

Heuristically split a US-style street address into structured fields.

ParameterTypeRequiredDescription
addressstringYesUS-style street address.

Request

curl -X POST https://toolsonduty.com/api/v1/text/parse-address \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"address":"1600 Pennsylvania Avenue NW, Washington, DC 20500"}'

Response

{
  "ok": true,
  "data": {
    "parsed": true,
    "houseNumber": "1600",
    "city": "Washington",
    "state": "DC",
    "postalCode": "20500"
  }
}
POST/v1/text/metaphone1 credit / call

Metaphone encoder

Create an English Metaphone code for approximate pronunciation matching.

ParameterTypeRequiredDescription
textstringYesEnglish name or word.

Request

curl -X POST https://toolsonduty.com/api/v1/text/metaphone \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"Smith"}'

Response

{
  "ok": true,
  "data": {
    "metaphone": "SM0"
  }
}
POST/v1/text/gibberish1 credit / call

Gibberish detector

Estimate whether Latin text resembles readable English using vowel and bigram heuristics.

ParameterTypeRequiredDescription
textstringYesText to analyze.

Request

curl -X POST https://toolsonduty.com/api/v1/text/gibberish \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"This is a readable sentence."}'

Response

{
  "ok": true,
  "data": {
    "gibberish": false,
    "confidence": 20
  }
}
POST/v1/text/keywords1 credit / call

Keyword extractor

Extract frequent meaningful words after case normalization and stop-word removal.

ParameterTypeRequiredDescription
textstringYesText to analyze.
limitnumberNoMaximum keywords from 1 to 50. Default: 10.

Request

curl -X POST https://toolsonduty.com/api/v1/text/keywords \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"API documentation helps API developers.","limit":5}'

Response

{
  "ok": true,
  "data": {
    "wordCount": 5,
    "keywords": [
      {
        "keyword": "api",
        "count": 2
      }
    ]
  }
}
POST/v1/text/language1 credit / call

Text language detector

Detect major Unicode scripts and estimate English, Spanish, French or German for Latin text.

ParameterTypeRequiredDescription
textstringYesText to analyze.

Request

curl -X POST https://toolsonduty.com/api/v1/text/language \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"This is written in English."}'

Response

{
  "ok": true,
  "data": {
    "language": "English",
    "script": "Latin"
  }
}
POST/v1/text/parts-of-speech1 credit / call

Parts-of-speech tagger

Classify English tokens with a transparent rule-based heuristic; no external NLP service is used.

ParameterTypeRequiredDescription
textstringYesEnglish text to classify.

Request

curl -X POST https://toolsonduty.com/api/v1/text/parts-of-speech \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"The quick fox jumps."}'

Response

{
  "ok": true,
  "data": {
    "method": "rule-based English heuristic"
  }
}
POST/v1/text/lemmatize1 credit / call

English lemmatizer

Reduce common English inflections with a documented rule-based heuristic.

ParameterTypeRequiredDescription
textstringYesEnglish text to lemmatize.

Request

curl -X POST https://toolsonduty.com/api/v1/text/lemmatize \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"Children were running."}'

Response

{
  "ok": true,
  "data": {
    "result": "Child were run."
  }
}