ScraperCity logo

Integration Guide

ScraperCity + Pipedrive

Fill your Pipedrive sales pipeline with scraped B2B leads. Pull contacts from Apollo, Google Maps, or the Lead Database and create Pipedrive persons and deals automatically - with email, phone, title, and company data mapped to the right fields.

What You Can Build

This integration covers a broad range of B2B sales prospecting and pipeline automation workflows. Below are the most common patterns teams build after connecting ScraperCity to Pipedrive.

Daily prospect injection

Schedule a cron job or n8n workflow to query ScraperCity for new contacts matching your ICP every morning. Each contact becomes a Pipedrive person with a deal pre-loaded into your outbound pipeline stage. Your reps start each day with a full queue of fresh, qualified leads.

Local business outreach

Use the Google Maps scraper to pull businesses in a city or category - restaurants, law firms, dentists, plumbers - and push each one into Pipedrive as an organization with phone and address data. Google Maps leads cost $0.01 per place and arrive in 5-30 minutes.

Targeted B2B account lists

Query the Apollo scraper by job title, industry, company size, and location to build filtered account lists. Each Apollo lead costs $0.0039 and includes verified email. Push them into Pipedrive with company data to pre-fill the organization record.

Lead enrichment on inbound contacts

When a new Pipedrive person is created from a form or import, trigger a webhook that sends the email to ScraperCity's Email Finder or People Finder to retrieve phone, job title, and LinkedIn URL, then PATCH the Pipedrive record with the enriched data.

E-commerce and SaaS prospecting

Use the Store Leads scraper to find Shopify or WooCommerce stores with contact info ($0.0039/lead, instant). Push each store as a Pipedrive organization linked to a deal. Useful for agencies, app developers, or suppliers targeting e-commerce merchants.

Technology-based account targeting

Use the BuiltWith scraper to find all companies using a specific technology, framework, or platform ($4.99/search). Each matching domain becomes a Pipedrive organization. Layer in Email Finder ($0.05/contact) to add a contact person before creating the deal.

Field Mapping Reference

ScraperCity returns JSON. Here is how each field from an Apollo or Lead Database result maps to a Pipedrive API field when creating a person and an organization.

ScraperCity FieldPipedrive EntityPipedrive Field / Notes
firstName + lastNamePersonConcatenate as "name" string
emailPersonArray: [{"value": "...", "primary": true}]
phonePersonArray: [{"value": "...", "primary": true}]
titlePersonjob_title field (requires contact sync enabled)
companyNameOrganizationPOST /organizations with "name" field first, use returned id as org_id on person
companyDomainOrganizationStore in custom field or as part of organization name
industryOrganizationCustom organization field (40-char hash key)
linkedinUrlPersonCustom person field (40-char hash key)
city / state / countryOrganizationaddress field on organization
employeeCountOrganizationCustom organization field

Pipedrive custom fields are referenced by randomly generated 40-character hash keys. Find your keys by calling GET /v1/personFields or GET /v1/organizationFields with your API token.

Setup

The full flow is: get your credentials, pull leads from ScraperCity, create a Pipedrive organization for the company, create a person linked to that org, then optionally create a deal. Each step below includes a working curl example.

1

Get your Pipedrive API token

In Pipedrive, go to Settings, then Personal Preferences, then API. Copy your personal API token. All Pipedrive API requests use this token as a query parameter appended to the endpoint URL. The Pipedrive API is stateless - every request is validated against this token independently.

Store the token as an environment variable in your script or automation tool. Never hardcode it in version-controlled files. In n8n or Zapier, store it as a credential so it is encrypted at rest.

2

Get your ScraperCity API key

Your ScraperCity API key is available at app.scrapercity.com/dashboard/api-docs. All requests use Bearer token authentication in the Authorization header. Plans start at $49/mo and all include access to all 25 scrapers.

export SCRAPERCITY_KEY="your_scrapercity_key_here"
export PIPEDRIVE_TOKEN="your_pipedrive_api_token_here"
3

Pull leads from ScraperCity

Query any ScraperCity endpoint to get your lead data. The example below uses the Lead Database (requires the $649/mo plan) for instant results. For Apollo scrapes, replace the endpoint and expect 11-48 hours for delivery. Google Maps scrapes complete in 5-30 minutes.

# Lead Database - instant, 3M+ B2B contacts, $649/mo plan required
curl -X GET "https://app.scrapercity.com/api/v1/database/leads?title=Sales%20Director&industry=financial%20services&hasEmail=true&limit=50" \
  -H "Authorization: Bearer $SCRAPERCITY_KEY"

# Apollo scrape - $0.0039/lead, 11-48+ hours delivery
curl -X POST "https://app.scrapercity.com/api/v1/apollo/scrape" \
  -H "Authorization: Bearer $SCRAPERCITY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "VP of Engineering", "industry": "SaaS", "location": "United States", "limit": 100}'

# Google Maps - $0.01/place, 5-30 min delivery
curl -X POST "https://app.scrapercity.com/api/v1/maps/scrape" \
  -H "Authorization: Bearer $SCRAPERCITY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "digital marketing agency", "location": "Austin TX", "limit": 50}'

For async scrapers (Apollo, Google Maps), poll the job status using GET /api/v1/status/{runId} or set up a webhook at app.scrapercity.com/dashboard/webhooks to receive a notification when results are ready. Once ready, download with GET /api/v1/download/{runId}.

4

Create an organization in Pipedrive

Before creating a person, create the company as a Pipedrive organization. Save the returned id - you will use it as org_id on the person and deal. Persons can be associated with organizations so that each organization can contain one or more persons.

curl -X POST "https://api.pipedrive.com/v1/organizations?api_token=$PIPEDRIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "address": "123 Main St, Austin, TX 78701",
    "visible_to": 3
  }'

# Response includes: { "data": { "id": 99, "name": "Acme Corp", ... } }
# Save data.id as ORG_ID for next steps
5

Create a person in Pipedrive

POST each lead as a Pipedrive person. Pass the org_id from the previous step to link the contact to their company. Email and phone are arrays - set primary: true on the first entry.

curl -X POST "https://api.pipedrive.com/v1/persons?api_token=$PIPEDRIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Smith",
    "email": [{"value": "[email protected]", "primary": true}],
    "phone": [{"value": "+15551234567", "primary": true}],
    "org_id": 99,
    "visible_to": 3
  }'

# Response includes: { "data": { "id": 12345, "name": "Jane Smith", ... } }
# Save data.id as PERSON_ID for the deal step
6

Create a deal (optional)

Link each person to a deal in your target pipeline. The title field is the only required parameter. Set pipeline_id and stage_id to control where the deal appears. Find your pipeline and stage IDs by calling GET /v1/pipelines and GET /v1/stages with your token.

curl -X POST "https://api.pipedrive.com/v1/deals?api_token=$PIPEDRIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Jane Smith - Acme Corp",
    "person_id": 12345,
    "org_id": 99,
    "pipeline_id": 1,
    "stage_id": 1,
    "status": "open",
    "expected_close_date": "2025-03-31"
  }'
7

Automate with n8n or Zapier (no-code option)

If you prefer not to write code, you can wire this entire flow together without a single line of scripting. Both n8n and Zapier have native Pipedrive nodes that cover person and deal creation.

Using n8n:

  1. Add a Schedule Trigger node (e.g., every morning at 7am)
  2. Add an HTTP Request node - GET the ScraperCity Lead Database or poll a completed Apollo run
  3. Add a Split In Batches node to process one lead at a time
  4. Add a Pipedrive node set to "Create Organization" - map companyName to name
  5. Add a second Pipedrive node set to "Create Person" - map name, email, phone, and org_id from previous step
  6. Add a third Pipedrive node set to "Create Deal" - map person_id and set your pipeline and stage

Using Zapier:

  1. Trigger: Schedule by Zapier (daily) or Webhooks by Zapier (on ScraperCity completion webhook)
  2. Action 1: Webhooks by Zapier - GET ScraperCity results
  3. Action 2: Pipedrive - Create Organization
  4. Action 3: Pipedrive - Create Person (use org id from step 2)
  5. Action 4: Pipedrive - Create Deal (use person id from step 3)

Complete Node.js Script

This script pulls from the ScraperCity Lead Database and creates Pipedrive organizations, persons, and deals in sequence. It includes a small delay between Pipedrive API calls to respect burst rate limits. Copy it, set your environment variables, and run with node import-leads.js.

// import-leads.js
// npm install node-fetch  (or use built-in fetch in Node 18+)

const SCRAPERCITY_KEY = process.env.SCRAPERCITY_KEY;
const PIPEDRIVE_TOKEN = process.env.PIPEDRIVE_TOKEN;
const PIPEDRIVE_BASE  = 'https://api.pipedrive.com/v1';
const PIPELINE_ID     = 1; // update to your pipeline id
const STAGE_ID        = 1; // update to your stage id

const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

async function pdPost(path, body) {
  const res = await fetch(`${PIPEDRIVE_BASE}${path}?api_token=${PIPEDRIVE_TOKEN}`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(body),
  });
  const json = await res.json();
  if (!json.success) throw new Error(`Pipedrive error: ${JSON.stringify(json)}`);
  return json.data;
}

async function importLeads() {
  // 1. Pull leads from ScraperCity Lead Database
  const scRes = await fetch(
    'https://app.scrapercity.com/api/v1/database/leads?title=Sales%20Director&industry=SaaS&hasEmail=true&limit=25',
    { headers: { Authorization: `Bearer ${SCRAPERCITY_KEY}` } }
  );
  const { data: leads } = await scRes.json();
  console.log(`Fetched ${leads.length} leads from ScraperCity`);

  for (const lead of leads) {
    try {
      // 2. Create organization
      const org = await pdPost('/organizations', {
        name: lead.companyName,
        visible_to: 3,
      });
      await sleep(150); // respect Pipedrive burst limits

      // 3. Create person linked to org
      const person = await pdPost('/persons', {
        name: `${lead.firstName} ${lead.lastName}`,
        email: [{ value: lead.email, primary: true }],
        phone: lead.phone ? [{ value: lead.phone, primary: true }] : [],
        org_id: org.id,
        visible_to: 3,
      });
      await sleep(150);

      // 4. Create deal
      const deal = await pdPost('/deals', {
        title: `${lead.firstName} ${lead.lastName} - ${lead.companyName}`,
        person_id: person.id,
        org_id: org.id,
        pipeline_id: PIPELINE_ID,
        stage_id: STAGE_ID,
        status: 'open',
      });
      await sleep(150);

      console.log(`Created deal #${deal.id}: ${deal.title}`);
    } catch (err) {
      console.error(`Failed for ${lead.email}: ${err.message}`);
    }
  }
}

importLeads().catch(console.error);

Choosing Your Automation Method

There are four main ways to connect ScraperCity to Pipedrive. The right choice depends on how often you need to import leads, whether you have a developer, and how complex your field mapping is.

Direct script (Node.js / Python)

Best when

You need full control, custom deduplication logic, or high-volume imports (1,000+ leads at a time).

Pros

Maximum flexibility. Easy to add deduplication, error handling, and custom field mapping.

Cons

Requires coding. You manage hosting and scheduling (cron, AWS Lambda, etc.).

n8n

Best when

You want a visual workflow with scheduling and branching logic but don't want to manage raw HTTP calls.

Pros

Native Pipedrive node. Self-hostable. Free tier available. Good for moderate daily imports.

Cons

Slightly steeper learning curve than Zapier. Hosting required if self-hosting.

Zapier

Best when

You want the quickest setup and already use Zapier for other automations.

Pros

No code required. Native Pipedrive actions. Good for low-to-moderate volume.

Cons

Task limits on lower plans can add up quickly for high-volume lead imports.

Pipedream

Best when

You want code-level control with managed hosting and scheduling without running your own server.

Pros

Supports Node.js steps inline. Built-in Pipedrive and HTTP actions. Generous free tier.

Cons

Less visual than Zapier or n8n for non-developers.

Rate Limits and Performance Tips

Understanding Pipedrive's rate limiting model will save you from hitting walls during bulk imports. Pipedrive uses a token-based rate limiting system where each API request consumes tokens from a daily budget shared across your company account.

Understand the daily token budget

Each Pipedrive company account has a daily API token budget that resets every 24 hours. The budget is calculated based on your subscription plan and the number of seats. If the budget is exhausted, all further requests return a 429 Too Many Requests response until the next reset. You can monitor usage in the API Usage Dashboard inside Pipedrive's Company Settings.

Burst limits operate on a 2-second rolling window

In addition to the daily budget, Pipedrive enforces burst limits per token on a rolling 2-second window. If you fire requests too rapidly, you will hit the burst limit before touching the daily budget. Add a 100-200ms sleep between each Pipedrive API call when doing bulk imports. The Node.js script above uses this pattern.

Use API v2 where possible to reduce token cost

Pipedrive's API v2 endpoints are more efficient and consume fewer tokens per request compared to their v1 equivalents. For high-volume integrations, prefer v2 endpoints (e.g., POST /api/v2/persons, POST /api/v2/deals) to stretch your daily budget further.

Watch the x-ratelimit-remaining header

Every Pipedrive API response includes an x-ratelimit-remaining header showing how many tokens remain in your current window. Check this value in your script and back off or slow down if it drops close to zero. If you continue hammering the API after receiving 429 responses, Cloudflare may issue a 403 block.

Deduplicate before importing

Before creating a new person or organization, search Pipedrive first using GET /v1/persons/search or GET /v1/organizations/search with the contact's email or company name. This prevents duplicate records and avoids wasting API token budget on records that already exist. The search endpoint has its own limit of 10 requests per 2 seconds.

ScraperCity Lead Database pagination

The Lead Database endpoint returns up to 100 leads per page. Use the offset parameter to paginate. The daily limit is 100,000 leads. Identical requests within 30 seconds are blocked by ScraperCity's duplicate protection, so always vary your query parameters or offset when paginating.

Troubleshooting

Common errors and how to fix them when integrating ScraperCity output with the Pipedrive API.

401 Unauthorized from Pipedrive

Your API token is missing, expired, or incorrect. Go to Pipedrive Settings - Personal Preferences - API and regenerate your token. Make sure you are passing it as the api_token query parameter (not in the Authorization header, which is how ScraperCity auth works - the two APIs use different auth methods).

429 Too Many Requests from Pipedrive

You have hit either the burst limit (rolling 2-second window) or your daily token budget. Add a sleep() delay between requests. Check the x-ratelimit-remaining header in the response. If you consistently exhaust your daily budget, consider upgrading your Pipedrive plan, adding seats, or switching to v2 endpoints which consume fewer tokens.

Pipedrive returns {"success": false, "error": "..."} with a 200 status

Pipedrive sometimes returns HTTP 200 but includes success: false in the body. Always check the success field, not just the HTTP status code. Common causes: missing required fields (deal title is required), invalid org_id or person_id references, or malformed email/phone arrays.

Person created without job_title even though I passed it

The job_title field on Pipedrive persons is only returned and accepted if contact sync is enabled for your company. If it is not visible, store the title in a custom person field instead. Find your custom field keys by calling GET /v1/personFields.

ScraperCity returns 409 Conflict / duplicate request blocked

ScraperCity blocks identical API requests made within 30 seconds to prevent accidental duplicate scrapes. If you are paginating or making multiple requests to the same endpoint, vary the offset, limit, or query parameters. Wait at least 30 seconds between identical requests.

Apollo results not arriving - still pending after several hours

Apollo scrapes take 11-48+ hours to complete. This is normal. Poll the job status with GET /api/v1/status/{runId} or configure a ScraperCity webhook at app.scrapercity.com/dashboard/webhooks to receive a POST notification when the job is complete. Do not re-submit the same Apollo request - that creates a new job and resets the timer.

Pipedrive custom fields not showing up on the created record

Custom fields on Pipedrive persons and organizations are referenced by randomly generated 40-character hash keys, not human-readable names. Fetch your field keys by calling GET /v1/personFields or GET /v1/organizationFields. Pass custom field values as top-level keys in the request body using those hash strings.

FAQ

Get API access to ScraperCity: