> For the complete documentation index, see [llms.txt](https://docs.projectbit.ca/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projectbit.ca/documentation/tools/newspaper4k.md).

# Newspaper4k

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

### [​](https://docs.phidata.com/tools/newspaper4k#prerequisites)Prerequisites <a href="#prerequisites" id="prerequisites"></a>

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

```shell
pip install -U newspaper4k lxml_html_clean
```

### [​](https://docs.phidata.com/tools/newspaper4k#example)Example <a href="#example" id="example"></a>

The following agent will summarize the article: <https://www.rockymountaineer.com/blog/experience-icefields-parkway-scenic-drive-lifetime>.

cookbook/tools/newspaper4k\_tools.py

```python
from bitca.agent import Agent
from bitca.tools.newspaper4k import Newspaper4k

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

### [​](https://docs.phidata.com/tools/newspaper4k#toolkit-params)Toolkit Params <a href="#toolkit-params" id="toolkit-params"></a>

| Parameter         | Type   | Default | Description                                                                        |
| ----------------- | ------ | ------- | ---------------------------------------------------------------------------------- |
| `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`  | `int`  | -       | The maximum length of the article or its summary to be processed or returned.      |

### [​](https://docs.phidata.com/tools/newspaper4k#toolkit-functions)Toolkit Functions <a href="#toolkit-functions" id="toolkit-functions"></a>

| Function           | Description                                                  |
| ------------------ | ------------------------------------------------------------ |
| `get_article_data` | This function reads the full content and data of an article. |
| `read_article`     | This function reads the full content of an article.          |
