newsapi_manual.json•9.71 kB
{
"version": "1.0",
"tools": [
{
"name": "everything_get",
"description": "Search through millions of articles from over 150,000 large and small news sources and blogs. This endpoint suits article discovery and analysis. It requires either a search query, a source, or a domain.",
"tags": [
"articles"
],
"inputs": {
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Keywords or phrases to search for in the article title and body. Advanced search is supported. Max length: 500 chars."
},
"searchIn": {
"type": "string",
"description": "The fields to restrict your q search to. Possible options: title, description, content. Multiple options can be specified by separating them with a comma."
},
"sources": {
"type": "string",
"description": "A comma-seperated string of identifiers (maximum 20) for the news sources or blogs you want headlines from."
},
"domains": {
"type": "string",
"description": "A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to."
},
"excludeDomains": {
"type": "string",
"description": "A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to remove from the results."
},
"from": {
"type": "string",
"description": "A date and optional time for the oldest article allowed. This should be in ISO 8601 format (e.g. 2025-07-09 or 2025-07-09T09:28:11)"
},
"to": {
"type": "string",
"description": "A date and optional time for the newest article allowed. This should be in ISO 8601 format (e.g. 2025-07-09 or 2025-07-09T09:28:11)"
},
"language": {
"type": "string",
"description": "The 2-letter ISO-639-1 code of the language you want to get headlines for."
},
"sortBy": {
"type": "string",
"description": "The order to sort the articles in. Possible options: relevancy, popularity, publishedAt."
},
"pageSize": {
"type": "integer",
"description": "The number of results to return per page. Maximum: 100."
},
"page": {
"type": "integer",
"description": "Use this to page through the results."
}
},
"required": [
"q"
]
},
"outputs": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "If the request was successful or not. Options: ok, error."
},
"totalResults": {
"type": "integer",
"description": "The total number of results available for your request."
},
"articles": {
"type": "array",
"description": "The results of the request.",
"items": {
"type": "object",
"properties": {
"source": {
"type": "object",
"description": "The identifier id and a display name name for the source this article came from.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"author": {
"type": "string",
"description": "The author of the article"
},
"title": {
"type": "string",
"description": "The headline or title of the article."
},
"description": {
"type": "string",
"description": "A description or snippet from the article."
},
"url": {
"type": "string",
"description": "The direct URL to the article."
},
"urlToImage": {
"type": "string",
"description": "The URL to a relevant image for the article."
},
"publishedAt": {
"type": "string",
"description": "The date and time that the article was published, in UTC (+000)"
},
"content": {
"type": "string",
"description": "The unformatted content of the article, where available. This is truncated to 200 chars."
}
},
"required": [
"title"
]
}
}
}
},
"tool_provider": {
"provider_type": "http",
"url": "https://newsapi.org/v2/everything",
"http_method": "GET",
"content_type": "application/json",
"auth": {
"auth_type": "api_key",
"api_key": "$NEWS_API_KEY",
"var_name": "X-Api-Key"
}
}
},
{
"name": "top_headlines_get",
"description": "This endpoint provides live top and breaking headlines for a country, specific category in a country, single source, or multiple sources. You can also search with keywords. Articles are sorted by the earliest date published first. This endpoint is great for retrieving headlines for use with news tickers or similar.",
"tags": [
"articles"
],
"inputs": {
"type": "object",
"properties": {
"country": {
"type": "string",
"description": "The 2-letter ISO 3166-1 code of the country you want to get headlines for. Note: you can't mix this param with the sources param."
},
"category": {
"type": "string",
"description": "The category you want to get headlines for. Possible options: business, entertainment, general, health, science, sports, technology. Note: you can't mix this param with the sources param."
},
"sources": {
"type": "string",
"description": "A comma-seperated string of identifiers for the news sources or blogs you want headlines from. Note: you can't mix this param with the country or category params."
},
"q": {
"type": "string",
"description": "Keywords or a phrase to search for."
},
"pageSize": {
"type": "integer",
"description": "The number of results to return per page (request). 20 is the default, 100 is the maximum."
},
"page": {
"type": "integer",
"description": "Use this to page through the results if the total results found is greater than the page size."
}
}
},
"outputs": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "If the request was successful or not. Options: ok, error."
},
"totalResults": {
"type": "integer",
"description": "The total number of results available for your request."
},
"articles": {
"type": "array",
"description": "The results of the request.",
"items": {
"type": "object",
"properties": {
"source": {
"type": "object",
"description": "The identifier id and a display name name for the source this article came from.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"author": {
"type": "string",
"description": "The author of the article"
},
"title": {
"type": "string",
"description": "The headline or title of the article."
},
"description": {
"type": "string",
"description": "A description or snippet from the article."
},
"url": {
"type": "string",
"description": "The direct URL to the article."
},
"urlToImage": {
"type": "string",
"description": "The URL to a relevant image for the article."
},
"publishedAt": {
"type": "string",
"description": "The date and time that the article was published, in UTC (+000)"
},
"content": {
"type": "string",
"description": "The unformatted content of the article, where available. This is truncated to 200 chars."
}
},
"required": [
"title"
]
}
}
}
},
"tool_provider": {
"provider_type": "http",
"url": "https://newsapi.org/v2/top-headlines",
"http_method": "GET",
"content_type": "application/json",
"auth": {
"auth_type": "api_key",
"api_key": "$NEWS_API_KEY",
"var_name": "X-Api-Key"
}
}
}
]
}