APITube Help Center

How to Filter News by Source or Domain

Select publishers by domain or source ID

Tasha Tatum

Written by Tasha Tatum

June 26, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to filter news by source or domain

Use source.domain for a recognized publisher domain or source.id for its numeric ID. Up to three comma-separated values match with OR. Add other filters to narrow that publisher’s coverage.

curl "https://api.apitube.io/v1/news/everything?source.domain=theguardian.com&api_key=YOUR_API_KEY"

Send the key through api_key or X-API-Key. Without a source condition, results can come from any publisher.

What is the source.domain parameter?

Pass the domain, such as nytimes.com, rather than a full article URL. Matching ignores case. Domains must be 1–255 characters (ER0057). An unknown domain stops the request with 400 ER0214.

How to filter by one or more domains

List one or more domains:

curl "https://api.apitube.io/v1/news/everything?source.domain=theguardian.com,foxnews.com,nytimes.com&api_key=YOUR_API_KEY"

Only the first three are applied. Combine source filters with language, dates or sorting:

curl "https://api.apitube.io/v1/news/everything?source.domain=theguardian.com,nytimes.com&language.code=en&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

How to filter by source ID instead of domain

Use IDs from article source objects:

curl "https://api.apitube.io/v1/news/everything?source.id=12345,67890&api_key=YOUR_API_KEY"

IDs must be non-negative numbers, 1–20 characters long. Invalid numeric values return ER0050, negatives ER0051, and invalid length ER0052, all with 400.

How to exclude specific sources

Use ignore.source.domain or ignore.source.id:

curl "https://api.apitube.io/v1/news/everything?ignore.source.domain=foxnews.com,nypost.com&api_key=YOUR_API_KEY"

The same three-value limit applies. Unknown excluded domains return ER0215; invalid domain length returns ER0059.

How to find a source’s domain or ID

Search using a recognized domain and copy source.id from a returned article. A successful empty search means no articles match the other conditions; it does not mean the domain is unknown.

For publisher-country filtering, see countries and locations.

What does the source object in the response contain?

Inspect the article’s source details:

{
    "source": {
        "id": 12345,
        "domain": "theguardian.com",
        "home_page_url": "https://www.theguardian.com",
        "type": "news",
        "rankings": { "opr": 7 },
        "location": { "country_name": "United Kingdom", "country_code": "gb" }
    }
}

Reuse id or domain in follow-up requests. Other fields describe its home page, publication type, rank and location. Add a language condition if you also need a particular article language.

Common Questions

How many sources can I filter by at once?

Three per inclusion or exclusion parameter. Extra values are dropped.

Should I use source.domain or source.id?

Use a domain for readability or a known numeric ID to avoid spelling mistakes. Copy the ID from a returned article.

What error do I get for an unknown domain?

400 ER0214 for inclusion or ER0215 for exclusion. Check every domain in a multi-value request.

Can I include and exclude sources in the same request?

Yes. Inclusion selects publishers; exclusion removes matches. Language, dates and other conditions must also match.


Related Articles