Stem Text API

The Text Stemming API is used to get the root form of a word. It is useful for searching and natural language processing.

The API works on English text.

GET
https://api.apileague.com/stem-text

Parameters

NameExampleDescription
text
s r q
The laziest dogs are jumping over the quicker brown foxes.The English text to be stemmed. Max 2,000 characters for Latin-script text. Because the text travels in the URL, texts in other scripts are limited to about 800 characters.
api-key
s r q
abcd1234Your API key.
Example Request and Response
GET
https://api.apileague.com/stem-text?text=The+laziest+dogs+are+jumping+over+the+quicker+brown+foxes
{
    "original": "The laziest dogs are jumping over the quicker brown foxes",
    "stemmed": "The laziest dog are jump over the quicker brown fox"
}
 Copy Codecurl -X GET 'https://api.apileague.com/stem-text?text=The+laziest+dogs+are+jumping+over+the+quicker+brown+foxes' \ -H 'x-api-key: myapikey'

Headers

Response Headers:

  • Content-Type: application/json
  • X-API-Quota-Request: The number of tokens used by the request
  • X-API-Quota-Used: The number of tokens used in total today
  • X-API-Quota-Left: The number of tokens left today (depends on your plan)

Frequently Asked Questions

What is stemming?

Stemming is the process of reducing a word to its base or root form. For example, "fishing", "fished", and "fisher" all stem to "fish".

Does it handle irregular verbs?

The API uses algorithmic stemming which handles many common cases, but it may not always perfectly handle all irregular verbs compared to lemmatization.

Is it useful for search engines?

Yes, stemming is commonly used in search engines to match queries with documents containing different variations of the same word.

How is the Stem Text API different from the Word Singularization/Pluralization API?

The Stem Text API reduces words to their root form (e.g., "running" to "run"), while the Word Singularization/Pluralization API specifically converts words between singular and plural forms.

Questions? Need Help? Ask Away

Quotas

Calling this endpoint costs
1 token