lulubanana
API · 13 of 15

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.

11 endpoints11 freeAll freeTikTok · YouTube Shorts · Instagram Reels

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

  1. 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)
  2. Verify signatures (HMAC-SHA256 of the raw body)
  3. De-duplicate with the unique delivery id
  4. Read deliveries with your server's replies, and resend one
  5. Send a test event
  6. Set the breakout threshold (1.5-50× usual views)

How it works

  1. POST /webhooks with your https address and events (any of alert, creator, trend, run, analysis, search, digest; all when left out); keep the secret.
  2. Verify X-Lulubanana-Signature on every request.
  3. 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

EndpointWhat it doesCost
POST /webhooksAdd a webhook (or Slack/Discord) for eventsFree
GET /webhooksYour webhooks and their delivery healthFree
GET /webhooks/{id}One webhookFree
PATCH /webhooks/{id}Change a webhook's address, events, or switch it on or offFree
DELETE /webhooks/{id}Remove a webhookFree
POST /webhooks/{id}/reenableSwitch a webhook back on after it was switched off for 5 failed deliveries in a rowFree
POST /webhooks/{id}/testSend a test event (type "test") within a few seconds; see the result in…Free
GET /webhooks/{id}/deliveriesRecent deliveries (kept 30 days) with your server's reply status; failed ones can be…Free
POST /webhooks/deliveries/{delivery_id}/retrySend one delivery again (same payload, a new delivery id that names the original in…Free
GET /alerts/settingsAlert thresholdsFree
PUT /alerts/settingsChange alert settingsFree
POST/api/v1/webhooksFree#

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.

ParameterInTypeDescription
url requiredbodystringhttps:// address that receives the events
eventsbodyarrayAny of digest, alert, trend, run, creator, analysis, search (default all)
kindbodywebhook | slack | discordwebhook (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)"
  }
}
GET/api/v1/webhooksFree#

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();
GET/api/v1/webhooks/{id}Free#

One webhook

One webhook.

ParameterInTypeDescription
id requiredpathstringThe 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);
PATCH/api/v1/webhooks/{id}Free#

Change a webhook's address, events, or switch it on or off

Change a webhook's address, events, or switch it on or off.

ParameterInTypeDescription
id requiredpathstringThe id in the path
urlbodystringNew https:// address
eventsbodyarrayAny of digest, alert, trend, run, creator, analysis, search
activebodybooleanOn 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"] });
DELETE/api/v1/webhooks/{id}Free#

Remove a webhook

Remove a webhook.

ParameterInTypeDescription
id requiredpathstringThe 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);
POST/api/v1/webhooks/{id}/reenableFree#

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.

ParameterInTypeDescription
id requiredpathstringThe 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, {});
POST/api/v1/webhooks/{id}/testFree#

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.

ParameterInTypeDescription
id requiredpathstringThe 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, {});
GET/api/v1/webhooks/{id}/deliveriesFree#

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.

ParameterInTypeDescription
id requiredpathstringThe id in the path
limitquerystringResults per page, 1-100 (default 25)
cursorquerystringnext_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);
POST/api/v1/webhooks/deliveries/{delivery_id}/retryFree#

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).

ParameterInTypeDescription
delivery_id requiredpathstringdelivery_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", {});
GET/api/v1/alerts/settingsFree#

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();
PUT/api/v1/alerts/settingsFree#

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).

ParameterInTypeDescription
breakout_ratiobodynumberAlert at this many times the usual views, 1.5-50
breakout_alertsbodybooleanOn or off
trend_alertsbodybooleanOn or off
email_alertsbodybooleanEmail 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).