Webhooks and alerts API for viral video, creator and trend events
The lulubanana webhooks API sends signed events to your server when a tracked creator's post breaks out, a tracked creator posts, a trend is detected or moves stage, a research job finishes or fails, an analysis is ready, a search opportunity job finds clear Google or YouTube gaps or the weekly digest is out, with retries, a 30-day delivery log, one-call resend and adjustable alert thresholds.
What is the alerts & webhooks API?
The lulubanana webhooks API sends signed events to your server when a tracked creator's post breaks out, a tracked creator posts, a trend is detected or moves stage, a research job finishes or fails, an analysis is ready, a search opportunity job finds clear Google or YouTube gaps or the weekly digest is out, with retries, a 30-day delivery log, one-call resend and adjustable alert thresholds.
lulubanana is a content research platform and API for short-form video (TikTok, YouTube Shorts and Instagram Reels). It is built for developers, content teams and autonomous AI agents that need evidence-backed answers instead of raw posts: every result keeps its source videos and marks what is measured and what is an AI reading.
6 things you can do with the webhooks API for viral videos
- Subscribe to the events alert, creator, trend, run, analysis, search and digest; each delivery's type names the exact event (video.new_outlier, creator.new_video, trend.detected or trend.stage_changed, research.completed or research.failed, analysis.completed, search.gap_found, digest.weekly)
- Verify signatures (HMAC-SHA256 of the raw body)
- De-duplicate with the unique delivery id
- Read deliveries with your server's replies, and resend one
- Send a test event
- Set the breakout threshold (1.5-50× usual views)
How it works
- POST /webhooks with your https address and events (any of alert, creator, trend, run, analysis, search, digest; all when left out); keep the secret.
- Verify X-Lulubanana-Signature on every request.
- Use the delivery id to drop duplicates; resend with /webhooks/deliveries/{id}/retry.
Key terms
- Event you subscribe to
- What you send in events: alert, creator, trend, run, analysis, search or digest.
- Delivered type
- The type field of each delivery: alert → video.new_outlier, creator → creator.new_video, trend → trend.detected (a new or newly rising trend) or trend.stage_changed (a trend moved stage; a topic trend at most once a day), run → research.completed or research.failed, analysis → analysis.completed, search → search.gap_found (a search opportunity job found a Google or YouTube gap score of 60+), digest → digest.weekly. trend.stage_changed and search.gap_found carry an event_id.
Endpoints
| Endpoint | What it does | Cost |
|---|---|---|
POST /webhooks | Add a webhook (or Slack/Discord) for events | Free |
GET /webhooks | Your webhooks and their delivery health | Free |
GET /webhooks | One webhook | Free |
PATCH /webhooks | Change a webhook's address, events, or switch it on or off | Free |
DELETE /webhooks | Remove a webhook | Free |
POST /webhooks | Switch a webhook back on after it was switched off for 5 failed deliveries in a row | Free |
POST /webhooks | Send a test event (type "test") within a few seconds; see the result in… | Free |
GET /webhooks | Recent deliveries (kept 30 days) with your server's reply status; failed ones can be… | Free |
POST /webhooks | Send one delivery again (same payload, a new delivery id that names the original in… | Free |
GET /alerts | Alert thresholds | Free |
PUT /alerts | Change alert settings | Free |
Add a webhook (or Slack/Discord) for events
Add a webhook (or Slack/Discord) for events: digest, alert (breakout video), trend (trend.detected for a new or newly rising trend, trend.stage_changed when a trend moves stage), run (research finished or failed), creator (new post by a tracked creator), analysis (an analysis job finished), search (search.gap_found: a search opportunity job found clear Google or YouTube gaps). Webhook bodies are signed: X-Lulubanana-Signature = sha256 HMAC of the raw body with the secret returned once here. Each delivery has a unique id (X-Lulubanana-Delivery) to de-duplicate retries.
| Parameter | In | Type | Description |
|---|---|---|---|
url required | body | string | https:// address that receives the events |
events | body | array | Any of digest, alert, trend, run, creator, analysis, search (default all) |
kind | body | webhook | slack | discord | webhook (default), slack or discord |
curl -X POST "https://lulubanana.com/api/v1/webhooks" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/hooks/lulubanana","events":["alert","run","analysis"]}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.create_webhooks({"url": "https://example.com/hooks/lulubanana", "events": ["alert", "run", "analysis"]})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.create_webhooks({ url: "https://example.com/hooks/lulubanana", events: ["alert", "run", "analysis"] });Example reply
{
"data": {
"id": 12,
"kind": "webhook",
"url": "https://example.com/…/cana",
"events": [
"alert",
"run",
"analysis"
],
"active": true,
"secret": "9f2c…(shown once)",
"signature": "X-Lulubanana-Signature: sha256=HMAC_SHA256(secret, raw body)"
}
}Your webhooks and their delivery health
Your webhooks and their delivery health.
curl "https://lulubanana.com/api/v1/webhooks" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_webhooks()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_webhooks();One webhook
One webhook.
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | The id in the path |
curl "https://lulubanana.com/api/v1/webhooks/42" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_webhooks_item(42)import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_webhooks_item(42);Change a webhook's address, events, or switch it on or off
Change a webhook's address, events, or switch it on or off.
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | The id in the path |
url | body | string | New https:// address |
events | body | array | Any of digest, alert, trend, run, creator, analysis, search |
active | body | boolean | On or off |
curl -X PATCH "https://lulubanana.com/api/v1/webhooks/42" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{"events":["alert"]}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.update_webhooks_item(42, {"events": ["alert"]})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.update_webhooks_item(42, { events: ["alert"] });Remove a webhook
Remove a webhook.
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | The id in the path |
curl -X DELETE "https://lulubanana.com/api/v1/webhooks/42" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.delete_webhooks_item(42)import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.delete_webhooks_item(42);Switch a webhook back on after it was switched off for 5 failed deliveries in a row
Switch a webhook back on after it was switched off for 5 failed deliveries in a row.
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | The id in the path |
curl -X POST "https://lulubanana.com/api/v1/webhooks/42/reenable" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.create_webhooks_reenable(42, {})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.create_webhooks_reenable(42, {});Send a test event (type "test") within a few seconds; see the result in…
Send a test event (type "test") within a few seconds; see the result in /webhooks/{id}/deliveries.
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | The id in the path |
curl -X POST "https://lulubanana.com/api/v1/webhooks/42/test" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.create_webhooks_test(42, {})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.create_webhooks_test(42, {});Recent deliveries (kept 30 days) with your server's reply status; failed ones can be…
Recent deliveries (kept 30 days) with your server's reply status; failed ones can be sent again.
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string | The id in the path |
limit | query | string | Results per page, 1-100 (default 25) |
cursor | query | string | next_cursor from the previous page |
curl "https://lulubanana.com/api/v1/webhooks/42/deliveries" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_webhooks_deliveries(42)import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_webhooks_deliveries(42);Send one delivery again (same payload, a new delivery id that names the original in…
Send one delivery again (same payload, a new delivery id that names the original in retry_of).
| Parameter | In | Type | Description |
|---|---|---|---|
delivery_id required | path | string | delivery_id |
curl -X POST "https://lulubanana.com/api/v1/webhooks/deliveries/dlv_981/retry" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.create_webhooks_deliveries_by_delivery_id_retry("dlv_981", {})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.create_webhooks_deliveries_by_delivery_id_retry("dlv_981", {});Alert thresholds
Alert thresholds: breakout alerts fire when a tracked creator's post reaches breakout_ratio × their usual views (default 3).
curl "https://lulubanana.com/api/v1/alerts/settings" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_alerts_settings()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_alerts_settings();Change alert settings
Change alert settings: breakout_ratio (1.5-50), breakout_alerts, trend_alerts, email_alerts. Webhooks receive the same events (subscribe in /webhooks).
| Parameter | In | Type | Description |
|---|---|---|---|
breakout_ratio | body | number | Alert at this many times the usual views, 1.5-50 |
breakout_alerts | body | boolean | On or off |
trend_alerts | body | boolean | On or off |
email_alerts | body | boolean | Email as well |
curl -X PUT "https://lulubanana.com/api/v1/alerts/settings" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{"breakout_ratio":5}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.set_alerts_settings({"breakout_ratio": 5})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.set_alerts_settings({ breakout_ratio: 5 });Alerts & webhooks: frequently asked questions
How do I verify a lulubanana webhook?
Compute HMAC-SHA256 of the raw request body with your webhook secret and compare it with the X-Lulubanana-Signature header (sha256=…).
What happens when my server is down?
Failed deliveries are logged; after 5 failures in a row the webhook is switched off and you are told. Re-enable it and resend any delivery from the log.
How do I hear when a search opportunity job finds a gap?
Subscribe to the search event. When a search opportunity job finds an opportunity whose Google or YouTube gap score is 60 or more, you get a search.gap_found delivery with its event_id, the gaps (opportunity id, topic, both gap scores) and the link to the job's opportunities.
How do I follow trends as they change stage?
Subscribe to the trend event. Besides trend.detected you get trend.stage_changed with event_id, trend_id, kind, from_stage and to_stage when a content trend in one of your agents moves stage, and when a topic trend moves stage (at most once a day per trend).