Better Fetch

Extract Article

Turn any article URL into clean, structured text: title, byline, publish date, and full body text — ready for LLM context windows. Works on paywalled-lite and bot-protected pages via the stealth engine.

Workspace

Configure

Inputs stay here while results become exportable artifacts.

Start from an example

The article URL to extract

Truncate the extracted text to this many characters

Sign in and run
~1 base credit/run10 runs/minute

Results

Preview, inspect, copy, or export the complete output.

Your result will become an artifact

Run the tool to inspect structured rows, raw JSON, execution details, and downloadable JSON, CSV, and Markdown files.

texttitlebylinefinal_urlpublishedsite_nameword_count

Overview

Extract Article turns messy web pages into clean text that agents can summarize, cite, classify, or store. It fetches the article through Better Fetch, prefers article and main content regions, preserves useful metadata, and returns a compact payload designed for LLM context windows.

Last validated: Jul 3, 2026

Input

urlstring (uri)required

The article URL to extract

max_charsintegerdefault: 100000

Truncate the extracted text to this many characters

Output

textstringrequired

Clean article body text

titlestringrequired

Article title (og:title preferred)

bylinestring

Author, when detectable

final_urlstringrequired

URL after redirects

publishedstring

Publish date (ISO where available)

site_namestring

Publication name

word_countinteger

Words in the extracted text

Examples

wikipedia-web-scraping

{
  "url": "https://en.wikipedia.org/wiki/Web_scraping",
  "max_chars": 5000
}

Use cases

Research ingestion

Convert article URLs into normalized text and metadata before saving them to a knowledge base, vector store, spreadsheet, or editorial workflow.

Agent context prep

Let an AI agent fetch a source article and receive clean title, byline, publish date, final URL, word count, and body text in one structured response.

FAQ

Does Extract Article return the rendered page HTML?

No. The tool uses rendered and response HTML internally, then returns clean article text and metadata so downstream agents do not need to parse markup.

Can I limit the amount of returned article text?

Yes. Pass max_chars to cap the extracted text length, which helps keep long articles inside the context window budget for downstream models.

Use it anywhere

MCP (Claude, ChatGPT, Codex)

# After connecting https://betterfetch.co/api/mcp, ask your AI to:
1. Call search_tools for "Extract Article"
2. Call run_tool with:
   name: "extract_article"
   input: {"url":"https://en.wikipedia.org/wiki/Web_scraping","max_chars":5000}

REST

curl -sS -X POST "https://betterfetch.co/api/tools/extract_article/run" \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": {"url":"https://en.wikipedia.org/wiki/Web_scraping","max_chars":5000}}'

Run locally

git clone https://github.com/better-fetch/tools/tree/main/tools/extract-article && cd extract-article && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"url":"https://en.wikipedia.org/wiki/Web_scraping","max_chars":5000}'