Extract keywords and key phrases from text using TF-IDF and RAKE algorithms
Automatically extract the most relevant keywords and phrases from any text using NLP techniques including TF-IDF and RAKE algorithms. Keyword extraction powers content tagging, SEO optimization, document classification, and search indexing — saving hours of manual content analysis across large document collections.
X-API-Key header with every request.
All requests go through the API gateway which handles authentication, rate limiting, and usage tracking.
{
"text": "Machine learning algorithms process large datasets to identify patterns and make predictions.",
"maxKeywords": 5
}
| Field | Type | Description |
|---|---|---|
text |
string |
Text content to analyze |
maxKeywords |
integer |
Field value |
{
"keywords": [
{
"keyword": "machine learning algorithms",
"score": 9.2
},
{
"keyword": "large datasets",
"score": 7.5
},
{
"keyword": "identify patterns",
"score": 6.8
},
{
"keyword": "predictions",
"score": 4.1
},
{
"keyword": "process",
"score": 2.3
}
],
"language": "en",
"wordCount": 13
}
| Field | Type | Description |
|---|---|---|
keywords |
array |
Array of items |
language |
string |
Field value |
wordCount |
integer |
Field value |
| Status | Meaning |
|---|---|
200 | Request completed successfully |
400 | Bad request — invalid or missing parameters |
401 | Missing or invalid X-API-Key header |
429 | Rate limit exceeded — check Retry-After header |
500 | Internal server error |
400 Empty textRequest that triggers this:
{"text": ""}
Error response:
{"type": "/problems/validation-error", "title": "Empty Text", "status": 400, "detail": "Text cannot be empty"}
How to fix: Provide non-empty text content. The text should contain at least some meaningful content.
400 Unsupported languageRequest that triggers this:
{"text": "content in xyz language"}
Error response:
{"type": "/problems/validation-error", "title": "Unsupported Language", "status": 400, "detail": "Language not supported"}
How to fix: Use supported languages (English, Spanish, French, German, etc.) or explicitly specify the language.
curl -X POST /v1/text/keywords \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"text": "Machine learning algorithms process large datasets to identify patterns and make predictions.",
"maxKeywords": 5
}'
// Node.js (18+) or modern browser
const response = await fetch("/v1/text/keywords", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"text": "Machine learning algorithms process large datasets to identify patterns and make predictions.",
"maxKeywords": 5
}),
});
const data = await response.json();
console.log(response.status, data);
import requests
response = requests.post(
"/v1/text/keywords",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"text": "Machine learning algorithms process large datasets to identify patterns and make predictions.",
"maxKeywords": 5
},
)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"text": "Machine learning algorithms process large datasets to identify patterns and make predictions.",
"maxKeywords": 5
}`)
req, _ := http.NewRequest("POST", "/v1/text/keywords", body)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode)
fmt.Println(string(data))
}
{
"name": "keyword_extractor",
"description": "Extract keywords and key phrases from text using TF-IDF and RAKE algorithms",
"inputSchema": {
"type": "object",
"properties": {
"api_key": {"type": "string", "description": "Your Orovai API key"},
"request": {"type": "object", "description": "Request body"}
},
"required": ["api_key", "request"]
},
"endpoint": "/v1/text/keywords",
"method": "POST",
"headers": {
"X-API-Key": "{{api_key}}",
"Content-Type": "application/json"
}
}