# World news api

The World News API gives you access to thousands of news sources in over 50 languages from over 150 countries.

- **Category:** news & lifestyle
- **Auth:** API_KEY, API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 6
- **Triggers:** 0
- **Slug:** `WORLD_NEWS_API`
- **Version:** 00000000_00

## Tools

### Extract News

**Slug:** `WORLD_NEWS_API_EXTRACT_NEWS`

Tool to extract a news article from a website to a well-structured JSON object. Use when you need to extract structured data from a news article URL, including title, text, images, videos, publish date, authors, language, and sentiment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The URL of the news article to extract. |
| `analyze` | boolean | No | Whether to analyze the extracted news (extract entities, detect sentiment etc.). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extract News Links

**Slug:** `WORLD_NEWS_API_EXTRACT_NEWS_LINKS`

Tool to extract news article links from a website or webpage. Use when you need to discover all news article URLs on a page, with optional filtering by URL prefix and subdomain inclusion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The URL from which links should be extracted. |
| `prefix` | string | No | The prefix the news links must start with. Use to filter links by URL pattern. |
| `analyze` | boolean | No | Whether to analyze the extracted news (extract entities, detect sentiment etc.). |
| `sub_domain` | boolean | No | Whether to include links to news on sub-domains. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Geo Coordinates

**Slug:** `WORLD_NEWS_API_GET_GEO_COORDINATES`

Tool to retrieve latitude and longitude of a location name. Use when you need geographic coordinates to fill the location-filter parameter in news search operations.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `location` | string | Yes | The address or name of the location to retrieve coordinates for. Maximum length: 1000 characters. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### News Website to RSS Feed

**Slug:** `WORLD_NEWS_API_NEWS_WEBSITE_TO_RSS_FEED`

Tool to convert any news website page into an RSS feed. Provide a URL to a news website page and get back an RSS feed with the latest news from that page. Use when you need to create an RSS feed from a news website that doesn't provide one natively.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | The URL of the news website to convert into an RSS feed. Any page of a news website can be provided. |
| `extract-news` | boolean | No | Whether to extract the full news content for each link instead of just returning the link. If true, the RSS feed will contain full article content. If false or not provided, only basic information is included. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search News

**Slug:** `WORLD_NEWS_API_SEARCH_NEWS`

Tool to search and filter news articles by keyword/text query with optional filters for language, date range, sentiment, location, and pagination. Use when you need to retrieve news articles matching specific keywords (e.g., 'UEFA Champions League', 'climate change') with optional refinements by country, category, source, or date window. Note: When sorting by publish-time, the API requires either a text query or a bounded publish-date window.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sort` | string | No | Sort field for results. Use 'publish-time' to sort by publication date. When sorting by publish-time, either text or a bounded publish-date window must be specified. |
| `text` | string | Yes | Search query keyword or text. Supports Boolean operators (OR logic) and exclusions. Must be 3-100 characters. |
| `number` | integer | No | Number of results to return per page. Range: 1-100. |
| `offset` | integer | No | Number of results to skip for pagination. Range: 0-10000. |
| `authors` | string | No | Comma-separated list of author names to filter articles by. |
| `entities` | string | No | Filter by semantic entity types (e.g., person names, organizations, locations). |
| `language` | string | No | ISO 6391 language code to filter articles by language (e.g., 'en', 'de', 'fr'). Must be exactly 2 characters. |
| `categories` | string | No | Comma-separated list of news categories to filter by (e.g., 'politics', 'sports', 'business', 'technology', 'entertainment', 'health', 'science'). |
| `news-sources` | string | No | Comma-separated list of news source URLs to filter by (e.g., 'https://cnn.com,https://bbc.com'). |
| `max-sentiment` | number | No | Maximum sentiment score for articles. Range: -1.0 (negative) to 1.0 (positive). |
| `min-sentiment` | number | No | Minimum sentiment score for articles. Range: -1.0 (negative) to 1.0 (positive). |
| `sort-direction` | string | No | Sort direction: 'ASC' for ascending or 'DESC' for descending order. |
| `source-country` | string | No | ISO 3166 country code to filter news by origin country (e.g., 'us', 'gb', 'de'). Must be exactly 2 characters. |
| `location-filter` | string | No | Geographic filter in format 'latitude,longitude,radius_in_km' (e.g., '40.7128,-74.0060,50' for 50km around New York City). |
| `latest-publish-date` | string | No | Publication date upper bound in format YYYY-MM-DD or YYYY-MM-DD HH:MM:SS (e.g., '2024-12-31' or '2024-12-31 23:59:59'). |
| `earliest-publish-date` | string | No | Publication date lower bound in format YYYY-MM-DD or YYYY-MM-DD HH:MM:SS (e.g., '2024-01-01' or '2024-01-01 00:00:00'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search News Sources

**Slug:** `WORLD_NEWS_API_SEARCH_NEWS_SOURCES`

Tool to search whether a news source is being monitored by the World News API. Use when you need to check if a specific news source is available in the system.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The (partial) name of the source to search for. Maximum length: 1000 characters. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Top News

**Slug:** `WORLD_NEWS_API_TOP_NEWS`

Tool to get the top news from a country in a specific language for a given date. The top news are clustered from multiple sources in the specified country. Use when you need to retrieve current or historical top news headlines and articles.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | No | The date for which the top news should be retrieved in YYYY-MM-DD format (e.g., '2024-12-20'). If not provided, the current day is assumed. |
| `language` | string | Yes | The ISO 6391 language code of the top news (e.g., 'en', 'de', 'fr'). The language must be one spoken in the source-country. Must be exactly 2 characters. |
| `headlines-only` | boolean | No | Whether to only return basic information such as id, title, and url of the news. Set to true for a lighter response with just headlines. |
| `source-country` | string | Yes | The ISO 3166 country code of the country for which top news should be retrieved (e.g., 'us', 'gb', 'de'). Must be exactly 2 characters. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
