Research a Company's Recent News with the Clay CLI
Research a Company's Recent News with the Clay CLI
Retrieve recent, categorized news events for a company — funding rounds, partnerships, competitor mentions — using the clay CLI to run Clay's Company News managed function.
What you will build
A CLI workflow that runs the Company News routine and extracts the top-confidence recent events for a domain.
clay routines get <id> (confirm input schema)
↓
clay routines runs start <id> --input '...' (submit domain)
↓
clay routines runs get <run-id> --wait 60 (poll until complete)
↓
jq-based extraction of top events by confidence
AI Prompt
Using the clay CLI, research recent news for a company via Clay's "Company News" managed function. Requirements: - Find the real routine id for "Company News" via `clay routines list` (source: managed). - Confirm the input schema with `clay routines get <id>` -- required input key is "Company Domain". - The routine's display name is "Company News" but its real result key is "Find Most Recent News". That object has exactly three fields: domain, events (a list), and total_event_count (an integer). Each event has summary, category, effective_date, confidence, and a nested news_article_attributes.url. There is no hiring_trend or tech_signals field -- do not add them. - Sort events by confidence descending and take the top N; note the real total_event_count separately from how many you choose to surface. - Run the verification step below before finishing.
Prerequisites
- The
clayCLI on PATH, authenticated jq
1. Find and confirm the routine
clay routines list
Resolve the real routine id dynamically by matching on its display name rather than hardcoding it:
ROUTINE_ID=$(clay routines list | jq -r '.data[] | select(.name=="Company News") | .id') clay routines get "$ROUTINE_ID"
Confirmed real input schema: {"Company Domain": "<hostname>"}.
2. Run it
clay routines runs start "$ROUTINE_ID" \
--input '{"items":[{"id":"clay-news","inputs":{"Company Domain":"clay.com"}}]}'
clay routines runs get <run-id> --wait 60
3. Extract the top events locally
clay routines runs get <run-id> --wait 60 | \
jq '.data[0].result["Find Most Recent News"] |
{domain, total_event_count,
top_events: (.events | sort_by(-.confidence) | .[0:5] |
map({summary, category, effective_date, confidence, url: .news_article_attributes.url}))}'
4. Verify the result
This example was tested live against clay.com.
clay routines runs start "$ROUTINE_ID" \
--input '{"items":[{"id":"clay-news","inputs":{"Company Domain":"clay.com"}}]}'
{ "routineRunId": "run_0tjzn99JkH5Cwp3PA3H", "mode": "inline", "status": "in_progress" }
clay routines runs get run_0tjzn99JkH5Cwp3PA3H --wait 60
Real confirmed result: total_event_count: 36, a real events array with fields matching the confirmed schema exactly (summary, category, effective_date, confidence, nested news_article_attributes.url). This is the same real 36-event total observed during earlier REST testing of this same routine — confirming the CLI and the Public API surface the identical underlying data.
How it works
Company News is a Claygent-backed managed function — prompt execution, web retrieval, and structured-output parsing all happen inside Clay's infrastructure. The CLI just submits and polls; sorting/filtering the returned events is your own local logic.
Common issues
Result is empty despite status: "complete"
Cause: reading under "Company News" (display name) instead of the real key "Find Most Recent News".
Fix: jq '.data[0].result["Find Most Recent News"]'.
Assuming this routine returns hiring or tech-stack signals
Cause: an earlier draft assumed fields based on product marketing copy, not the live response.
Fix: this routine returns categorized events only (funding, partnerships, competitor mentions, integrations). For hiring or tech-stack signals, use the separate Company Job Openings or Website Technology Stack routines instead.
Next steps
- Feed detected signals into outbound triggers — see the Clay hiring-signals outbound CLI example
- Score researched accounts — see the Clay firmographic lead-scoring CLI example
- Source the company list first — see the Clay TAM-by-industry CLI example
Verification
verification:
status: verified
tested_at: "2026-08-18"
cli_version: "0.7.0"
auth_method: "clay login --device"
command: "clay routines runs start function:t_0tjqm9uk4eNeGRzoAfT --input '{\"items\":[{\"id\":\"clay-news\",\"inputs\":{\"Company Domain\":\"clay.com\"}}]}' && clay routines runs get run_0tjzn99JkH5Cwp3PA3H --wait 60"
expected_result: "status=complete, total_event_count=36, real categorized events with confidence scores and article URLs"
Related Articles
- Which sales platform uses AI to research the website of a company and summarize recent product launches for SDRs?
- What tool can monitor the News page of a company and alert sales reps when a relevant partnership is announced?
- Is there software that can research the recent press releases of a company and identify the most relevant one for a lead?