Skip to content

Migrating from NewsAPI.ai

Replace the getArticles action with GET /v1/news/everything. The big difference is identity: NewsAPI.ai filters on Wikipedia URIs, DMOZ paths, and ISO 639-3 codes, while APITube takes plain names and ISO 639-1. Every filter value needs translating.

Why teams switch

NewsAPI.aiAPITube
Sentiment coverageEnglish only — their docs state that setting minSentiment/maxSentiment reduces results to English articlesEvery language
Free tier2,000 searches one time, not renewed; last 30 days onlyRenewing quota
Entity identityWikipedia URIs — an autosuggest call before you can searchPlain names, plus Wikidata links on the response
Category taxonomyDMOZ — a directory discontinued in 2017IPTC MediaTopics, actively maintained
Articles per request100250

NewsAPI.ai is the most capable competitor in this section. Where it is ahead — body-text search, the events model, concept disambiguation — that is stated in the limitations below rather than glossed over.

Your first request

jsonc
// NewsAPI.ai — POST with a JSON body
{
  "action": "getArticles",
  "keyword": "Tesla Inc",
  "keywordLoc": "title",
  "lang": "eng",
  "sourceLocationUri": ["http://en.wikipedia.org/wiki/United_States"],
  "articlesCount": 100,
  "apiKey": "YOUR_KEY"
}
bash
# APITube — a plain GET
curl "https://api.apitube.io/v1/news/everything?title=Tesla&language.code=en&source.country.code=us&per_page=100" \
  -H "X-API-Key: YOUR_API_KEY"

Identifier translation

This is the part that makes this migration different. Four systems need converting:

conceptUri=http://en.wikipedia.org/wiki/Tesla,_Inc.   →  organization.name=Tesla
conceptUri=http://en.wikipedia.org/wiki/Elon_Musk     →  person.name=Elon Musk
sourceLocationUri=.../Germany                         →  source.country.code=de
locationUri=.../Germany                               →  location.name=Germany
categoryUri=dmoz/Business                             →  category.id=medtop:04000000
lang=eng                                              →  language.code=en
[email protected]                   →  author.name=Mark Mazzetti

Take the last path segment of a URI, replace underscores with spaces, and strip disambiguation and corporate suffixes. Note that sourceLocationUri (where the publisher is) and locationUri (what the article is about) map to different filters.

Parameter mapping

NewsAPI.aiAPITubeNote
keywordtitleHeadlines only
keywordLoc=titletitleLossless
conceptUriperson.name / organization.name / location.nameTranslate the URI first
categoryUricategory.idDMOZ → IPTC; 7 top-level paths confirmed
langlanguage.codeISO 639-3 → ISO 639-1; 8 of 57 have no equivalent
sourceUrisource.domainNo translation needed
minSentiment / maxSentimentsentiment.overall.score.min / .maxSame −1…1 scale, and not limited to English
dateStart / dateEndpublished_at.start / .end
articlesCountper_page250 max
articlesPagepage
articlesSortBy=datesort.by=published_at
ignoreSourceGroupUri=paywall/*is_paywall=0

The full table, including all 57 language codes and the URI translation algorithm, is in the migration kit.

What does not carry over

The events model. getEvents, eventUri, and the breaking-events feed have no counterpart. APITube clusters articles into stories (story.id) but does not expose an event object. This is the main reason a team might decide not to migrate.

Body-text search. keywordLoc defaults to body. APITube searches headlines.

Concept disambiguation at query time. Apple_Inc. and Apple are different concepts on NewsAPI.ai. organization.name=Apple is one name — the entity type narrows it, but not as precisely.

Eight languages. kaz, kur, mal, mar, pan, rus, ukr, and gsw have no APITube equivalent. Belarusian bel maps to by, not the ISO be.

articlesSortBy=rel. Combined with a search term, sort.by=relevance currently returns 500.

What you gain

Sentiment in every language rather than English only, IPTC MediaTopics instead of a frozen DMOZ tree, plain values instead of a lookup step before every query, 250 articles per request, separate title and body sentiment, a clickbait signal, publisher bias, and export to eight formats.

Next steps