NewsAPI connects to a Nagent workspace with an API key. Once it is connected, agents can call 4 NewsAPI actions, such as "Get Everything", "Get Sources" and "Get Top Headlines". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against NewsAPI, with input parameters and output schema.
NEWS_API_GET_EVERYTHINGTool to search through every article published by over 150,000 sources. At least one of q, sources, language, or domains must be set or the API returns a parametersMissing error. Historical date range depends on your News API plan tier (free plans limited to ~1 month). No country parameter exists; target geography via sources, domains, or country-specific terms in q. Burst requests may trigger HTTP 429; apply backoff on throttling errors.
Input parameters
Keywords or phrases to search for in the article title and body
Newest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)
Oldest date or date-time for articles (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss). Date range limits depend on your News API plan tier (free plans are limited to approximately 1 month of historical data)
Page number of results to return (default 1) When totalResults exceeds pageSize, increment page to retrieve additional results.
Order to sort articles: relevancy, popularity, or publishedAt
Comma-separated list of domains to include in results
Comma-separated list of source identifiers to filter on Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs silently return empty results.
2-letter ISO-639-1 code to restrict the search to that language
Number of results per page (default 20, max 100)
Keywords or phrases to search for in the article title only
Comma-separated list of domains to exclude from results
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
NEWS_API_GET_SOURCESTool to fetch available news sources. Use when you need to retrieve a list of publishers by optional filters like category, language, or country. Source IDs returned here are the only valid IDs for filtering in NEWS_API_GET_EVERYTHING or NEWS_API_GET_TOP_HEADLINES — unrecognized IDs cause silently empty results.
Input parameters
Filter sources by this country code.
Filter sources by this news category.
Filter sources by this language code.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
NEWS_API_GET_TOP_HEADLINESTool to retrieve live top and breaking headlines; does not support historical or date-bounded queries (use NEWS_API_GET_EVERYTHING for past date ranges). Results favor major outlets; use NEWS_API_GET_EVERYTHING or COMPOSIO_SEARCH_WEB for niche publications. Use when you need current headlines filtered by country, category, source(s), or keywords.
Input parameters
Keywords or phrase to search for in the article title and body. At least one of 'country', 'category', 'sources', or 'q' must be provided.
Page number for pagination. Default is 1.
2-letter ISO 3166-1 code of the country to get headlines for. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.
Comma-separated list of source identifiers to include (max 20). At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be combined with 'country' or 'category'. Use valid source IDs from NEWS_API_GET_SOURCES; unrecognized IDs may silently return empty results.
News category to filter by. At least one of 'country', 'category', 'sources', or 'q' must be provided. Cannot be used with 'sources'.
Number of results per page. Default is 20, max is 100.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
NEWS_API_GET_V1_ARTICLESTool to fetch live article metadata from a news source using the legacy v1 API. Use when you need headlines from a specific source identifier. This v1 endpoint has been superseded by /v2/top-headlines.
Input parameters
Sort order for articles.
The identifier for the news source or blog you want headlines from. Use the /sources endpoint to locate this.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 4 NewsAPI actions on Nagent, including "Get Everything", "Get Sources" and "Get Top Headlines". Get Everything: Search through every article published by over 150,000 sources. Each action is listed on this page with its input parameters and its output.
NewsAPI connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
It also takes 11 optional inputs: q, to, from, page, sortBy, domains, sources, language, pageSize, qInTitle and excludeDomains. It returns data, error and successful.