API keys, SDKs and MCP server for AI agents
The lulubanana API is a versioned JSON REST API with Bearer keys (full access or read-only), per-key monthly credit limits, a 90-day audit log, an OpenAPI 3.1 specification, generated Python and JavaScript SDKs and an MCP server, so AI agents (desktop assistants, coding agents and agent frameworks) can run the whole research workflow without the dashboard.
What is the keys, sdks & mcp API?
The lulubanana API is a versioned JSON REST API with Bearer keys (full access or read-only), per-key monthly credit limits, a 90-day audit log, an OpenAPI 3.1 specification, generated Python and JavaScript SDKs and an MCP server, so AI agents (desktop assistants, coding agents and agent frameworks) can run the whole research workflow without the dashboard.
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.
7 things you can do with the MCP server for social media research
- Create full-access or read-only keys and revoke them
- Cap each key's monthly credits
- Read your balance, prices, usage and a 90-day audit log
- Estimate the credits of up to 20 calls before you spend, with the reason a call is free and the fair use left
- Connect an AI assistant through the MCP server (sign in with OAuth, no key to paste)
- Use the Python and JavaScript SDKs, with retries and paging
- Feed /llms-full.txt and /ai-guide.txt to an AI tool
How it works
- Create a key in Settings → API.
- Send Authorization: Bearer lb_… on every request.
- Or add the MCP server address to your AI assistant.
- Before a large job, POST /estimate with the calls you plan (free, read-only keys too).
Endpoints
| Endpoint | What it does | Cost |
|---|---|---|
GET /account | Plan, status and credit balance | Free |
GET /account | Your credit balance | Free |
POST /account | A checkout link that adds a credit pack (nothing is charged by this call; whoever… | Free |
GET /account | Every API request made with your keys in the last 90 days | Free |
GET /pricing | Credit price of every action (the same as in the app) | Free |
GET /usage | Credit ledger and 30-day totals | Free |
POST /estimate | Cost estimate before you spend | Free |
POST /mcp | MCP server (Model Context Protocol, Streamable HTTP) | Free |
Plan, status and credit balance
Plan, status and credit balance.
curl "https://lulubanana.com/api/v1/account" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_account()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_account();Your credit balance
Your credit balance.
curl "https://lulubanana.com/api/v1/account/balance" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_account_balance()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_account_balance();Example reply
{
"data": {
"credits_remaining": 1840,
"plan": "pro",
"status": "active"
}
}A checkout link that adds a credit pack (nothing is charged by this call; whoever…
A checkout link that adds a credit pack (nothing is charged by this call; whoever opens the link pays).
| Parameter | In | Type | Description |
|---|---|---|---|
pack required | body | p1000 | p5000 | p20000 | Credit pack: p1000 (1000 credits, $25), p5000 (5000 credits, $110), p20000 (20000 credits, $380) |
curl -X POST "https://lulubanana.com/api/v1/account/top-up" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{"pack":"p1000"}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.create_account_top_up({"pack": "p1000"})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.create_account_top_up({ pack: "p1000" });Every API request made with your keys in the last 90 days
Every API request made with your keys in the last 90 days: when, which key, method, path, result status and credits.
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | string | 1-200 (default 50) |
cursor | query | string | next_cursor from the previous page |
curl "https://lulubanana.com/api/v1/account/audit" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_account_audit()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_account_audit();Credit price of every action (the same as in the app)
Credit price of every action (the same as in the app).
curl "https://lulubanana.com/api/v1/pricing" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_pricing()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_pricing();Example reply (real data, trimmed)
{
"data": {
"prices": {
"run": {
"credits": 100,
"label": "Research agent run",
"unit": "per run",
"note": "One-off, manual or scheduled. Returned in full if the run fails."
},
"track_creator": {
"credits": 15,
"label": "Creator tracking",
"unit": "per daily check",
"note": "Each tracked creator, each day it is checked."
},
"track_video": {
"credits": 10,
"label": "Video tracking",
"unit": "per daily check",
"note": "Each tracked video, each day it is checked."
},
"baseline_check": {
"credits": 15,
"label": "Creator baseline check",
"unit": "per check",
"note": "Reads a creator's recent posts to measure their usual views (API). Free when checked in the last 24 hours. Returned if the check fails."
},
"comments_check": {
"credits": 10,
"label": "Video comments check",
"unit": "per video",
"note": "Collects a TikTok video's top comments (API). Free for YouTube and when collected in the last 7 days. Returned if it fails. Instagram com…"
},
"search_check": {
"credits": 10,
"label": "Search check",
"unit": "per keyword or demand lookup",
"note": "The top Google or YouTube results for one keyword with what they miss, or search demand for up to 20 keywords. Free when checked in the l…"
},
"search_research": {
"credits": 100,
"label": "Search opportunity research",
"unit": "per job",
"note": "Social evidence matched to Google and YouTube searches: intent, demand, the top results and their gaps, four separate scores, up to 20 ra…"
}
},
"included": [
"Reading results: outliers, hooks, formats, playbook, trends",
"Asking Lulu (scripts, briefs, reports)"
]
}
}Credit ledger and 30-day totals
Credit ledger and 30-day totals. ?limit=1–200
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | string | Rows of the credit ledger, 1-200 (default 50) |
curl "https://lulubanana.com/api/v1/usage" \
-H "Authorization: Bearer $LULUBANANA_KEY"import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.get_usage()import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.get_usage();Cost estimate before you spend
Cost estimate before you spend: send up to 20 calls ({method, path, body}) and get each one's credits, why it is free when it is (cached in the last 7 days, already running, a read, included), the fair use left today for included AI work, the total, your balance and whether it covers the total. Changes nothing and charges nothing.
| Parameter | In | Type | Description |
|---|---|---|---|
calls required | body | array | 1-20 calls, e.g. {"method": "POST", "path": "/search/demand", "body": {"keywords": ["contour"]}} |
curl -X POST "https://lulubanana.com/api/v1/estimate" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{"calls":[{"method":"POST","path":"/search/opportunities","body":{"niche":"Home espresso","audience":"beginners with a first espresso machine at home"}},{"method":"POST","path":"/search/demand","body":{"keywords":["home espresso machine","espresso for beginners"]}}]}'import os
from lulubanana import Lulubanana
lb = Lulubanana(os.environ["LULUBANANA_KEY"])
r = lb.create_estimate({"calls": [{"method": "POST", "path": "/search/opportunities", "body": {"niche": "Home espresso", "audience": "beginners with a first espresso machine at home"}}, {"method": "POST", "path": "/search/demand", "body": {"keywords": ["home espresso machine", "espresso for beginners"]}}]})import { Lulubanana } from './lulubanana.mjs';
const lb = new Lulubanana(process.env.LULUBANANA_KEY);
const r = await lb.create_estimate({ calls: [{ method: "POST", path: "/search/opportunities", body: { niche: "Home espresso", audience: "beginners with a first espresso machine at home" } }, { method: "POST", path: "/search/demand", body: { keywords: ["home espresso machine", "espresso for beginners"] } }] });Example reply
{
"data": {
"calls": [
{
"method": "POST",
"path": "/search/opportunities",
"route": "POST /api/v1/search/opportunities",
"price_key": "search_research",
"credits": 200,
"free": false,
"free_reason": null,
"fair_use": null,
"detail": {
"search_research": 100,
"research_run": 100,
"needs_collection": true,
"collect": true,
"reuses_research_job": null,
"meaning_match": false,
"evidence": {
"mode": "library",
"agent_id": null,
"window_days": 14,
"platforms": [
"tt",
"ig",
"yt"
],
"videos": 0,
"creators": 0,
"verified_outliers": 0,
"outlier_creators": 0,
"newest_post": null,
"needs_collection": true,
"thresholds": {
"min_outliers": 5,
"min_outlier_creators": 3
}
}
},
"note": "The niche was matched to the library by its words only here (the meaning match is computed by the real call), so whether a research run is needed can differ."
},
{
"method": "POST",
"path": "/search/demand",
"route": "POST /api/v1/search/demand",
"price_key": "search_check",
"credits": 10,
"free": false,
"free_reason": null,
"fair_use": null,
"detail": {
"keywords": 2,
"cached": [],
"to_look_up": [
"home espresso machine",
"espresso for beginners"
]
}
}
],
"total_credits": 210,
"unknown": 0,
"recurring_per_day": null,
"balance": 1840,
"enough_credits": true,
"key_monthly_left": null,
"note": "An estimate of what these calls would cost now, from the same price rules as the calls themselves (cached and repeat checks are free). Nothing was charged, queued or started. Prices: GET /pricing."
}
}MCP server (Model Context Protocol, Streamable HTTP)
MCP server (Model Context Protocol, Streamable HTTP). Connect an AI assistant with your API key; every endpoint is a tool.
curl -X POST "https://lulubanana.com/api/v1/mcp" \
-H "Authorization: Bearer $LULUBANANA_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'# MCP is for AI assistants: add the server address to the assistant instead.// MCP is for AI assistants: add the server address to the assistant instead.Keys, SDKs & MCP: frequently asked questions
Can AI agents use lulubanana without the dashboard?
Yes. Every capability is an API endpoint and an MCP tool; the research guide (/ai-guide.txt) tells an agent which call answers which question.
What is a read-only key?
A key that can read and search everything but cannot start research, track, or change settings (403 read_only_key). It can also ask for a cost estimate.
How do I know what a call will cost before I make it?
POST /estimate with up to 20 calls ({method, path, body}). Each gets its credits, whether and why it is free (cached in the last 7 days, already running, a read, included), the fair use left, and the total against your balance and the key's monthly limit. It uses the same price rules as the calls themselves and never starts work or charges. Prices are also at GET /pricing.