Skip to main content

Before you begin

Create an account in the NewsCatcher platform and copy your API key. The same key works for the News API and the agent.
Store the key in an environment variable instead of pasting it into code: export NEWSCATCHER_API_KEY="your key".

Search the news

1

Send a search

Send your question in q and the key in the x-api-key header:
2

Read the response

Results come best first. Each article has a one-line summary and the story it belongs to:
The search ran at the default medium effort over the last 7 days. Set effort and search_window to change both.

Run the agent

1

Start a run

Describe the events you need. The run starts in the background:
The response carries the run_id.
2

Get the result

A fast run takes about 1 to 3 minutes. Poll the run until its status is no longer queued or running. When it is succeeded, read its columns and rows:
To follow the run live instead, open its progress stream.

Next steps

Effort levels

Trade speed and price for ranking quality.

Agent modes

Events or companies, once or kept up to date.