APITube Help Center

How to Filter News by Country and Location

Choose publisher countries or filter places mentioned in coverage

Tasha Tatum

Written by Tasha Tatum

June 27, 2026

Updated October 16, 2026

Open this example in the API Playground ↗

How to filter news by country and location

Use source.country.code to select publishers based in a country. Use location filters for places associated with the article. These answer different questions: a US publisher’s report about France still has US publisher country.

curl "https://api.apitube.io/v1/news/everything?source.country.code=us&api_key=YOUR_API_KEY"

Send your key through api_key or X-API-Key. Without a publisher-country condition, the search can return sources from any country.

What does source.country.code filter on?

It selects the publisher’s country, using a two-letter code such as us, gb, de, jp or fr. Case does not matter. Check the supported countries.

How to request a single country

Use one code:

curl "https://api.apitube.io/v1/news/everything?source.country.code=jp&api_key=YOUR_API_KEY"

This selects Japanese publishers, regardless of which places their articles discuss.

How to request multiple countries at once

Use up to three codes with OR:

curl "https://api.apitube.io/v1/news/everything?source.country.code=us,de,gb&api_key=YOUR_API_KEY"

Only the first three are applied; extras are dropped.

How to exclude a country with ignore.source.country.code

Use publisher-country exclusions, and a separate language exclusion if needed:

curl "https://api.apitube.io/v1/news/everything?ignore.source.country.code=fr&ignore.language.code=fr&api_key=YOUR_API_KEY"

See language filters.

How to filter by the location a story is about

Use location.lat, location.lng and location.radius for a circular area, or location.bbox for a rectangle. Radius uses kilometres, up to 20,000. has_location_geo=1 selects articles with coordinates.

Read geographic filters for syntax, or local news for the distance-ranked /v1/news/local endpoint. Check the article’s location details to understand which place the match refers to.

Which endpoints support country filtering?

Use country filters on Everything, Top Headlines, Story and category, topic, industry or entity news. Add subject and tone conditions as needed:

curl "https://api.apitube.io/v1/news/everything?sentiment.overall.polarity=negative&source.country.code=us,gb,de&category.id=medtop:07000000&api_key=YOUR_API_KEY"

Common Questions

What country codes does APITube accept?

Recognized two-letter codes from the supported-country list. Case does not matter.

How many countries can I request at once?

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

What error do I get for an invalid country code?

Invalid length returns 400 ER0246, or ER0247 for exclusion. Unknown codes return ER0212, or ER0213 for exclusion.

Does source.country.code filter by where the news happened?

No. It selects publisher location. Use geographic filters or Local for article locations.


Related Articles