APITube Help Center

How to build market intelligence from news

Turn news coverage into market intelligence: scope a sector, rank what's moving with trends, break it down with facets, and export the dataset

Tasha Tatum

Written by Tasha Tatum

July 3, 2026

Updated July 6, 2026

Open this example in the API Playground ↗

How to build market intelligence from news

To build market intelligence from news, use one endpoint — /v1/news/everything — and layer four moves on top of it: scope coverage to a sector with category.id or industry.id, rank what is moving with the /v1/news/trends endpoint, break the slice down by source, player or tone with facet, and pull the dataset out with export. There is no separate market-intelligence route; every step is a filter on a search you already know how to run.

# Last 30 days of economy, business and finance coverage
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&published_at.start=NOW-30DAYS&per_page=250" \
  -H "X-API-Key: YOUR_API_KEY"

You can pass the key as the api_key query parameter or as an X-API-Key header, and every filter below works on both GET (query string) and POST (JSON body).

How do you scope coverage to a market or sector?

Market intelligence starts by pinning the slice you care about. category.id takes an IPTC media-topic code — medtop:04000000 is economy, business and finance, so it keeps market coverage in and general news out. For a tighter cut, add industry.id, a numeric industry id (up to three, comma-separated):

# Finance coverage, English only
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&language.code=en" \
  -H "X-API-Key: YOUR_API_KEY"

An unknown category code returns HTTP 400 with error ER0206, and an unknown industry id returns ER0210, so a typo fails loudly instead of silently returning the wrong slice. See how to filter news by industry for resolving a sector to its numeric id.

How do you see what is moving in a market?

Once the sector is scoped, /v1/news/trends tells you what dominates it. It runs a grouped count over the same filtered slice and returns the top values ranked by how many articles reference each one. Aggregate on up to five fields at once — entity.id, category.id, topic.id, industry.id or source.id:

# Top companies and topics in finance coverage
curl "https://api.apitube.io/v1/news/trends?field=entity.id,topic.id&category.id=medtop:04000000&per_page=10" \
  -H "X-API-Key: YOUR_API_KEY"

Ranking by raw volume answers “what is popular,” but market intelligence usually wants momentum. Add trending=true to score each value by its recent activity versus its baseline, so a rising theme rises to the top even before it is the loudest. Trends look back at most 30 days and each call costs 1 point. See how to discover trending topics and entities for the full field list and the compare mode.

How do you track how loud a theme is getting?

A single number over successive windows is a cheap early signal. /v1/news/count returns the size of a filtered slice without downloading any articles, so you can watch a theme accelerate or fade:

# How many finance stories mention inflation this week
curl "https://api.apitube.io/v1/news/count?category.id=medtop:04000000&title=inflation&published_at.start=NOW-7DAYS" \
  -H "X-API-Key: YOUR_API_KEY"

The response is a small { "status": "ok", "count": ..., "request_id": ... } object, and the call costs 1 point. Run it for last-7-days versus the previous week to see whether coverage of a theme is picking up, then drill into the articles only when the count moves. See how to count matching articles without downloading them.

How do you break a market down by source, sentiment or player in one call?

Facets turn one search into a set of grouped counts. Set facet=true and list up to five fields in facet.field — one request can tell you which outlets dominate the sector, the positive/negative/neutral split of its coverage, and the companies mentioned most:

curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&facet=true&facet.field=source.id,sentiment.overall.polarity,entity.id&facet.limit=20" \
  -H "X-API-Key: YOUR_API_KEY"

facet.limit defaults to 10 and caps at 100 per field; facet.mincount drops long-tail values so the breakdown is not buried in one-off mentions. Other useful market fields include topic.id, industry.id and time buckets such as published.month. A missing or unsupported field returns errors in the ER0310ER0313 range. See how to aggregate results with facets.

How do you read the market’s mood?

Every article already carries a sentiment score from −1 (most negative) to 1 (most positive), so you filter and sort on it rather than computing tone yourself. Filter with sentiment.overall.polarity (positive, negative or neutral), or rank the slice with sort.by=sentiment.overall.score:

# Most negative finance coverage first
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&sort.by=sentiment.overall.score&sort.order=asc" \
  -H "X-API-Key: YOUR_API_KEY"

For tone toward one company rather than the whole article, switch to entity-level sentiment. How to track stock-market sentiment covers the full sentiment workflow, including entity.sentiment.polarity.

How do you surface the stories that matter, not just the newest?

Results default to published_at (newest first), which is rarely what you want for a market read. sort.by accepts several computed modes: engagement (social traction), quality, trust (source authority), controversy and media_richness, plus relevance and source.rank.opr:

# Highest-engagement finance stories this week
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&sort.by=engagement&published_at.start=NOW-7DAYS" \
  -H "X-API-Key: YOUR_API_KEY"

Pair sort.order=asc or desc with any mode. See how to sort by controversy, trust and social shares for what each mode ranks on.

How do you export a market dataset for analysis?

When you need the underlying articles in a tool, add export to the everything request. Supported values are csv, tsv, xml, rss, xlsx, parquet, jsonl and ndjson:

# Pull a 30-day finance dataset as JSON Lines
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&published_at.start=NOW-30DAYS&per_page=250&export=jsonl" \
  -H "X-API-Key: YOUR_API_KEY" -o finance.jsonl

per_page defaults to 100 and maxes out at 250 — a larger value returns ER0171 — and you walk further with page. On the Free plan, paging stops after the first 5 pages (ER0173), so a deep back-fill needs a paid plan. See how to export for data pipelines. The canonical parameter list lives in the News API parameters reference.

Common Questions

Is there a dedicated market-intelligence endpoint?

No. Market intelligence uses the same /v1/news/everything, /v1/news/trends and /v1/news/count endpoints as any other search, plus the category.id, industry.id, facet, sentiment.*, sort.by and export parameters. You scope a sector, rank what is moving, break it down and export — there is no separate route to learn.

The /v1/news/trends endpoint is computed over a rolling window of at most 30 days. Omit the dates for the default last-30-days window, or set published_at.start / published_at.end inside a 30-day span; a wider range is rejected. Split longer studies into 30-day chunks and compare them.

How large a page can I export at once?

per_page caps at 250 — a higher value returns ER0171 (HTTP 400). Page through larger sets with page, keeping the same filters and export value on each request. On the Free plan, pagination stops after the first 5 pages (ER0173), so deep exports for a market dataset need a paid plan.

Each /v1/news/trends call costs 1 point regardless of how many fields you aggregate, and each /v1/news/count call also costs 1 point. Both are cheaper than pulling full articles, so use them to decide what to fetch, then run everything only on the slices worth downloading.


Related Articles