The REST API exposes the same operations as the MCP server, for automation tools (n8n, Make, Zapier, Clay) and scripts.
- Base URL:
https://api.useneedle.net/v1 - OpenAPI 3.1:
https://api.useneedle.net/v1/openapi.json - Auth:
Authorization: Bearer ndl_live_…from Settings → API & MCP
curl https://api.useneedle.net/v1/leads?since=24h -H "Authorization: Bearer ndl_live_…"
Responses are JSON. Lists page with limit (max 50) and cursor: pass next_cursor from one page as cursor for the next, with the same filters.
Endpoints
| Endpoint | Operation | What it does | Scope | Cost |
|---|---|---|---|---|
GET /v1/brands |
list_brands |
List brands | leads:read |
1 call |
GET /v1/leads |
get_leads |
Get leads | leads:read |
1 call |
POST /v1/leads/status |
update_lead_status |
Update lead status | leads:write |
1 call |
GET /v1/leads/{id} |
get_lead |
Get one lead | leads:read |
1 call |
PATCH /v1/leads/{id} |
update_lead_status |
Update lead status | leads:write |
1 call |
POST /v1/leads/{id}/drafts |
draft_reply |
Draft a reply | drafts:write |
1 call |
POST /v1/search |
search |
Search communities | search:run |
1 call |
GET /v1/searches/{id} |
get_search |
Get search results | search:run |
free |
GET /v1/trending-problems |
get_trending_problems |
Get trending problems | trending:read |
1 call |
GET /v1/usage |
get_usage |
Get usage | any | free |
Each operation's inputs and outputs are in the OpenAPI document. Leads use the needle.lead.v1 shape, the same as the lead object in webhook events.
Searches
POST /v1/search waits up to 25 seconds. A finished search answers 200 with up to 10 leads per network (40 in total). A longer one answers 202 with status: "running" and a Location: /v1/searches/{id} header; poll it about every 30 seconds (free) until status is complete or failed. A search's status and leads stay available from GET /v1/searches/{id} for 24 hours; the leads also stay in your Needle dashboard.
Headers
X-RateLimit-Limit,X-RateLimit-Remaining: the per-key minute window. A429addsRetry-AfterandX-RateLimit-Reset.X-Needle-Quota-Monthly-Remaining: API calls left this month, after a counted call.
API keys
Create a key in Settings → API & MCP. Keys start with ndl_live_ and are shown once, so store them like a password. Revoke a key there at any time; it stops working within seconds. Keys never expire unless you pick an expiry (30, 90 or 365 days).
Each key has scopes. All are ticked by default; untick some for a narrower key, for example a read-only dashboard key.
| Scope | Allows |
|---|---|
leads:read |
Read your brands and leads |
leads:write |
Change lead status (replied, done, dismissed) |
search:run |
Run searches (uses your daily search runs) |
drafts:write |
Generate reply drafts (uses your daily drafts) |
trending:read |
Read trending problems |
Send the key as Authorization: Bearer ndl_live_… (or x-api-key: ndl_live_…). Never put it in a URL.
Plans and limits
The API and MCP server are included in the Growth and Scale plans.
| Growth | Scale | |
|---|---|---|
| API calls a month | 1,000 | 10,000 |
| Requests a minute | 60 per key, 300 per account | 60 per key, 300 per account |
| Searches and reply drafts | your daily plan limits, shared with the dashboard | same |
| API keys | up to 10 active | up to 10 active |
- Every tool call counts as one API call, only when it succeeds.
get_usageandget_searchare free. searchcounts when it starts. A search that fails or is interrupted later does not use one of your daily searches, but the call that started it stays counted.- Monthly calls reset on the 1st at 00:00 UTC. Daily searches and drafts reset at 00:00 UTC.
- One search runs at a time per account.
- Needle never posts for you. Reply drafts are text for you to review and post yourself.
Errors
Errors have a stable code you can rely on:
{ "error": { "code": "daily_limit_exceeded", "message": "No searches left today. Searches reset at 00:00 UTC." } }
| Code | Meaning |
|---|---|
invalid_request |
Bad input. details.fields lists each problem. |
invalid_token |
Missing, unknown, revoked or expired key. |
insufficient_scope |
The key lacks the scope in details.required_scope. |
account_deleted |
The account was deleted. |
api_plan_required |
The plan has no API access (Growth and Scale do). Keys are kept. |
api_access_disabled |
API access was disabled for this account. Contact support. |
not_found |
Not found, or not yours. |
rate_limited |
Too many requests. Wait Retry-After seconds. |
monthly_quota_exceeded |
Monthly API call limit reached. details.resets_at says when it resets (no Retry-After: retrying before then cannot succeed). |
daily_limit_exceeded |
No searches or reply drafts left today. Resets 00:00 UTC. |
plan_restricted |
The plan does not allow this network, timeframe or feature. |
branding_required |
Add a company name and product description in Settings before drafting. |
search_in_progress |
A search is already running (details.search_id). Poll it first. |
search_failed |
The search failed on every network. Try again. |
busy |
Capacity is busy. Retry shortly. |
service_disabled |
The API is temporarily off. Retry later. |
upstream_error |
An upstream service failed. Retry shortly. |
internal_error |
Our fault. Retry; the call is not counted. |