Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorleban authored Dec 14, 2020
1 parent 0413a65 commit 9aad538
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ When making queries to Event Registry you will have to use an API key that you c

## Three simple examples to make you interested

**Find news articles that mention Tesla in the article title**

```python
from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
# print at most 500 articles
MAX_ITEMS = 500
q = QueryArticlesIter(keywords = "tesla", keywordsLoc="title")
for art in q.execQuery(er, sortBy = "date", maxItems = MAX_ITEMS):
print(art)
```

**Print a list of recently added articles mentioning George Clooney**

```python
Expand All @@ -58,15 +70,11 @@ q.setRequestedResult(RequestEventsInfo(sortBy = "date", count=10)) # return ev
print er.execQuery(q)
```

**What are the currently trending topics**
## Run a Jupyter notebook

```python
from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
# top 10 trending concepts in the news
q = GetTrendingConcepts(source = "news", count = 10)
print er.execQuery(q)
```
We've also prepared an interactive Jupyter notebook where we demonstrate how you can use the SDK. You can run it online and modify the individual examples.

**[Run Jupyter notebook with examples](https://mybinder.org/v2/gh/EventRegistry/event-registry-python-intro/master)

## Where to next?

Expand Down

0 comments on commit 9aad538

Please sign in to comment.