APITube Help Center

How to Filter News by Author

Narrow News API results to specific bylines with author.name, author.id and has_author

Tasha Tatum

Written by Tasha Tatum

June 26, 2026

Open this example in the API Playground ↗

How to filter news by author

To return only articles written by a specific person or agency, add the author.name parameter with the byline you want, for example author.name=Reuters. The APITube News API matches it against the authors it already tracks and returns only matching articles. You can pass up to three names separated by commas, and articles by any of them are returned (OR logic).

curl "https://api.apitube.io/v1/news/everything?author.name=Reuters&api_key=YOUR_API_KEY"

You can send the key as a header (X-API-Key: YOUR_API_KEY) instead of the api_key query parameter. If you omit every author parameter, no author filter is applied and articles from all bylines are returned.

What is the author.name parameter?

author.name takes one or more author names, like AFP or Ezra Klein. Each name must be 1 to 100 characters long; anything outside that range returns HTTP 400 with error ER0071. Every name is looked up against the authors APITube tracks. If a name is not found, the request fails with HTTP 400 and error ER0204 and a message like author with name 'Jane Doe' not found — the whole request stops, so one unknown name blocks the entire call.

Because the name must match an author already in the directory, the safest way to get the exact spelling is to read it from a response first: run a broad search, then copy the author.name (or the numeric author.id) straight from an article and reuse it in your next request.

How to filter by one or more authors

Pass a single name to read just that byline, or a comma-separated list to combine several. This request pulls articles from two news agencies in one call:

curl "https://api.apitube.io/v1/news/everything?author.name=AFP,Reuters&api_key=YOUR_API_KEY"

The maximum is three authors per request. If you list more than three, only the first three are used and the rest are silently dropped. Author filtering is part of the shared filter chain, so it combines with other filters and with sorting:

curl "https://api.apitube.io/v1/news/everything?author.name=Reuters&language.code=en&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"

How to filter by author ID instead of name

Every author also has a numeric author.id. Filtering by ID avoids spelling mismatches and is the most reliable way to pin results to one byline. Pass up to three IDs, comma-separated:

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

Each ID must be an integer of 1 to 20 characters. A non-numeric value returns ER0064, and an out-of-range length returns ER0066 — both HTTP 400. Unlike author.name, an author.id is not checked against the directory, so a valid-looking ID that matches no author simply returns no articles instead of an error.

How to exclude specific authors

To return everything except certain bylines, use ignore.author.name or ignore.author.id. Both follow the same rules — comma-separated, up to three values. This keeps all coverage except two wire services:

curl "https://api.apitube.io/v1/news/everything?ignore.author.name=AFP,Reuters&api_key=YOUR_API_KEY"

As with the positive filter, an unknown name in ignore.author.name returns ER0205, so the excluded names must also be tracked authors. The numeric variant ignore.author.id returns ER0067 for a non-numeric value and ER0069 for a bad length.

How to require or exclude an attributed author

Many articles have no named author at all. Use has_author to keep only the ones that do — or only the ones that don’t. Pass has_author=1 to require an attributed author, or has_author=0 to return only articles without one:

curl "https://api.apitube.io/v1/news/everything?has_author=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"

has_author accepts only 0 or 1; any other value returns HTTP 400 with error ER0070. This pairs well with a category filter when you want signed reporting on a topic and want to drop unattributed aggregator items.

What does the author object in the response contain?

Every article in the response carries an author object so you can confirm the byline and reuse it:

{
    "author": {
        "id": 12345,
        "name": "Reuters"
    }
}

The id and name here are exactly the values you pass back into author.id and author.name for follow-up requests. When an article has no attributed author, the author.id is null. To also limit results to a single publisher at the same time, combine author filtering with How to filter news by source or domain.

Common Questions

How many authors can I filter by at once?

Up to three per parameter. author.name, author.id, ignore.author.name and ignore.author.id each accept a comma-separated list, and only the first three values are applied — extra values beyond the third are silently ignored. Multiple authors in one parameter use OR logic, so an article matches if it was written by any of them.

Should I use author.name or author.id?

Both target the same authors. author.name is easier to read and write because you use the byline directly, but it must exactly match a tracked author or the request fails with ER0204. author.id is more robust: it is a fixed numeric identifier and is not validated against the directory, so it never blocks the request. Read either value from an article’s author object to get the exact match.

What error do I get for an unknown author?

A name that APITube does not track returns HTTP 400 with error ER0204 (author with name '…' not found) for author.name, or ER0205 for ignore.author.name. A name shorter than 1 or longer than 100 characters returns ER0071 (ER0073 for the ignore variant). Because the request stops on the first bad name, confirm the spelling from a response before filtering.

How do I find articles that have no author?

Set has_author=0. This returns only articles where no author was attributed, which is common for wire-service reposts and automated aggregators. Use has_author=1 for the opposite — only signed articles. Any value other than 0 or 1 returns error ER0070.


Related Articles