ForHosting KIT · Text & AI

Extract words starting with a prefix

Give the prefix a and "apple apricot banana avocado berry almond" returns apple, apricot, avocado and almond: 4 matches out of 6 words, in the order they appear. Use it for spelling practice, index letters or shared code stems. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
apple apricot banana avocado berry almond
Prefix
a
You get
Words
apple, apricot, avocado, almond
Quantity
4
Total words
6

Editors, teachers, SEO analysts, and developers often need a short list of every word that begins with a given letter or code prefix—not a full frequency table and not a unique-word dump of the whole document. This extract-words-starting-with tool accepts plain text and a required prefix, tokenizes Unicode letter and digit runs (including internal apostrophes such as don't), and returns every matching surface form in order of appearance. Case-insensitive matching is on by default so Apple and apple both match prefix a, or you can switch to strict case when coded tags must keep their casing. The response includes the ordered list, match count, total token count, the prefix you sent, and a method tag for pipelines.

What “words starting with” means and how matches are chosen

A word starting with a prefix is a token whose leading characters equal that prefix under a clear definition of word boundaries and of case. This capability defines a word as a maximal run of Unicode letters or digits, optionally joined by an internal apostrophe so contractions and names such as don't or O'Brien stay one token. Punctuation, symbols, and bare whitespace only separate tokens; they never appear in the output list.

Every occurrence is kept in document order, including duplicates, so you can see how often a coded stem repeats without a second pass. A success response may legitimately contain an empty words array when the text has tokens but none share the prefix—that is a valid filter result, not an error.

Where a prefix word extractor earns its keep

Language teachers build starter lists for phonics and spelling: paste a passage, set prefix th or un, and hand students every matching word in order without manual highlighting. Content and SEO teams harvest candidate keywords or product codes that share a stem (geo, bio, multi) from long copy before writing meta tags. Developers and ops scripts pull inventory SKUs, feature-flag names, or log tokens that begin with a project prefix from mixed free text.

Glossary and terminology workflows isolate terms under a letter range when preparing alphabetical indexes. Keep requests under the character limit, pin the ordered words array and counts in automated tests, and you get a reproducible prefix filter for CMS plugins, LMS exercises, edge workers, and batch cleanup scripts without standing up a full NLP stack.

Phonics and vocabulary drills

Paste a reading passage and a letter or cluster prefix to list every matching word for classroom spelling and phonics practice.

Tag and code stem harvest

Pull product codes, hashtags, or feature names that share a project prefix from mixed notes and release text.

Glossary and index prep

Filter long technical copy for terms starting with a chosen stem when building alphabetical glossaries or SEO keyword shortlists.

How does extract words starting with work?

It tokenizes your text into Unicode letter/digit words (with internal apostrophes), keeps tokens that begin with your prefix under the active case rules, and returns them in order of appearance with counts.

Are duplicate matches included?

Yes. Every occurrence is listed in document order so you can see repetition. Use a separate unique-word tool if you only want distinct forms.

What if no words match the prefix?

Errors are reserved for missing or empty required fields and other invalid input.

Does uppercase matter when matching a prefix?

Not by default: Apple matches the prefix a, and PreFix matches pre. Switch on strict matching when coded tags must keep their casing; then PreFix matches only Pre, not pre.

Are contractions such as don't kept as one word?

Yes. An apostrophe inside a word keeps it whole, so don't and O'Brien each count as one word. Punctuation, symbols and spaces only separate words and never appear in the list.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/str/extract-words-starting

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/str/extract-words-starting \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"apple apricot banana avocado berry almond","prefix":"a"}'
{
  "text": "apple apricot banana avocado berry almond",
  "prefix": "a"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "str.extract_words_starting",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_chars100000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Empty text or an empty prefix fails with invalid_input rather than inventing matches.

What “words starting with” means and how matches are chosen

Matching uses JavaScript-style startsWith on the token after optional lowercasing: when case_insensitive is true (the default), both the token and the prefix are compared in lowercase, so PreFix and prefix both match prefix pre. When case_insensitive is false, PreFix matches only prefix Pre, not pre. Only missing or empty fields, over-length input, and invalid boolean forms raise invalid_input. This keeps filter semantics honest for vocabulary drills, hashtag harvests, and inventory code sweeps where zero hits is a normal outcome.

Input contract, response shape, and error behaviour

Finite numbers and bigints for text or prefix are stringified; objects, arrays, and bare booleans are rejected. Example: text apple apricot banana avocado berry almond with prefix a yields apple, apricot, avocado, and almond—four matches out of six tokens when matching is case-insensitive. POST a JSON body with two required fields: text, a non-empty string to scan (aliases include input, string, value, content, and s), and prefix, a non-empty string that each match must begin with (aliases starts_with, start, and p). Optional case_insensitive defaults to true and also accepts ignore_case, ci, or casefold; boolean values, 0/1, and common true/false strings are accepted. Length is capped at one hundred thousand characters so browser and Worker scans stay bounded. On success the body includes words (ordered matching surface forms), count (length of words), total_words (all tokens after tokenization), prefix (echo of the string you provided), case_insensitive (effective flag), and method set to extract_words_starting for pipeline tagging. Missing text, empty text, whitespace-only text, missing prefix, empty prefix, over-length fields, and malformed booleans fail with invalid_input and are not billed. Pair this endpoint with a unique-word lister when you need the full vocabulary without a prefix filter, or with a most-common-word finder when you care only about the single peak token.

Is matching case-sensitive?

By default no: case_insensitive is true, so Apple matches prefix a. Set case_insensitive to false for strict letter-case matching.

What does extract words starting with cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →