APITube Help Center

How to Get the Raw Article Body and HTML

Use /v1/news/raw to retrieve the full article text as both plain text and HTML

Kent Hudson

Written by Kent Hudson

July 5, 2026

Open this example in the API Playground ↗

How to get the raw article body and HTML

To fetch the full text of a news article as both clean plain text and original HTML in one call, use the /v1/news/raw endpoint. Each result carries a body field (the article as plain text, with all tags stripped) and a body_html field (the same content as minified HTML), alongside the title, link, author and source. This is the endpoint to reach for when you need the actual written content of articles rather than just metadata. A basic request:

curl "https://api.apitube.io/v1/news/raw?api_key=YOUR_API_KEY"

You can pass the key as the api_key query parameter or as an X-API-Key header. The endpoint accepts both GET (parameters in the query string) and POST (parameters in a JSON body) — the two are equivalent.

What does /v1/news/raw return?

/v1/news/raw returns the same JSON envelope as the search endpoints — status, the pagination fields (limit, path, page, has_next_pages, next_page, has_previous_page, previous_page), request_id and a results array. Each object in results contains the fields below:

{
  "status": "ok",
  "limit": 100,
  "path": "https://api.apitube.io/v1/news/raw?api_key=YOUR_API_KEY",
  "page": 1,
  "has_next_pages": true,
  "next_page": "https://api.apitube.io/v1/news/raw?api_key=YOUR_API_KEY&page=2",
  "has_previous_page": false,
  "previous_page": "",
  "request_id": "7d1f9a34-6c2e-4b58-a903-1e5c8d2f7b40",
  "results": [
    {
      "id": 1234567,
      "title": "...",
      "href": "https://example.com/some-story",
      "created_at": "2026-06-20T08:00:00",
      "description": "...",
      "body": "Full article text as plain text...",
      "body_html": "<p>Full article text as HTML...</p>",
      "author": "Jane Doe",
      "keywords": ["technology", "ai"],
      "source": {
        "id": 42,
        "domain": "example.com",
        "home_page_url": "https://example.com",
        "type": "news",
        "bias": "center",
        "rankings": { "opr": 4.2 },
        "location": { "country_name": "United States", "country_code": "us" },
        "favicon": "https://www.google.com/s2/favicons?domain=https://example.com"
      }
    }
  ]
}

The two content fields are the point of this endpoint: body is the article rendered as plain text (HTML tags removed and whitespace collapsed), while body_html keeps the markup so you can render it yourself. The created_at field carries the article’s publish timestamp, and keywords carries an array of the source-provided category strings (an empty array if the feed provided none). The source object is the full publisher record — domain, home_page_url, type, bias, rankings.opr (Open PageRank), location and favicon — the same shape you get on the enriched endpoints. Note that the raw feed does not carry the NLP enrichment (language, categories, topics, entities, sentiment), so those fields are absent here.

How to narrow raw results by date

Restrict results to a publish-date window with published_at.start and published_at.end. Both accept an ISO date or datetime:

curl "https://api.apitube.io/v1/news/raw?published_at.start=2026-06-01&published_at.end=2026-06-20&api_key=YOUR_API_KEY"

You can also pass a single published_at value to match one day. For the full set of date options shared across the API, see How to filter news by date range.

How to filter raw results by source

Limit results to specific sources with source.id, a comma-separated list of up to three numeric source IDs. To exclude sources instead, use ignore.source.id (also up to three IDs):

curl "https://api.apitube.io/v1/news/raw?source.id=42,57&api_key=YOUR_API_KEY"

Note that the raw endpoint matches on the numeric source.id, not on a domain name.

How to sort and paginate raw results

Sort with sort.by — accepted values are id, published_at and created_at — together with sort.order set to asc or desc. The default is id in desc order, so the newest stored articles come first. Page through results with page and per_page; per_page has a maximum of 250 (a larger value returns error ER0171).

curl "https://api.apitube.io/v1/news/raw?sort.by=published_at&sort.order=desc&per_page=50&api_key=YOUR_API_KEY"

How much does a raw request cost?

Each /v1/news/raw call costs 1 credit, regardless of how many articles come back. You are only charged when at least one article is returned: if the filters match nothing, no credit is spent.

Common Questions

How is /v1/news/raw different from /v1/news/article?

/v1/news/raw is focused on the written content: it returns body and body_html plus a small set of fields (id, title, href, created_at, description, author, keywords, source). It does not include the NLP enrichment — entities, sentiment, categories, topics — that a full article object carries. When you need that enrichment, fetch the article by ID with How to get a single article by ID instead.

Why is the body truncated or marked “Upgrade subscription plan”?

Article content is masked on Free-plan keys and on test keys (the ones starting with api_test_). On those keys the body and body_html are cut to a short preview followed by a ...[Upgrade subscription plan] marker, so you can inspect the response shape without seeing the full text. Use a live key on a paid plan to receive the complete body.

Can I export raw results to CSV or RSS?

No. Export formats such as CSV, XLSX and RSS are not available on /v1/news/raw — the endpoint returns JSON only. Export options apply to the search endpoints, not to the raw store.

Which errors can the raw endpoint return?

The most common ones are ER0201/ER0202 (HTTP 401) when the API key is missing or invalid, ER0176 (HTTP 402) when your account has no credits left, and ER0171 (HTTP 400) when per_page is above 250. Every error response includes the request_id so you can trace the call.


Related Articles