Keyword Extractor
text.extract_keywords
Overview
Extracts keyword candidates using single-document term-frequency (TF) analysis with stopword filtering. This is TF only — NOT TF-IDF: there is no reference corpus or inverse-document-frequency weighting, so common-but-uninformative terms are down-weighted only by the stopword list. Deterministic, no LLM. Stable sort by frequency desc, first occurrence, then lexical order. Accepts file input via file_ref — no need to extract file content first.
Word-frequency ranking is statistical, not semantic — we give you deterministic TF-based keywords so tagging and indexing stay reproducible without LLM overhead.
Reliability
BEST_EFFORT and deterministic on this deployment — identical input always yields identical rankings (frequency desc, then first occurrence, then lexical order). Single-document TF only (no IDF/corpus), so common terms may rank high unless you extend stopwords. We lower-case everything and skip one-character words, and a hyphenated or apostrophised word stays whole. Input validation (not retryable): stopwords that is not an array of strings; neither text nor file_ref; both text and file_ref; text longer than 1,048,576 characters.
Context footprint
Accepts inline text up to ~1M chars or file input via file_ref (up to 2 MB). Upload files via POST /v1/files/upload before passing file_ref. A successful call costs 2 execution credits.
When to use it
When you need ranked keyword candidates from a document for tags, search indexes, or classification — especially in batch pipelines.
Do not use for semantic understanding, topic modeling, or named-entity recognition (use text.extract_entities_regex instead).
Scope
Non-goals
- Does not perform semantic or contextual analysis — purely statistical
- Does not use LLM-based extraction or embeddings
- Does not perform topic modeling or clustering
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 1.9 MiB | Skill maximum |
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | No | Bounded inline text source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both. |
| maxKeywords | integer | No | Keyword cap; omit it for ten. |
| stopwords | array | No | Bounded optional stopword array; omit it to use the pinned built-in English stopword set. The item shape is defined by the nested schema and the array contains from 0 through 10000 items. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| keywords | array | Yes | Bounded array of keyword receipts ordered by score with keyword, count, and score properties. The item shape is defined by the nested schema and the array contains from 0 through 1000 items. |
| totalCandidates | integer | Yes | Candidate count before truncation. |
| returned | integer | Yes | Returned keyword count. |
| method | string | Yes | Applied extraction method. |
| stopwordsVersion | string | Yes | Pinned built-in stopword-set version. |
| truncated | boolean | No | Whether the keyword cap omitted candidates. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.extract_keywords","input":{"text":"Cloud computing infrastructure enables scalable resources.","maxKeywords":10}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("text.extract_keywords", {"maxKeywords":5,"text":"Cloud computing infrastructure enables organizations to scale their computing resources on demand. Modern cloud platforms provide computing power, storage, and networking as managed services. Infrastructure as code automates cloud resource provisioning."});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not perform semantic or contextual analysis — purely statistical
- Does not use LLM-based extraction or embeddings
- Does not perform topic modeling or clustering
- Semantic analysis requiring contextual understanding
- Topic modeling or document clustering
- Named entity recognition (use text.extract_entities_regex instead)
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "text.extract_keywords",
"input": {
"maxKeywords": 5,
"text": "Cloud computing infrastructure enables organizations to scale their computing resources on demand. Modern cloud platforms provide computing power, storage, and networking as managed services. Infrastructure as code automates cloud resource provisioning."
}
}Examples
Extract from technical article
{
"maxKeywords": 5,
"text": "Cloud computing infrastructure enables organizations to scale their computing resources on demand. Modern cloud platforms provide computing power, storage, and networking as managed services. Infrastructure as code automates cloud resource provisioning."
}{
"returned": 5,
"stopwordsVersion": "english-v1",
"keywords": [
{
"keyword": "cloud",
"score": 0.12,
"count": 3
},
{
"keyword": "computing",
"score": 0.12,
"count": 3
},
{
"keyword": "infrastructure",
"score": 0.08,
"count": 2
},
{
"keyword": "enables",
"score": 0.04,
"count": 1
},
{
"keyword": "organizations",
"score": 0.04,
"count": 1
}
],
"truncated": true,
"method": "tf",
"totalCandidates": 20
}Custom stopwords
{
"text": "Cloud computing infrastructure enables organizations to scale their computing resources on demand.",
"maxKeywords": 3,
"stopwords": [
"cloud",
"computing"
]
}{
"returned": 3,
"stopwordsVersion": "english-v1",
"keywords": [
{
"keyword": "infrastructure",
"score": 0.1111,
"count": 1
},
{
"keyword": "enables",
"score": 0.1111,
"count": 1
},
{
"keyword": "organizations",
"score": 0.1111,
"count": 1
}
],
"truncated": true,
"method": "tf",
"totalCandidates": 9
}Recommended use cases
- Generate content tags for articles or documents
- Build search indexes from document collections
- Identify dominant terms for content classification
Avoid for
- Semantic analysis requiring contextual understanding
- Topic modeling or document clustering
- Named entity recognition (use text.extract_entities_regex instead)
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.