PlaybooksMonitor Google News
Fetch latest news articles
Call the Google News endpoint for the keyword you monitor.
Call GET /v1/google/news with the keyword you want to monitor.
import os
import requests
API_KEY = os.environ["AUTOM_API_KEY"]
def get(path, params):
response = requests.get(f"https://api.autom.dev{path}", headers={"x-api-key": API_KEY}, params=params)
if not response.ok:
raise SystemExit(f"Error {response.status_code}: {response.text}")
return response.json()
data = get("/v1/google/news", {"query": "OpenAI", "gl": "us", "hl": "en"})
print(data)