How Data Scientists and Researchers Use APITube
Choose a dataset, inspect its labels and save the export
Written by Beatrice Riddick
July 3, 2026
Updated October 16, 2026
How data scientists and researchers use APITube
Define a news dataset with filters and fixed dates, count its matches, inspect label distributions, then download it as JSONL or Parquet. Articles include structured fields for sentiment, entities and categories that you can evaluate for your research task.
curl "https://api.apitube.io/v1/news/count?language.code=en&published_at.start=2026-01-01&published_at.end=2026-03-31&api_key=YOUR_API_KEY"
Use the same filters for counting and downloading. Send your key through api_key or X-API-Key.
How do I size a news dataset before downloading it?
Call /v1/news/count with your intended filters. The response gives the count without article bodies:
{ "status": "ok", "count": 48210, "request_id": "..." }
Each count uses one request, including a zero count. Test keys cap the answer at 100. An unfiltered overview is not the size of a specific research dataset; include your language, dates and other conditions. See counting matches.
What labels come with each article?
Fields include sentiment for the title, body and article overall; entities and entity sentiment; categories, topics, industries and keywords. Articles also include source data, media, readability measurements and flags such as is_duplicate, is_free and is_breaking.
Sentiment scores run from -1 to 1. Review field coverage and label quality against your task before treating them as training or evaluation labels.
How do I check class balance before I train?
Use facets to count matching articles by label, such as sentiment, category or language:
curl "https://api.apitube.io/v1/news/everything?published_at.start=2026-01-01&published_at.end=2026-03-31&facet=true&facet.field=sentiment.overall.polarity,category.id,language.id&per_page=1&api_key=YOUR_API_KEY"
The facets object contains { value, count } pairs for the matching set, beyond the current results page. You can request up to five fields. facet.limit defaults to 10 and allows up to 100 values per field. See the faceting guide.
How do I build a reproducible corpus?
Use fixed published_at.start and published_at.end dates rather than a moving value such as NOW-30DAYS:
curl "https://api.apitube.io/v1/news/everything?published_at.start=2026-01-01&published_at.end=2026-01-31&language.code=en&category.id=medtop:04000000&per_page=250&api_key=YOUR_API_KEY"
Save the query, download date, article IDs and exported files. Fixed dates keep the target period consistent, but a later API request can still differ as article availability changes. Preserve the actual download when exact reproduction matters.
Fix the language with language.code, and use category, topic, industry or entity filters to define the subject.
How do I pull the corpus out in bulk?
On a paid plan, use JSONL for complete nested article objects or Parquet for typed columns:
curl "https://api.apitube.io/v1/news/everything?published_at.start=2026-01-01&published_at.end=2026-01-31&language.code=en&per_page=250&page=1&export=jsonl&api_key=YOUR_API_KEY" -o corpus_p1.jsonl
Each file contains one page. Maximums are 250 on Professional and Corporate, 200 on Basic or 50 on Starter. Request subsequent pages to collect the set. Free permits only the first five JSON pages, with 10 articles each, and does not support non-JSON export.
Use fl to select fields such as id,title,sentiment,entities,categories. See data-pipeline exports for nested fields and file formats.
Common Questions
- Can I download more than 250 articles in one request?
- Are the article bodies full text for training?
- Does building a dataset use a lot of requests?
Can I download more than 250 articles in one request?
Not through an ordinary article-page request. Page through results within your plan’s size limit. A value above the limit returns 400 ER0171; Free pagination beyond page five returns ER0173.
Are the article bodies full text for training?
A paid live key returns the available full text. Free plans and test keys return previews, while structured fields remain available. Check the content rights that apply to your intended use.
Does building a dataset use a lot of requests?
It depends on how many pages you download. Non-empty search pages use one request each; choosing an export format adds no charge. Count calls use one request, and a faceted search follows its endpoint’s charging rules. See the parameter reference.