Loading...
Please wait while we prepare your content
We use cookies to enhance your experience, analyze site usage, and assist in our marketing efforts. You can manage your preferences or learn more in our Cookie Policy.
List, search companies and fetch contacts within companies.
list(options)List companies with optional filters: industry, size.
get(id)Get a single company by ID.
search(query)Search companies by name.
listContacts(id)List all contacts belonging to a company.
listAll()Async generator for automatic pagination over all companies.
// List
const { data } = await lystica.companies.list({
industry: "Technology",
size: "51-200",
});
// Get by ID
const company = await lystica.companies.get("cmp_abc123");
// Search
const { data: results } = await lystica.companies.search("acme");
// List contacts in a company
const { data: contacts } = await lystica.companies.listContacts("cmp_abc123");
// Iterate all
for await (const company of lystica.companies.listAll()) {
console.log(company.name);
}