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
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.
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)requiredThe article URL to extract
max_charsintegerdefault: 100000Truncate the extracted text to this many characters
Output
textstringrequiredClean article body text
titlestringrequiredArticle title (og:title preferred)
bylinestringAuthor, when detectable
final_urlstringrequiredURL after redirects
publishedstringPublish date (ISO where available)
site_namestringPublication name
word_countintegerWords in the extracted text
Examples
wikipedia-web-scraping
{
"url": "https://en.wikipedia.org/wiki/Web_scraping",
"max_chars": 5000
}Use cases
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}'