Skip to Content
APIPost leads

Post leads

One endpoint serves both lead surfaces of a project. Unlike the configuration lists, leads are cursor-paginated: every response is an envelope of results, next and previous. This endpoint reads post leads only. For ordinary and competitor comments, use Comment leads.

Use the project’s id as {projectId}.

List post leads

GET/api/v1/projects/{projectId}/leads/

Query parameters

NameTypeRequiredNotes
cursorstringno1–1024 chars — opaque pagination cursor from a previous page; an invalid cursor answers the non-disclosing 404
matched_keywordstring | string[]norepeatable OR-set (?matched_keyword=a&matched_keyword=b), lead surface only
min_scorestringnominimum relevance score: 50, 60, 70 or 80
page_sizestringnodefaults to 10, capped at 100; malformed values fall back to the default
prioritystringnoat most 32 chars — plain string (≤32 chars) compared against the lead’s priority — not validated against a fixed enum
source_typestringnolead (default) or competitor — selects the surface
trigger_competitorstringnoat most 64 chars — competitor surface only; one owned competitor id
workflowstringnonew (default: the 24-hour untouched window), saved, replied, or all

Responses

200OKapplication/json

FieldTypeRequiredNotes
nextstring | nullyes
previousstring | nullyes
resultsobject[]yes
idstringyes
project_idstringyes
relevance_scorestring | nullyes
prioritystringyes
is_savedbooleanyes
is_repliedbooleanyes
match_reasonstringyes
source_typestringyes
trigger_keyword_idstring | nullyes
matched_keywordstring | nullyes
created_atstringyes
updated_atstringyes
reddit_itemobjectyes
subreddit_name_prefixedstringyes
post_fullnamestringyes
titlestringyes
bodystringyes
ai_summarystringyes
authorstringyes
permalinkstringyes
external_urlstringyes
created_utcstringyes
{ "next": null, "previous": null, "results": [ { "id": "7f8e9d0c-4444-4b5a-8e7f-6a5b4c3d2e1f", "project_id": "b1a2c3d4-0000-4a5b-8c6d-7e8f9a0b1c2d", "relevance_score": "80", "priority": "high", "is_saved": false, "is_replied": false, "match_reason": "Matched keyword \"notion template\" (exact).", "source_type": "lead", "trigger_keyword_id": "3c2b1a0d-1111-4e5f-8a9b-0c1d2e3f4a5b", "matched_keyword": "notion template", "created_at": "2026-11-18T08:15:00.000000+00:00", "updated_at": "2026-11-18T08:15:00.000000+00:00", "reddit_item": { "subreddit_name_prefixed": "r/Notion", "post_fullname": "t3_1example0", "title": "Looking for a Notion template for tracking freelance clients", "body": "I keep losing track of invoices and deadlines. Anyone using a template that works?", "ai_summary": "Freelancer wants a client-tracking Notion template; strong buying intent.", "author": "freelance_discussion", "permalink": "https://www.reddit.com/r/Notion/comments/1example0/", "external_url": "", "created_utc": "2026-11-18T07:58:00+00:00" } } ] }

All errors answer the standard problem body — this operation can also return 400, 401, 404, 429, 5xx, documented in Errors & retries.

Surfaces and filters

Ordinary (project) leads — the default surface, matched by the project’s own keywords:

export INTENTLOOM_API_TOKEN='il_live_REPLACE_WITH_YOUR_TOKEN' export INTENTLOOM_PROJECT='b1a2c3d4-0000-4a5b-8c6d-7e8f9a0b1c2d' # Defaults: workflow=new, page_size=10 curl -fsS "https://api.intentloom.com/api/v1/projects/$INTENTLOOM_PROJECT/leads/" \ -H "Authorization: Token $INTENTLOOM_API_TOKEN"

Competitor leads — select the competitor surface with source_type=competitor, and narrow to one competitor with its id as trigger_competitor:

curl -fsS "https://api.intentloom.com/api/v1/projects/$INTENTLOOM_PROJECT/leads/?source_type=competitor&trigger_competitor=COMPETITOR_ID" \ -H "Authorization: Token $INTENTLOOM_API_TOKEN"

The remaining filters: min_score (minimum relevance score), matched_keyword (a repeatable OR-set, lead surface only) and priority (a plain string compared against the lead’s priority). Each lead row carries the match metadata (source_type, matched_keyword, trigger_keyword_id, match_reason, priority, relevance_score, is_saved, is_replied) and the underlying reddit_item (subreddit, title, body, AI summary, author, permalink) — every field is documented in the schema table above.

Default behavior

workflow=new (the default) means a recent 24-hour untouched window — not all historic leads. Use workflow=all for everything, including leads you already acted on:

curl -fsS "https://api.intentloom.com/api/v1/projects/$INTENTLOOM_PROJECT/leads/?workflow=all&page_size=25" \ -H "Authorization: Token $INTENTLOOM_API_TOKEN"

page_size defaults to 10, is capped at 100, and malformed values fall back to the default. Ordering is newest-first by the server’s cursor scheme; you cannot reorder pages — sort client-side if you need a different view.

Cursor pagination

Follow next as-is with the same Authorization: Token header, and only on the API origin you configured:

const API = 'https://api.intentloom.com' const headers = { Authorization: `Token ${process.env.INTENTLOOM_API_TOKEN}` } let url = `${API}/api/v1/projects/${process.env.INTENTLOOM_PROJECT}/leads/?workflow=all&page_size=25` while (url) { const res = await fetch(url, { headers }) if (!res.ok) throw new Error(`${res.status} ${await res.text()}`) const page = await res.json() for (const lead of page.results) { console.log(lead.relevance_score, lead.reddit_item?.title) } // Continue only while next stays on the API origin you configured — // never send the token to a different origin. url = page.next && new URL(page.next).origin === new URL(API).origin ? page.next : null }
  • next already carries your filters and the cursor — request it as-is, with the same Authorization: Token header.
  • next is null on the last page — that is normal termination, not an error.
Last updated on