Overview
When tracking M&A activity across a large list of companies, such as a Fortune 25-style watchlist, the naive approach is to poll a search per company, or stand up a separate feed per company. Neither scales: polling means paying for requests whether or not anything changed, and one feed per company means managing dozens of schedules and webhook endpoints for what is really a single workflow. A Seltz monitor batches many searches under one schedule and tells you about new results with a webhook, so you get one feed and one notification channel for the whole list instead of one per company. This tutorial walks through that pattern: one monitor with a search request per company, a webhook to avoid polling, and Answer with aresponse_format schema to verify and extract deal details from each new result rather than parsing the raw record yourself.
Outline
- Create one monitor with a search request per company, and attach a webhook.
- Verify and handle a webhook delivery.
- Turn each new result into structured deal information with a single Answer call.
- Alert someone when a deal is detected.
1. Create one monitor with a search request per company, and attach a webhook.
A monitor’ssearch_requests is a list. One call to create can hold a search per company, up to 1,000 requests per monitor. Attach a webhook in the same call, so you’re notified when a run finishes rather than polling for new records.
A monitor’s name is unique per organization among live monitors: creating a second monitor with the same name returns
409 ALREADY_EXISTS. The webhook secret is returned once, in the create response, and never again, so store it immediately.cadence is a judgment call: deal news is not minute-sensitive, so a longer cadence like 6h keeps cost down without meaningfully delaying an alert. See Concepts for the full grammar and the one-hour floor.
2. Verify and handle a webhook delivery.
Deliveries are signed following the Standard Webhooks specification. Verify with the Standard Webhooks library for your language rather than write custom signature-checking code. This is the same verification shown in Webhooks.Both samples take the raw request body, which is the bytes as received before any JSON parsing. A framework that returns an already-parsed object has discarded the raw bytes, so use the raw-body accessor your framework provides. This is the body of whatever route handler receives the webhook
POST in your framework of choice, not a complete server.3. Turn each new result into structured deal information with a single Answer call.
Rather than parsing the record’s Markdown content yourself to decide whether it’s a real deal, useanswer with a response_format JSON schema. The only thing pulled from the record itself is its headline, used to anchor a fresh, targeted question. The verification and extraction are entirely Answer’s job.
is_deal to often be false. Both outcomes below are responses from the same schema, used to structure responses from the the watchlist in step 1. The first result is a confirmed deal, and the second is a routine article that just happened to match the search.
Truncated generation can leave
response.answer unparsable as JSON. The try/except block above skips the record. A malformed response_format schema is different: it’s rejected before the request is billed, but that’s a one-time schema-authoring mistake that raises on every call, not a per-record condition. Write and test DEAL_FORMAT once rather than expecting the loop above to handle it.4. Alert someone when a deal is detected.
alert_deal stands in for however you notify a person: for example, Slack, email, PagerDuty, or your own on-call tooling. Swap in your own integration; the important part is passing along the structured fields Answer already extracted, not the raw record.
Next steps
- Monitor Concepts — Monitors, runs, records and webhooks
- Webhooks — Attaching, disabling and removing a webhook
- Monitor Reference — Endpoints, limits and errors
- Answer API Reference — Full
response_formatspecification