> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Newspaper4k

> Newspaper4kTools uses the newspaper4k library to expose a read_article function that returns JSON with an article's title, authors, publish date, and text.

**Newspaper4kTools** enable an Agent to read news articles using the Newspaper4k library.

## Prerequisites

The following example requires the `newspaper4k` and `lxml_html_clean` libraries.

```shell theme={null}
uv pip install -U newspaper4k lxml_html_clean openai
```

## Example

The following agent will summarize the article: [https://www.rockymountaineer.com/blog/experience-icefields-parkway-scenic-drive-lifetime](https://www.rockymountaineer.com/blog/experience-icefields-parkway-scenic-drive-lifetime).

```python cookbook/91_tools/newspaper4k_tools.py theme={null}
from agno.agent import Agent
from agno.tools.newspaper4k import Newspaper4kTools

agent = Agent(tools=[Newspaper4kTools()], debug_mode=True)
agent.print_response("Please summarize https://www.rockymountaineer.com/blog/experience-icefields-parkway-scenic-drive-lifetime")
```

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `enable_read_article` | `bool` | `True` | Enables the functionality to read the full content of an article. |
| `include_summary` | `bool` | `False` | Specifies whether to include a summary of the article along with the full content. |
| `article_length` | `Optional[int]` | `None` | The maximum length of the article or its summary to be processed or returned. |
| `all` | `bool` | `False` | Enables all functionality. |

## Toolkit Functions

| Function | Description |
| - | - |
| `read_article` | Reads the full content of an article from a URL. Returns JSON containing the article title, authors, publish date, and text. |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/newspaper4k.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.