A repository of news sources for every country. Data is stored in JSON files.
import { getSources, getSource } from 'news-sources';
const sources = await getSources('ru'); // Russian sources
const source = await getSource('ru', 'vesti.ru');Reads news sources from a JSON file by countryCode (2 letters country code).
Data is not cached.
Gets news sources from a JSON file by countryCode (2 letters country code).
Data is cached.
md- Moldovaro- Romaniaru- Russiabg- Bulgariain- Indiait- Italyhu- Hungarycz- Czech Republices- Spain
Files you can contribute are in data/sources directory.
Each file contains news sources for a single country.
You can add a new file or update existing ones.
Before commiting run yarn validate or npm run validate to validate the data.