# Introduction to pynytimes

The New York Times is one of the most trusted news source around the world. All their article metadata is easily available using their API, which is publicly available to everyone (though only for non-commercial use). All this data can be queried using a REST API, however setting it up can be quite time-consuming. This library solves that problem, now you can easily and quickly query the API without having to worry about the specific implementation.

To get started just go to the instructions on the next page.

## Alternative guides

While this is the most torough installation/usage guide, other helpful guides, with their own specific instructions are also available. These might be helpful if a specific part of the documentation is unclear, or you need specific instructions. These are some of the following alternative guides:

* [Berkeley D-Lab: Getting Started with the NYT API](https://dlab.berkeley.edu/news/getting-started-nyt-api) (March 1, 2022; George McIntire)
* [Towards Data Science: New York Times Sentiment Analysis with Tensorflow](https://towardsdatascience.com/nyt-sentiment-analysis-with-tensorflow-7156d77e385e) (January 9, 2022; Anne Bode)
* [pynytimes: (Old, more extensive) README instructions](https://github.com/michadenheijer/pynytimes/tree/0.8.0) (January 4, 2022; Micha den Heijer)&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pynytimes.michadenheijer.com/introduction-to-pynytimes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
