Article Extraction API for RAG: Pipfeed Tutorial (2026)

Turn article URLs into clean JSON for RAG and LLM apps. Pipfeed quickstart in curl, Python and Node.js, a full ingestion pipeline, plan prices and cost math.
Article Extraction API for RAG: Pipfeed Tutorial (2026)
Article Extraction API for RAG: Pipfeed Tutorial (2026)

Developers building RAG pipelines usually do not want a web page. They want the article inside it.

Raw HTML is noisy. It includes nav links, cookie banners, related posts, footer text, inline scripts, tracking snippets, and layout markup. If you send that directly into an LLM pipeline, you waste tokens and increase the chance that irrelevant page chrome ends up in your chunks.

An article extraction API solves the narrower problem: give it a URL, get back structured article data. For a RAG workflow, that usually means fields like title, author, article text, HTML, source URL, image, publish date, summary, keywords, and metadata.

API.market has several APIs that touch extraction, summarization and retrieval. For this tutorial, the best fit is Pipfeed because it is focused on article-to-JSON extraction and exposes a single POST extraction operation. This guide covers the request, the response, a full ingestion pipeline from URL list to searchable chunks, how to test extraction quality before you trust it, what the plans cost at real volumes, and how it compares with the other extraction and retrieval listings on the marketplace.

What an article extraction API does

An article extraction API takes a public article URL and returns the readable content in a structured format, usually JSON. The code in this post follows each listing's documented request format.

Instead of building and maintaining your own parser for every news site or blog layout, you make one API request:

{
  "url": "https://example.com/article"
}

The response can include clean text, HTML, title, author, source name, publish date, description, images, summary, and other fields depending on the API.

That makes it useful for:

  • RAG ingestion from public articles
  • News monitoring and classification
  • Summarization tools
  • Internal research feeds
  • Content search indexes
  • Reader-mode features

It is not the same thing as a crawler. A crawler finds many URLs across a site. An article extractor works after you already have a URL and need the page turned into usable data.

Why raw HTML is a bad RAG input

A RAG pipeline usually has a few stages:

  1. collect content
  2. clean and normalize it
  3. split it into chunks
  4. embed those chunks
  5. store them in a vector database
  6. retrieve relevant chunks at query time
  7. pass retrieved context to the model

Article extraction belongs near the start of that pipeline. It gives you cleaner input before chunking and embedding.

If you skip extraction, your chunks may contain unrelated text like:

  • newsletter signup copy
  • navigation labels
  • cookie consent language
  • recommended article links
  • comments or social widgets
  • duplicated headers and footers

That hurts retrieval quality. If a user asks about the article's main point, the retriever should not return a chunk full of menu labels.

There is a cost angle too. Embedding models and LLMs both bill by tokens, and a page's markup often adds far more characters than its readable text. Every token of markup you embed is money spent on content that can only make retrieval worse. Cleaning at the start is the cheapest place to fix it.

Pipfeed article-to-JSON API at a glance

Pipfeed's News Article Data Extract and Summarization API is listed on API.market with a free plan and PAYG pricing available. The catalog entry read on 2026-11-17 shows:

Most popular in this guide
News Article Data Extract and Summarization API | Article-to-JSON API | Pipfeed[Convert any news articles to JSON] Enter a URL of a any text article or post and get clean JSON with title, summary, text and all other properties.
News & mediaBy pipfeed
173subscribers
2.1MAPI calls
Lowest plan: 500 FREE API units
  • API calls: 2,106,504
  • Subscribers: 173
  • Rating: 5.0 from 2 reviews
  • Operation: post_extract
  • Method: POST
  • Required input: url

Catalog counts move and can lag real usage, so treat them as a rough signal only.

The listing documentation shows a response with fields such as url, title, author, html, text, length, description, siteName, topImage, date, keywords, summary, and sentiment. The listing also says it extracts full HTML and text from JavaScript-heavy sites. That is the seller's claim. A 200 response does not prove you got the article, so the pipeline below checks the text itself.

For RAG, the most important fields are usually title, text, url, date, and siteName. The html field can be useful if you need to preserve links or formatting, but plain text is easier to chunk.

Pipfeed plans

Plan data read on 2026-11-17 (unchanged from the 2026-11-02 read):

Plan Price Included calls Limit type Cost per call
Free $0 500 Hard free
Start $4.99 5,000 Hard about $0.00100
Pro $9 15,000 Hard about $0.00060
Ultra $49 100,000 Hard about $0.00049
GIGA $99 300,000 Hard about $0.00033
Mega $199 1,000,000 Soft about $0.00020
Bulk $499 5,000,000 Soft about $0.00010
PAYG $0 per call Soft rate not shown in plan data

A hard limit stops requests when the included calls run out. A soft limit keeps working and bills the overage. The distinction matters for a pipeline: on a hard plan, an ingestion job that hits the cap halfway through will fail on the remaining URLs, so check your usage before you launch a big batch. The cost per call column is just price divided by included calls, assuming one call is one unit.

One more thing about the Free row. On API.market, a finite public free plan with a hard limit works as a one-time trial for each product. It is not a monthly allowance that refills, and a $0 price does not mean you can come back every month. The paid plans are the ones that renew monthly. PAYG shows a $0 monthly price but you pay per usage unit, and the plan data does not show the per-call rate, so check the listing before you budget around it.

Extract an article with curl

Set your API.market key as an environment variable:

export API_MARKET_KEY="your_api_market_key"

Then call the Pipfeed extraction endpoint. The --max-time flag gives the request a finite timeout, and --fail-with-body makes curl exit non-zero on an HTTP error while still printing the error body:

curl -X POST "https://api.magicapi.dev/api/v1/pipfeed/parse/extract" \
  --max-time 45 --fail-with-body \
  -H "accept: application/json" \
  -H "content-type: application/json" \
  -H "x-api-market-key: $API_MARKET_KEY" \
  -d '{"url":"https://techcrunch.com/2022/04/18/web-scraping-legal-court/"}'

The listing documentation shows this exact request with a TechCrunch article, and a response with the fields above. We did not keep a response from our own call for this revision, so the excerpt below is the documented example, trimmed. It is not a fresh test.

{
  "url": "https://techcrunch.com/2022/04/18/web-scraping-legal-court/",
  "title": "Web scraping is legal, US appeals court reaffirms | TechCrunch",
  "author": "Zack Whittaker",
  "text": "Good news for archivists, academics, researchers and journalists...",
  "length": 3533,
  "description": "The landmark web scraping case was bounced back to the Ninth Circuit by the U.S. Supreme Court.",
  "siteName": "TechCrunch",
  "date": "2022-04-18T19:16:57+00:00",
  "summary": [
    "The landmark ruling by the U.S.",
    "The case reached the U.S."
  ]
}

Do not hard-code against this exact shape until you inspect live responses for the URLs you care about. Treat optional fields as optional.

Map the response into a RAG record

Keep the source fields you need for retrieval and citations. A practical normalized record looks like this:

{
  "id": "techcrunch-web-scraping-2022-04-18",
  "source_url": "https://techcrunch.com/2022/04/18/web-scraping-legal-court/",
  "title": "Web scraping is legal, US appeals court reaffirms | TechCrunch",
  "text": "<response.text>",
  "metadata": {
    "author": "Zack Whittaker",
    "site_name": "TechCrunch",
    "published_at": "2022-04-18T19:16:57+00:00"
  }
}

Generate the id in your own ingestion layer. Preserve source_url on every chunk so your application can cite the original article.

Python quickstart

import os
import requests

API_MARKET_KEY = os.environ["API_MARKET_KEY"]
ENDPOINT = "https://api.magicapi.dev/api/v1/pipfeed/parse/extract"

payload = {
    "url": "https://techcrunch.com/2022/04/18/web-scraping-legal-court/"
}

response = requests.post(
    ENDPOINT,
    headers={
        "accept": "application/json",
        "content-type": "application/json",
        "x-api-market-key": API_MARKET_KEY,
    },
    json=payload,
    timeout=(5, 45),  # connect, read
)

response.raise_for_status()
article = response.json()

# A 200 is not enough. Check that real article text came back.
text = (article.get("text") or "").strip()
if len(text) < 300:
    raise ValueError(f"suspiciously short text ({len(text)} chars)")

print(article.get("title"), len(text))

For production, validate the URL before calling the API. At minimum, reject empty strings and unsupported schemes. You probably only want http and https URLs.

from urllib.parse import urlparse


def is_supported_url(value: str) -> bool:
    parsed = urlparse(value)
    return parsed.scheme in {"http", "https"} and bool(parsed.netloc)

Node.js quickstart

This example uses the built-in fetch available in current Node.js versions.

const API_MARKET_KEY = process.env.API_MARKET_KEY;
const endpoint = "https://api.magicapi.dev/api/v1/pipfeed/parse/extract";

if (!API_MARKET_KEY) {
  throw new Error("Missing API_MARKET_KEY");
}

const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 45_000);

try {
  const response = await fetch(endpoint, {
    method: "POST",
    headers: {
      "accept": "application/json",
      "content-type": "application/json",
      "x-api-market-key": API_MARKET_KEY,
    },
    body: JSON.stringify({
      url: "https://techcrunch.com/2022/04/18/web-scraping-legal-court/",
    }),
    signal: controller.signal,
  });

  if (!response.ok) {
    const body = await response.text();
    throw new Error(`Pipfeed request failed: ${response.status} ${body}`);
  }

  const article = await response.json();
  const text = (article.text ?? "").trim();
  if (text.length < 300) {
    throw new Error(`Suspiciously short text: ${text.length} chars`);
  }
  console.log(article.title, text.length);
} finally {
  clearTimeout(timeout);
}

Build the full ingestion pipeline

Stacks of paper pages flowing into a database cylinder, an illustration of articles being stored as searchable chunks

A single request is a demo. A pipeline is what you actually run. Here is a complete ingestion job in Python: read a list of URLs, skip ones you already have, extract, normalize, deduplicate by content, chunk, embed and store. It uses SQLite so you can run it anywhere, and leaves the embedding call as a function you fill in with whichever provider you use.

Step 1: A tracking table

Keep a record of every URL you have tried and what happened. It stops you paying twice for the same page and tells you what failed.

import hashlib
import sqlite3

db = sqlite3.connect("rag.db")
db.executescript(
    """
    CREATE TABLE IF NOT EXISTS articles (
        url TEXT PRIMARY KEY,
        title TEXT,
        site_name TEXT,
        published_at TEXT,
        content_hash TEXT,
        status TEXT,           -- ok, failed, duplicate, uncertain
        error TEXT,
        fetched_at TEXT DEFAULT CURRENT_TIMESTAMP
    );
    CREATE TABLE IF NOT EXISTS chunks (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        url TEXT,
        idx INTEGER,
        text TEXT,
        embedding BLOB
    );
    """
)


def content_hash(text: str) -> str:
    normalized = " ".join(text.split()).lower()
    return hashlib.sha256(normalized.encode()).hexdigest()

Step 2: Extract once, and treat an unclear answer as unclear

Extraction is a POST, and every successful call uses up plan units. If a request times out or the server returns a 5xx, you do not know whether the extraction ran and was counted. Retrying blindly could pay twice for the same URL. The Pipfeed listing does not document an idempotency key, and it does not say that a failed or timed-out call is free. So this helper makes one attempt per URL. It never retries automatically after an unclear answer. It marks the URL uncertain so you can look at your usage counter and decide.

import os
import requests

ENDPOINT = "https://api.magicapi.dev/api/v1/pipfeed/parse/extract"
HEADERS = {
    "accept": "application/json",
    "content-type": "application/json",
    "x-api-market-key": os.environ["API_MARKET_KEY"],
}


class UncertainResult(Exception):
    """The request may have been processed and counted, but we got no usable answer."""


def extract(url: str) -> dict:
    try:
        r = requests.post(ENDPOINT, headers=HEADERS, json={"url": url}, timeout=(5, 45))
    except (requests.Timeout, requests.ConnectionError) as exc:
        raise UncertainResult(f"no response: {exc}") from exc

    if r.status_code in (500, 502, 503, 504):
        raise UncertainResult(f"server error {r.status_code}")
    if r.status_code in (400, 401, 403, 404, 422, 429):
        # Rejected. Do not loop on it: fix the request, the key or the quota first.
        raise RuntimeError(f"rejected {r.status_code}: {r.text[:200]}")
    r.raise_for_status()

    if "application/json" not in r.headers.get("content-type", ""):
        raise UncertainResult("answer was not JSON")
    data = r.json()
    if not isinstance(data, dict):
        raise UncertainResult("answer was not a JSON object")
    return data

A 400 means the URL or request is wrong. A 429 or a 403 can mean a rate limit or a used-up quota, so the job should stop and a person should look. Neither is retried by the code. Pause, check usage, then rerun, because the tracking table skips every URL that already succeeded.

If you decide a retry is worth it for an uncertain URL, do it by hand after checking the usage counter on your key, one URL at a time, with a cap. Do not put it in a loop.

Step 3: Chunk on paragraphs, not characters

The character-based splitter shown in many tutorials will happily cut a sentence in half. Splitting on paragraph boundaries keeps ideas together and retrieves better.

def chunk_paragraphs(text: str, max_chars: int = 1200, overlap_paras: int = 1):
    paras = [p.strip() for p in text.split("\n") if p.strip()]
    chunks, current = [], []
    size = 0
    for p in paras:
        if size + len(p) > max_chars and current:
            chunks.append("\n".join(current))
            current = current[-overlap_paras:] if overlap_paras else []
            size = sum(len(x) for x in current)
        current.append(p)
        size += len(p)
    if current:
        chunks.append("\n".join(current))
    return chunks

If the extractor returns the article as one block with no newlines, fall back to splitting on sentence endings before applying the size limit. Check what your own source URLs return, because formatting differs between sites.

Step 4: Embed and store

import json


def embed(texts: list[str]) -> list[list[float]]:
    # Plug in your embedding provider here.
    raise NotImplementedError


def ingest(url: str):
    row = db.execute("SELECT status FROM articles WHERE url = ?", (url,)).fetchone()
    if row and row[0] in ("ok", "duplicate", "uncertain"):
        return "skipped"
    try:
        art = extract(url)
        text = (art.get("text") or "").strip()
        if len(text) < 300:
            raise ValueError("extracted text too short")
        h = content_hash(text)
        if db.execute(
            "SELECT 1 FROM articles WHERE content_hash = ? AND url != ?", (h, url)
        ).fetchone():
            db.execute(
                "INSERT OR REPLACE INTO articles (url, content_hash, status) VALUES (?, ?, 'duplicate')",
                (url, h),
            )
            db.commit()
            return "duplicate"
        parts = chunk_paragraphs(text)
        vectors = embed(parts)
        for i, (part, vec) in enumerate(zip(parts, vectors)):
            db.execute(
                "INSERT INTO chunks (url, idx, text, embedding) VALUES (?, ?, ?, ?)",
                (url, i, part, json.dumps(vec).encode()),
            )
        db.execute(
            "INSERT OR REPLACE INTO articles (url, title, site_name, published_at, content_hash, status) VALUES (?, ?, ?, ?, ?, 'ok')",
            (url, art.get("title"), art.get("siteName"), art.get("date"), h),
        )
        db.commit()
        return "ok"
    except UncertainResult as exc:
        db.execute(
            "INSERT OR REPLACE INTO articles (url, status, error) VALUES (?, 'uncertain', ?)",
            (url, str(exc)[:500]),
        )
        db.commit()
        return "uncertain"
    except Exception as exc:
        db.execute(
            "INSERT OR REPLACE INTO articles (url, status, error) VALUES (?, 'failed', ?)",
            (url, str(exc)[:500]),
        )
        db.commit()
        return "failed"

The len(text) < 300 check is a guard against pages that extract to a cookie notice or an error message. Tune the number to your sources.

Step 5: Run it over a URL list

import time
from urllib.parse import urlparse

with open("urls.txt") as f:
    urls = [u.strip() for u in f if u.strip()]

results = {}
for url in urls:
    parsed = urlparse(url)
    if parsed.scheme not in {"http", "https"} or not parsed.netloc:
        results[url] = "invalid"
        continue
    results[url] = ingest(url)
    time.sleep(0.3)  # be gentle; add real rate limiting for big batches

print({k: list(results.values()).count(k) for k in set(results.values())})

Step 6: Retrieve

For a small corpus, you do not need a vector database. Cosine similarity over a few thousand vectors in memory is fast enough, and it keeps the example honest.

import json
import math


def cosine(a, b):
    dot = sum(x * y for x, y in zip(a, b))
    na = math.sqrt(sum(x * x for x in a))
    nb = math.sqrt(sum(y * y for y in b))
    return dot / (na * nb) if na and nb else 0.0


def search(query: str, k: int = 5):
    qv = embed([query])[0]
    rows = db.execute(
        "SELECT c.url, c.idx, c.text, c.embedding, a.title FROM chunks c JOIN articles a USING (url)"
    ).fetchall()
    scored = [(cosine(qv, json.loads(r[3])), r) for r in rows]
    scored.sort(key=lambda s: s[0], reverse=True)
    return [
        {"score": s, "url": r[0], "title": r[4], "chunk": r[1], "text": r[2]}
        for s, r in scored[:k]
    ]

When the corpus grows past tens of thousands of chunks, move the same schema into a real vector store. Because you kept url, idx and the text on every chunk, the move is a data copy, not a redesign.

Test extraction quality before you trust it

Extraction quality varies by site. A wrong answer here quietly poisons everything downstream, so test on your own sources before ingesting thousands of pages. Pick 30 to 50 URLs that represent your real inputs: a few from each publisher, a mix of short and long pieces, and a few awkward ones such as live blogs, listicles and pages with heavy embeds.

Then run a simple check for each. Every call here uses plan units, so run it once per URL and keep the results:

BOILERPLATE = [
    "subscribe to our newsletter",
    "accept all cookies",
    "sign up for",
    "related articles",
    "all rights reserved",
    "share this article",
]


def quality_report(urls):
    rows = []
    for url in urls:
        try:
            art = extract(url)
        except (UncertainResult, RuntimeError) as exc:
            rows.append({"url": url, "error": str(exc)})
            continue
        text = art.get("text") or ""
        low = text.lower()
        hits = [b for b in BOILERPLATE if b in low]
        rows.append(
            {
                "url": url,
                "chars": len(text),
                "has_title": bool(art.get("title")),
                "has_date": bool(art.get("date")),
                "boilerplate": hits,
            }
        )
    return rows

Read the output yourself for a handful of the worst pages. Numbers catch the obvious failures (empty text, missing dates), and your eyes catch the subtle ones (a paragraph from a sidebar leaking into the middle of the story). Set a pass rate you can live with, for example 90 percent of pages with a title, a date, at least 500 characters and no boilerplate hits. If a publisher fails often, exclude it or handle it with a different source.

What to do with the failures

Sort the failing pages into three buckets before you decide anything. The first bucket is pages where the text is empty or tiny. Open a few in a browser. If the article loads only after JavaScript runs, or sits behind a login or a paywall, or the response is really a cookie wall, an extractor may return a 200 with the wall text. The listing says it handles JavaScript-heavy sites, but that is the seller's claim, so check your own pages. If it fails for a source, the honest answer is to drop that source. The second bucket is pages with the right text plus extra junk, such as a related stories block in the middle. These you can often live with, because a few stray lines rarely change which chunk a question retrieves. You can also strip known junk lines in your own code with a short list of phrases per publisher. The third bucket is pages that extract fine but carry no date or author. For news monitoring that is a real problem, since you cannot sort by time, so fall back to the fetch time and label it as such in your metadata instead of guessing.

Keep the quality report in your repository and rerun it every few weeks on the same set of URLs. Publishers redesign their sites, and an extractor that scored well in January can score worse by June without anyone changing a line of your code. A drop in the pass rate is the early warning, and it costs you fifty calls to see it.

Error handling and retries

Article extraction depends on the source URL. Some pages move, block requests, return different HTML by region, or fail intermittently.

Handle these cases explicitly:

  • 400: invalid URL or malformed request
  • 401 or 403: missing key, invalid key, or access issue
  • 404: source page or endpoint not found
  • 429: rate limit hit or quota used up; stop and look
  • 5xx and timeouts: the result is unknown

For that last group, do not retry in a loop. The extraction is a billable POST. A timeout or a 5xx may mean the call finished on the server and was counted, and the Pipfeed listing documents neither an idempotency key nor a rule that failed calls are free. Record the URL as uncertain, compare your usage counter before and after, and re-queue it deliberately. Give every request a finite timeout and a finite number of manual retries.

Two cases deserve extra care. The first is the hard-limit plans: when included calls run out, calls fail and your job should stop cleanly instead of marking every remaining URL as failed. The second is a success response with useless content. A 200 whose text is two sentences about enabling JavaScript is not a success, which is why the pipeline above checks the text length before saving.

What it costs at real volumes

Plan prices only help when you know how many articles you will process. Three realistic cases follow. The volumes are assumptions for the arithmetic, not customer data.

A weekend project: 400 articles to build a personal research index. The Free plan has 500 calls and costs nothing. It is a one-time trial, so it covers this single job and will not refill next month. You stay inside it as long as you do not re-run the job on the same URLs, which is exactly what the tracking table prevents. For anything you want to keep running, price it on a paid plan: Start at $4.99 includes 5,000 calls.

A newsletter tool: 60 sources, about 8 new articles each per day. That is roughly 480 articles a day, or about 14,400 a month (480 x 30). The Pro plan at $9 includes 15,000 calls and fits with 600 calls of headroom, which is about four percent. Be careful here, because Pro is a hard limit: a busy news month, or a few re-runs, will hit the cap. Ultra at $49 for 100,000 is the safer choice if missing a day of articles is a problem.

A media monitoring product: 2,000 sources, about 5 articles each per day. That is 10,000 a day, about 300,000 a month. GIGA at $99 covers 300,000 exactly, with no margin, and it is a hard limit. Mega at $199 includes 1,000,000 calls and has a soft limit, so a spike is billed rather than blocked. For a production monitoring service, the soft limit is worth the extra $100.

Then the less obvious costs:

  • Refresh runs. If you re-extract articles to catch edits, every refresh costs a call. Refresh only what is likely to change, such as pages younger than 48 hours.
  • Failed and uncertain calls. The listing text does not say whether failed extractions count as units. Run a handful of bad URLs and watch the usage counter before you budget around it. The free trial is small, so spend its calls on this check first.
  • Downstream cost. Embeddings and storage usually cost more than extraction. At 300,000 articles a month with about eight chunks each, you embed 2.4 million chunks. Work out your embedding provider's price for that before you decide the extraction bill is the number to optimize.

Article extraction vs crawling vs search APIs

Article extraction is the right tool when you already have a URL.

Use a crawler when you need to discover many URLs across a site. Use a search API when your first step is finding relevant pages for a query. Use an article extraction API when the next step is turning a specific URL into JSON that your app can process.

These are different jobs, and the listings below are not interchangeable:

  • Search results: a query goes in, ranked pages with snippets or content come out. That is Tavily.
  • Article extraction: a URL goes in, the article text and metadata come out. That is Pipfeed and Skycraft Extract News.
  • Rendered page or HTML to text: a general page (or HTML you already fetched) goes in, cleaned Markdown comes out. That is a different job from article extraction, and it is covered in our guide to web scraping and social data APIs.

On API.market, related options include:

How the listings compare

Plan data for all three read on 2026-11-17.

Listing Job Free plan Paid plans
Pipfeed URL in, article JSON out (POST) 500 calls, hard, one-time trial $4.99 (5,000), $9 (15,000), $49 (100,000), $99 (300,000), all hard; $199 (1M, soft), $499 (5M, soft), PAYG
Skycraft Extract News News URL in, article JSON out (GET, url and analyze both required) 1,500 calls, hard, one-time trial $7 (15,000, soft), $39 (150,000, soft), $199 (1.5M, soft)
Tavily Search for pages by query (POST) 100 calls, hard, one-time trial $36 (4,000), $120 (15,000), $264 (38,000), $600 (100,000), all hard

Two things stand out. Skycraft's free trial is three times Pipfeed's, and its paid plans use soft limits, so it is worth a side-by-side test if your sources are mostly news. The listings differ in plan terms and in what they document, and only a test on your own URLs will show which one extracts your sources better. Skycraft's documentation shows it returns title, text, authors, publish_date, images, videos and language, with an optional analyze flag for entity extraction.

And Tavily is priced very differently because it does a different job: it finds pages for a query, and the Pro plan works out to $0.009 a call against $0.0006 on Pipfeed Pro, roughly fifteen times as much. Use it to discover URLs, then send the URLs you care about to an extractor, instead of paying search rates to fetch pages you already know.

One caution about Tavily. Its request schema includes an api_key field in the body with a pre-filled default value. Do not copy a default key from a form. Check the listing page for how authentication is meant to work before you build on it.

A sensible combination for a research agent: a search step to find candidate URLs, an extraction step to turn each into clean text, and your own filtering in between so you only pay to extract pages that are worth reading.

Hosted extractors outside the marketplace, and open-source libraries

You are not limited to what API.market lists, and it helps to know the other options so you can judge whether a hosted API is the right shape for your project. We did not test any of the tools in this section, and we did not recheck their pricing against the vendors' own pages.

Hosted article APIs. A web search on 2026-11-17 turned up a long list of article extraction actors on Apify aimed at RAG, with prices shown in search snippets of roughly $2 to $3 per 1,000 articles. Diffbot also offers an Article API for news and blog posts. Other services describe a similar contract, a URL in and a clean article object out. Check each vendor's own pricing and limits before comparing them with the plans above.

Broader extraction products. Some products cover more than articles, such as products, reviews and jobs, and they take longer to learn. They pay off when the same project also needs that other data.

Libraries you run yourself. Mozilla's Readability, Trafilatura and Newspaper3k are the names that come up most. A library costs nothing per page and keeps your data in house, but you still need to fetch the page yourself, handle blocking, retries and JavaScript rendering, and keep up with changes in the library. That is the real price of free.

When to pick an API and when to pick a library

Pick a hosted API when you want to be running this week, when volume is under a few hundred thousand pages a month, or when nobody on the team wants to own a fetching layer. Pick a library when volume is very high and steady, when the content cannot leave your network, or when you only ever read a few known sites that you can tune for. Many teams start with an API to validate the product, then move the hot path to a library once the volumes are known. If you plan to do that, keep the extraction call behind one function, as the extract helper above does, so swapping it later touches a single place.

Legal and ethical notes

Extraction does not give you rights to content. Being able to fetch an article through an API is a different thing from having permission to store it, republish it or train a model on it. Three habits keep you out of trouble.

First, respect the source. Check the site's terms and its robots rules before ingesting at scale, and prefer sources that allow reuse. Second, keep the link. Store the source URL and show it with any answer built on the article, which is also what makes citations possible. Third, do not republish. A RAG system that answers questions with short quotes and a link is a different thing from one that reproduces full articles. If your product shows extracted text to users, get advice on the rules in your market, especially for paywalled or licensed content.

This post does not claim that the API extracts paywalled articles, and you should not assume it does.

FAQ

Can I use an article extraction API for RAG?

Yes. It is often the first cleanup step. Extract the article text, chunk it, create embeddings, store the chunks, then retrieve the relevant chunks when answering a question.

Does article extraction replace a vector database?

No. It prepares content for the rest of your pipeline. You still need chunking, embeddings, storage, retrieval, and generation.

Should I store HTML or text?

Store text for retrieval unless you need formatting or links. HTML can be useful for display, but text is easier to chunk and embed.

Can this extract paywalled articles?

Do not assume that. Try your own permitted sources and follow the source site's terms. This post does not claim paywall extraction.

What should I check before relying on this workflow?

Run the live API call, confirm the endpoint URL, capture real response keys, check error behavior, and verify that the returned text is good enough for your chunking and embedding setup.

Is the free plan a monthly allowance?

No. The free plans on these listings are finite hard plans, and on API.market that means a one-time trial for each product. Plan on a paid tier for anything recurring.

Is it safe to retry a failed extraction?

Not automatically. A timeout or 5xx on a POST may have been counted. Check your usage counter, then retry by hand, one URL at a time.

How big should my chunks be?

There is no universal number. Around 800 to 1,500 characters with a paragraph or two of overlap is a common starting point for news and blog text. Measure retrieval on a set of real questions and adjust. Smaller chunks give sharper matches and less context; larger chunks give more context and noisier matches.

How do I avoid ingesting the same story twice?

Hash the normalized text and keep the hash in your tracking table, as in the pipeline above. Syndicated stories often appear on several sites with the same body and different URLs, and a content hash catches those where a URL check cannot.

How do I keep the index fresh?

Record the publish date and the fetch time. Re-extract recent articles on a schedule, such as daily for pages under two days old and not at all for pages older than a month. When you re-extract, replace the old chunks for that URL in one transaction so retrieval never sees half of each version.

Does it work for non-English articles?

The listing text does not state language support. Try a few URLs in your target languages, and check that the chunker and your embedding model handle them well too.

Can I call this from an AI agent?

API.market listings can be used from agents through the API.market MCP server with the same key. Whether you want an agent to extract pages on demand depends on your cost tolerance, since an unconstrained agent can burn through a hard-limit plan quickly. Put a per-run cap on extraction calls.

Try it

If you need article-to-JSON extraction for a RAG app, try Pipfeed on API.market. You can test the endpoint, compare pricing, and manage your key from the same API.market account. Start with the one-time free trial, run the quality check on 30 of your real URLs, and only then pick a paid tier.