Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to The Companies API

Scalekit connector
Open markdown

The The Companies API connector lets your AI agent act in each user's The Companies API account. Each user connects their own The Companies API API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 34 tools.

Tools
34
What they doRead · write · destructive
26 · 7 · 126 read7 write1 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the The Companies API connection

    In AgentKit > Connections, create a The Companies API connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'thecompaniesapi'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize The Companies API:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'thecompaniesapi_get_current_user',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their The Companies API credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • thecompaniesapi_count_companiesCount the companies that match filter conditions and an optional name or domain text search, without returning them.Read-only

    Count Companies

    Count the companies that match filter conditions and an optional name or domain text search, without returning them. Returns the number of matching companies. Use this to size a segment before paying for results with thecompaniesapi_search_companies. Use thecompaniesapi_get_companies_analytics to break a segment down by an attribute.

    Inputs

    queryarray
    Filter conditions; a company must match every condition. Each condition names an attribute (for example about.industries, about.totalEmployees, locations.headquarters.country.code, technologies.active, finances.revenue or ai.search), a sign (equals, exactEquals, notEquals, greater or lower), the values to compare against, and an operator (or / and) that decides whether a company must match any or all of those values. Industry, technology and location values are the slugs and codes returned by the industry, technology and location search tools; thecompaniesapi_generate_search_query turns a plain-English description into these conditions. Example: [{"attribute": "about.industries", "operator": "or", "sign": "equals", "values": ["computer-software"]}, {"attribute": "locations.headquarters.country.code", "operator": "or", "sign": "equals", "values": ["us", "gb"]}]
    searchstring
    Optional text matched against company names or domains (see search_fields). Example: pay
    search_fieldsarray
    Which fields the search text matches against: about.name (company name), domain.domain (website domain), or both. Example: ["about.name"]
  • thecompaniesapi_enrich_job_titleClassify a job title into its department and seniority level.Read-only

    Enrich Job Title

    Classify a job title into its department and seniority level. Returns the normalized job title with its department, secondary department, seniority level and how common it is on LinkedIn. Use this to segment contacts by role, for example to tell a VP of Sales from a sales intern.

    Inputs

    namestringrequired
    The job title to classify. Example: Head of Growth Marketing
  • thecompaniesapi_get_companies_analyticsBreak down a company segment or one of your lists by one attribute, such as industry, employee range or headquarters country.Read-only

    Get Companies Analytics

    Break down a company segment or one of your lists by one attribute, such as industry, employee range or headquarters country. Returns each value of that attribute with its company count and its share of the segment, plus totals. Use this to profile a segment or list. Use thecompaniesapi_count_companies for a single total.

    Inputs

    attributestringrequired
    The company attribute to break down by. Example: about.industriesone of about.businessTypeabout.industriesabout.industryabout.totalEmployeesabout.yearFoundedanalytics.monthlyVisitorsappscodes.naicscodes.siccontactsdomain.tldfinances.revenuefinances.stockExchangelocations.headquarters.city.codelocations.headquarters.continent.codelocations.headquarters.country.codelocations.headquarters.county.codelocations.headquarters.state.codemeta.scoremeta.syncedAtsocialstechnologies.activetechnologies.categories
    list_idinteger
    Analyze the companies in this list instead of a search segment. thecompaniesapi_list_lists returns list IDs. Example: 4210
    querystring
    Optional filter conditions defining the segment, as a JSON array encoded as a string (the same condition objects thecompaniesapi_search_companies takes). Example: [{"attribute":"locations.headquarters.country.code","operator":"or","sign":"equals","values":["us","gb"]}]
    sizeinteger
    Maximum number of attribute values to return, from 1 to 10000. Example: 20
    sort_orderstring
    Sort values by company count, asc or desc. Example: descone of ascdesc
  • thecompaniesapi_get_companyEnrich one company from its website domain.Read-only

    Get Company by Domain

    Enrich one company from its website domain. Returns the company profile: name and descriptions, industries, employee range, founding year, revenue range, headquarters location, social profiles, technologies, phone and email contacts, NAICS and SIC codes, and website traffic. Use this when you know the domain. Use thecompaniesapi_get_company_by_email for a work email, thecompaniesapi_get_company_by_social for a LinkedIn or other social URL, and thecompaniesapi_search_companies_by_name when you only know the name.

    Inputs

    domainstringrequired
    Company website domain, without protocol or path. Example: stripe.com
    refreshboolean
    Set to true to re-analyze the company in real time instead of returning the stored profile. Slower, but returns the freshest data. Defaults to false.
    simplifiedboolean
    Set to true to return a reduced company profile that costs no credits (the free plan limits how many). Defaults to false, which returns the full profile.
  • thecompaniesapi_get_company_by_emailEnrich the company behind a work email address.Read-only

    Get Company by Email

    Enrich the company behind a work email address. Returns the company profile plus an analysis of the email: whether it is valid, from a free or disposable provider, and which address pattern it follows. Use this to enrich a signup or lead from their email. Use thecompaniesapi_get_company when you already have the domain.

    Inputs

    emailstringrequired
    Work email address of someone at the company. Free-mail addresses such as gmail.com return no company. Example: jane@stripe.com
    refreshboolean
    Set to true to re-analyze the company in real time instead of returning the stored profile. Slower, but returns the freshest data. Defaults to false.
    simplifiedboolean
    Set to true to return a reduced company profile that costs no credits (the free plan limits how many). Defaults to false, which returns the full profile.
  • thecompaniesapi_get_company_by_socialEnrich the company behind a social profile URL, such as its LinkedIn company page.Read-only

    Get Company by Social Profile

    Enrich the company behind a social profile URL, such as its LinkedIn company page. Returns the company profile: name, domain, industries, employee range, location, social profiles and technologies. Use this when you have a LinkedIn, X, Facebook or other social URL but not the domain. Use thecompaniesapi_get_company when you have the domain.

    Inputs

    angelliststring
    Full URL of the company's AngelList profile. Provide at least one social URL. Example: https://angel.co/company/stripe
    dribbblestring
    Full URL of the company's Dribbble profile. Provide at least one social URL. Example: https://dribbble.com/stripe
    facebookstring
    Full URL of the company's Facebook profile. Provide at least one social URL. Example: https://www.facebook.com/StripeHQ
    githubstring
    Full URL of the company's GitHub profile. Provide at least one social URL. Example: https://github.com/stripe
    instagramstring
    Full URL of the company's Instagram profile. Provide at least one social URL. Example: https://www.instagram.com/stripehq
    linkedinstring
    Full URL of the company's LinkedIn profile. Provide at least one social URL. Example: https://www.linkedin.com/company/stripe
    pintereststring
    Full URL of the company's Pinterest profile. Provide at least one social URL. Example: https://www.pinterest.com/stripe
    refreshboolean
    Set to true to re-analyze the company in real time instead of returning the stored profile. Slower, but returns the freshest data. Defaults to false.
    simplifiedboolean
    Set to true to return a reduced company profile that costs no credits (the free plan limits how many). Defaults to false, which returns the full profile.
    snapchatstring
    Full URL of the company's Snapchat profile. Provide at least one social URL. Example: https://www.snapchat.com/add/stripe
    soundcloudstring
    Full URL of the company's SoundCloud profile. Provide at least one social URL. Example: https://soundcloud.com/stripe
    tiktokstring
    Full URL of the company's TikTok profile. Provide at least one social URL. Example: https://www.tiktok.com/@stripe
    twitterstring
    Full URL of the company's X (Twitter) profile. Provide at least one social URL. Example: https://twitter.com/stripe
    wellfoundstring
    Full URL of the company's Wellfound profile. Provide at least one social URL. Example: https://wellfound.com/company/stripe
    youtubestring
    Full URL of the company's YouTube profile. Provide at least one social URL. Example: https://www.youtube.com/@stripe
  • thecompaniesapi_get_company_contextGet an AI-written briefing on a company from its domain: its market, business model, products, customers and differentiators.Read-only

    Get Company Context

    Get an AI-written briefing on a company from its domain: its market, business model, products, customers and differentiators. Returns the context object with the company summary and the sources it was built from, plus the cost. Use this for a narrative overview before outreach or research. Use thecompaniesapi_ask_company to answer one specific question, and thecompaniesapi_get_company for structured profile data.

    Inputs

    domainstringrequired
    Company website domain, without protocol or path. Example: stripe.com
  • thecompaniesapi_get_company_email_patternsFind the email address patterns a company uses, such as {first}.{last}@domain.Read-only

    Get Company Email Patterns

    Find the email address patterns a company uses, such as {first}.{last}@domain. Returns each pattern with how often it is used across the company's known addresses. Use this to guess a person's work email at a company. Use thecompaniesapi_get_company for the full company profile.

    Inputs

    domainstringrequired
    Company website domain, without protocol or path. Example: stripe.com
    emails_countboolean
    Set to true to include how many known email addresses match each pattern. Defaults to false.
    precisioninteger
    Minimum usage percentage, from 0 to 100, a pattern needs to be returned. Example: 10