Filtering Source Results
This page documents all available query parameters for filtering source results on the /sources endpoint.
q - Search Sources
Section titled “q - Search Sources”Search sources by title or description. The query supports partial, fuzzy, and exact matches (use quotes for exact phrases).
Examples
Section titled “Examples”Partial Match:
https://api.newsdatahub.com/v1/sources?q=Detroit Metro TimesSearches within the title and description and returns any source containing any of the words.
Exact Match:
https://api.newsdatahub.com/v1/sources?q="Detroit Metro Times"Returns only sources whose title exactly matches the phrase.
country - Filter by Country
Section titled “country - Filter by Country”Filter by ISO 3166-1 alpha-2 country code. Provide a single country per request. See available countries for the complete list.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?country=MXReturns sources from Mexico.
language - Filter by Language
Section titled “language - Filter by Language”Restrict results by language using ISO 639-1 language codes. See available languages for the complete list.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?language=esReturns sources that primarily publish in Spanish.
region - Filter by Region
Section titled “region - Filter by Region”Filter by geographic region. Valid values: north_america, south_america, europe, asia, africa, oceania, middle_east.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?region=europeReturns sources located in Europe.
Available Regions
Section titled “Available Regions”north_americasouth_americaeuropeasiaafricaoceaniamiddle_east
type - Filter by Source Type
Section titled “type - Filter by Source Type”Filter by source type: digital_native, press_release, newspaper, magazine, mainstream_news, blog, specialty_news, news_agency.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?type=newspaperReturns only newspaper sources.
Available Types
Section titled “Available Types”digital_native- News organizations that originated onlinepress_release- Official announcementsnewspaper- Traditional print publicationsmagazine- Periodical publicationsmainstream_news- Major news outletsblog- Individual or small group websitesspecialty_news- Industry/topic-focused publicationsnews_agency- Wire services
coverage - Filter by Coverage Area
Section titled “coverage - Filter by Coverage Area”Filter by coverage areas. Provide comma-separated values such as national, local, regional, or international.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?coverage=nationalReturns sources that report on national news.
Available Coverage Areas
Section titled “Available Coverage Areas”nationallocalinternationalregional
per_page - Control Page Size
Section titled “per_page - Control Page Size”Choose the number of results per page. All tiers support up to 100 results per page. Defaults to 20.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?per_page=100Returns 100 sources per request.
cursor - Pagination
Section titled “cursor - Pagination”Use cursor-based pagination by passing the next_cursor value from the previous response.
Example
Section titled “Example”https://api.newsdatahub.com/v1/sources?cursor=QW1lcmljYW4gRnJlZSBQcmVzcyxhbWVyaWNhbi1mcmVlLXByZXNzRetrieves the next set of sources.