Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to HarvestAPI

Scalekit connector
Open markdown

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

Tools
25
What they doRead · write · destructive
25 · 0 · 025 read0 write0 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 HarvestAPI connection

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

    Console steps with screenshots

    Register your HarvestAPI key with Scalekit so it can authenticate LinkedIn data requests on your behalf. You’ll need an API key from your HarvestAPI dashboard.

    1. Generate an API key

      • Sign in to your HarvestAPI dashboard.

      • Click Create API key, give it a descriptive name (e.g., My Agent), and click Create.

      • Copy the generated API key. It is shown only once — store it securely before navigating away.

    2. Create a connection in Scalekit

      In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find HarvestAPI and click Create.

    3. Add a connected account

      Open the connection you just created and click the Connected Accounts tab → Add account. Fill in the required fields:

      • Your User’s ID — a unique identifier for the user in your system
      • API Key — the key you copied in step 1

      Click Save.

  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 = 'harvestapi'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize HarvestAPI:', 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: 'harvestapi_get_ad',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their HarvestAPI credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • harvestapi_bulk_scrape_company_employeesBulk-list the employees of one or more LinkedIn companies via HarvestAPI's dedicated Apify actor, same pattern as the existing Bulk Scrape LinkedIn Profiles tool.Read-only

    Bulk Scrape LinkedIn Company Employees

    Bulk-list the employees of one or more LinkedIn companies via HarvestAPI's dedicated Apify actor, same pattern as the existing Bulk Scrape LinkedIn Profiles tool. Requires an Apify API token from https://console.apify.com/settings/integrations.

    Inputs

    apify_tokenstringrequired
    Your Apify API token from https://console.apify.com/settings/integrations.
    companiesarrayrequired
    JSON array of LinkedIn company URLs to list employees for.
    job_titlesarray
    JSON array of job titles to filter employees by.
    locationsarray
    JSON array of LinkedIn locations to filter employees by.
    max_itemsinteger
    Maximum number of employee profiles to scrape across all companies. 0 or omitted scrapes all available (up to 2500 per company).
  • harvestapi_bulk_scrape_profilesBatch scrape multiple LinkedIn profiles in a single request using the HarvestAPI Apify scraper.Read-only

    Bulk Scrape LinkedIn Profiles

    Batch scrape multiple LinkedIn profiles in a single request using the HarvestAPI Apify scraper. Accepts a JSON array of LinkedIn profile URLs. Pricing: $4 per 1,000 profiles, $10 per 1,000 with email. Requires an Apify API token from https://console.apify.com/settings/integrations.

    Inputs

    apify_tokenstringrequired
    Your Apify API token from https://console.apify.com/settings/integrations.
    profile_urlsarrayrequired
    JSON array of LinkedIn profile URLs to scrape in bulk.
    find_emailboolean
    When true, attempts email discovery for all profiles. Costs $10 per 1,000 instead of $4.
  • harvestapi_get_adRetrieve details of a specific LinkedIn ad by ad ID or URL.Read-only

    Get LinkedIn Ad

    Retrieve details of a specific LinkedIn ad by ad ID or URL.

    Inputs

    ad_idstring
    The unique identifier of the LinkedIn Ad.
    urlstring
    The URL of the LinkedIn Ad.
  • harvestapi_get_comment_reactionsRetrieve reactions on a specific LinkedIn comment by its URL.Read-only

    Get Comment Reactions

    Retrieve reactions on a specific LinkedIn comment by its URL.

    Inputs

    urlstringrequired
    URL of the LinkedIn comment.
    pageinteger
    Page number for pagination (default: 1).
  • harvestapi_get_companyRetrieve the Harvest company (account) information for the authenticated user, including company name, base URI, plan type, clock format, currency, and weekly capacity settings.Read-only

    Get Company

    Retrieve the Harvest company (account) information for the authenticated user, including company name, base URI, plan type, clock format, currency, and weekly capacity settings.

    Inputs

    account_idstringrequired
    Your Harvest account ID, returned during OAuth as the Harvest-Account-Id header.
  • harvestapi_get_company_postsRetrieve posts published by a LinkedIn company page.Read-only

    Get Company Posts

    Retrieve posts published by a LinkedIn company page. Returns paginated post content, engagement metrics, and timestamps.

    Inputs

    companystring
    LinkedIn company URL. Provide this or company_universal_name.
    company_universal_namestring
    LinkedIn company universal name (slug from company URL).
    pageinteger
    Page number for pagination (default: 1).
  • harvestapi_get_groupRetrieve details of a LinkedIn group including name, description, member count, and activity by URL or group ID.Read-only

    Get LinkedIn Group

    Retrieve details of a LinkedIn group including name, description, member count, and activity by URL or group ID.

    Inputs

    group_idstring
    LinkedIn group ID. Provide this or url.
    urlstring
    LinkedIn group URL. Provide this or group_id.
  • harvestapi_get_postRetrieve a specific LinkedIn post by its URL.Read-only

    Get LinkedIn Post

    Retrieve a specific LinkedIn post by its URL. Returns full post content, author details, and engagement metrics.

    Inputs

    urlstringrequired
    The LinkedIn post URL.

Workflows

Proxy API call
// Scrape a LinkedIn profile by URL
const profile = await actions.request({
connectionName: 'harvestapi',
identifier: 'user_123',
path: '/linkedin/profile',
method: 'GET',
queryParams: { url: 'https://www.linkedin.com/in/satyanadella' },
});
console.log(profile.data);
// Search LinkedIn for people by title and location
const people = await actions.request({
connectionName: 'harvestapi',
identifier: 'user_123',
path: '/linkedin/lead-search',
method: 'GET',
queryParams: { title: 'VP of Engineering', location: 'San Francisco, CA' },
});
console.log(people.data);
// Scrape a LinkedIn company page
const company = await actions.request({
connectionName: 'harvestapi',
identifier: 'user_123',
path: '/linkedin/company',
method: 'GET',
queryParams: { url: 'https://www.linkedin.com/company/openai' },
});
console.log(company.data);
// Search LinkedIn job listings by keyword and location
const jobs = await actions.request({
connectionName: 'harvestapi',
identifier: 'user_123',
path: '/linkedin/job-search',
method: 'GET',
queryParams: { keywords: 'machine learning engineer', location: 'New York, NY' },
});
console.log(jobs.data);
// Scrape a single job listing by URL
const job = await actions.request({
connectionName: 'harvestapi',
identifier: 'user_123',
path: '/linkedin/job',
method: 'GET',
queryParams: { url: 'https://www.linkedin.com/jobs/view/1234567890' },
});
console.log(job.data);
// Bulk scrape multiple LinkedIn profiles in one request
const bulk = await actions.request({
connectionName: 'harvestapi',
identifier: 'user_123',
path: '/v2/acts/harvestapi~linkedin-profile-scraper/run-sync-get-dataset-items',
method: 'POST',
body: {
urls: [
'https://www.linkedin.com/in/satyanadella',
'https://www.linkedin.com/in/jeffweiner08',
'https://www.linkedin.com/in/reidhoffman',
],
},
});
console.log(bulk.data);
Execute a tool
const result = await actions.executeTool({
connector: 'harvestapi',
identifier: 'user_123',
toolName: 'harvestapi_bulk_scrape_profiles',
toolInput: {},
});
console.log(result);