Public SDKs for Leadpipe. This repository starts with one unified TypeScript client and is structured so other SDK languages can be added later without a rewrite.
Leadpipe exposes intent data APIs for topic discovery, audience building, materialized audience results, runs, stats, and exports. The current public package is @leadpipe/client and it ships a single Leadpipe class for both anonymous discovery and authenticated audience workflows.
packages/
typescript/ # @leadpipe/client
examples/ # runnable usage samples
spec/ # checked-in OpenAPI snapshot for the intent API
npm install @leadpipe/clientor
pnpm add @leadpipe/clientThe same client supports both modes, but they are not interchangeable:
import{Leadpipe}from"@leadpipe/client";constpublicClient=newLeadpipe();constapiKeyClient=newLeadpipe({apiKey: process.env.LEADPIPE_API_KEY});constbearerClient=newLeadpipe({bearerToken: process.env.LEADPIPE_BEARER_TOKEN});Use new Leadpipe() only for public discovery routes:
client.intent.topics.list()client.intent.topics.facets()client.intent.topics.search()client.intent.topics.trend()client.intent.topics.compare()client.intent.topics.movers()client.intent.topics.analyze()
Use apiKey or bearerToken for anything audience-related:
client.intent.audiences.preview()client.intent.audiences.query()client.intent.audiences.create()client.intent.audiences.update()client.intent.audiences.status()client.intent.audiences.results()client.intent.audiences.runs()client.intent.audiences.stats()client.intent.audiences.export()client.intent.audiences.waitUntilReady()
Most developers should use an API key. Anonymous usage is mainly for topic discovery and site analysis.
import{Leadpipe}from"@leadpipe/client";constclient=newLeadpipe({apiKey: process.env.LEADPIPE_API_KEY});consttopics=awaitclient.intent.topics.list({type: "b2b",q: "data platform"});console.log(topics.data.slice(0,3));constfacets=awaitclient.intent.topics.facets();constsearch=awaitclient.intent.topics.search({q: "data platform",limit: 10});consttrend=awaitclient.intent.topics.trend(1234);constcompare=awaitclient.intent.topics.compare([1234,5678]);constmovers=awaitclient.intent.topics.movers({direction: "up",limit: 10});constanalysis=awaitclient.intent.topics.analyze({url: "https://snowflake.com"});consttopicSearch=awaitclient.intent.topics.search({q: "crm",limit: 2});consttopicIds=topicSearch.data.slice(0,2).map((topic)=>topic.topicId);constpreview=awaitclient.intent.audiences.preview({
topicIds,minScore: 70,filters: {companyIndustry: ["software development"],hasBusinessEmail: true,},});consttopicSearch=awaitclient.intent.topics.search({q: "crm",limit: 2});consttopicIds=topicSearch.data.slice(0,2).map((topic)=>topic.topicId);constcreated=awaitclient.intent.audiences.create({name: "Sales-led SaaS buyers",config: {
topicIds,minScore: 70,filters: {companyIndustry: ["software development"],},},});constupdated=awaitclient.intent.audiences.update(created.data.id,{status: "active",});constready=awaitclient.intent.audiences.waitUntilReady(updated.data.id,{timeoutMs: 600_000,intervalMs: 5_000,});conststatus=awaitclient.intent.audiences.status(updated.data.id);constresults=awaitclient.intent.audiences.results(updated.data.id,{limit: 25,});constexportJob=awaitclient.intent.audiences.export(updated.data.id);console.log(exportJob.data.downloadUrl);- The repo currently ships one official public SDK:
@leadpipe/client client.intent.topics.*covers public discovery routesclient.intent.audiences.*covers authenticated audience building and results- identification / resolution modules are not part of the current SDK yet