scrapercity 1.0.34 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_DOCS.txt +9 -0
- package/README.md +4 -0
- package/SKILL.md +2 -1
- package/bin/cli.mjs +3 -0
- package/lib/catalog.generated.mjs +1 -1
- package/lib/tools.mjs +1 -1
- package/lib/utilityTools.mjs +5 -4
- package/package.json +1 -1
package/AGENT_DOCS.txt
CHANGED
|
@@ -322,6 +322,12 @@ WORKFLOW EXAMPLES
|
|
|
322
322
|
4. LEAD DATABASE (instant):
|
|
323
323
|
GET /api/v1/database/leads?title=CTO&industry=computer+software&hasEmail=true&page=1
|
|
324
324
|
Loop pages until page > totalPages
|
|
325
|
+
Every lead carries email_check_status (valid, valid_catch_all, invalid, unknown, not_checked) and email_checked_on:
|
|
326
|
+
send ONLY to valid emails checked in the last 30 days; put every other email through email-validator first.
|
|
327
|
+
Before sending: add replaceLeftContacts=true, wait for replacement.run_id (GET /api/v1/scrape/status/{run_id}),
|
|
328
|
+
then send the CSV from GET /api/downloads/{run_id}: every email checked, people who have left swapped for the person
|
|
329
|
+
in that role now ($0.02 per contact replaced, free on the $649 plan). At minimum: POST the emails to email-validator
|
|
330
|
+
and send only to the valid ones.
|
|
325
331
|
|
|
326
332
|
5. LOCAL BUSINESS PIPELINE:
|
|
327
333
|
Yelp/Angi/Maps → download CSV → POST email-finder with names+domains → POST mobile-finder
|
|
@@ -332,3 +338,6 @@ WORKFLOW EXAMPLES
|
|
|
332
338
|
7. LOCAL BUSINESS DATABASE (instant):
|
|
333
339
|
GET /api/v1/database/local-businesses?keyword=dentist&location=Austin%2C+TX&hasEmail=true&page=1
|
|
334
340
|
Loop pages until page > totalPages
|
|
341
|
+
Every business carries email_check_status / contact_email_check_status and their checked_on dates:
|
|
342
|
+
send ONLY to valid emails checked in the last 30 days; put every other email through email-validator first.
|
|
343
|
+
Before sending: POST the emails to email-validator and send only to the valid ones.
|
package/README.md
CHANGED
|
@@ -143,6 +143,10 @@ Both SDKs carry the same tool list as the MCP server, regenerated from the live
|
|
|
143
143
|
| **Lead Database** | 3M+ B2B contacts, instant query ($149/mo plan and up) | Included |
|
|
144
144
|
| **Local Business Database** | Local businesses with phones, emails and ratings, instant query ($149/mo plan and up) | Included |
|
|
145
145
|
|
|
146
|
+
## Before You Send
|
|
147
|
+
|
|
148
|
+
Leads from any database: check them before outreach. Every record carries `email_check_status` (our own email checker: valid, valid_catch_all, invalid, unknown, not_checked): send ONLY to `valid` emails checked in the last 30 days (`email_checked_on`), and put every other email through `validate_emails` first. For people (Lead Database), pass `replaceLeftContacts: true` to `query_lead_database`; the response adds `replacement.run_id`, a run that checks every email and swaps each person who has left for the person in that role now. Wait for it with `check_run_status`, then send the CSV from `download_results` ($0.02 per contact replaced, free on the $649 plan). At minimum, run the emails through `validate_emails` and send only to the valid ones.
|
|
149
|
+
|
|
146
150
|
## How It Works
|
|
147
151
|
|
|
148
152
|
1. **Start a scrape** → get a `runId`
|
package/SKILL.md
CHANGED
|
@@ -80,7 +80,7 @@ Apollo scrapes usually take **15-30 minutes** to deliver; some lists take longer
|
|
|
80
80
|
| POST | `/api/v1/scrape/cancel/{runId}` | Cancel running job |
|
|
81
81
|
| GET | `/api/v1/scrape/logs/{runId}` | Run logs |
|
|
82
82
|
| GET | `/api/v1/apollo-status` | Apollo service health: `{status: "url-based" or "legacy", message, timestamp}` |
|
|
83
|
-
| GET | `/api/v1/database/leads?title=CTO&country=United%20States&hasEmail=true&limit=100` | Lead DB ($149/mo plan and up, 100k new leads/day). Optional: `excludeDelivered=true` (only leads you don't have yet), `after=0` then `pagination.next_after` (cursor paging). Company filters: `keywords`, `revenueMin`/`revenueMax`, `companyCountry`/`companyState`/`companyCity`. Exclusions: `notTitle`, `notKeywords`, `notIndustry`. Website technologies: `technologies` (any of), `technologiesAll` (all of), `notTechnologies` (none of). `url=<people-search URL>` searches with that URL's filters. POST with a JSON body takes the same parameters (use it for a long `url`) |
|
|
83
|
+
| GET | `/api/v1/database/leads?title=CTO&country=United%20States&hasEmail=true&limit=100` | Lead DB ($149/mo plan and up, 100k new leads/day). Optional: `excludeDelivered=true` (only leads you don't have yet), `after=0` then `pagination.next_after` (cursor paging), `replaceLeftContacts=true` (adds `replacement.run_id`: a run that swaps contacts who have left for the person in that role now; $0.02 per contact replaced, free on the $649 plan). Company filters: `keywords`, `revenueMin`/`revenueMax`, `companyCountry`/`companyState`/`companyCity`. Exclusions: `notTitle`, `notKeywords`, `notIndustry`. Website technologies: `technologies` (any of), `technologiesAll` (all of), `notTechnologies` (none of). `url=<people-search URL>` searches with that URL's filters. POST with a JSON body takes the same parameters (use it for a long `url`) |
|
|
84
84
|
| GET | `/api/v1/database/local-businesses?category=Dentist&country=US&hasContact=true&limit=100` | Local biz DB ($149/mo plan and up, 100k new businesses/day). Search like Google Maps: `keyword` (repeat; names and categories, any keyword) and `location` (repeat; cities, states, countries, postal codes), with `searched_as` in the response and `lead_database` when nothing is found but the Lead Database has 100+ people. Filters: `category`, `country`, `state`, `city`, `postalCode`, `query`, `minRating`/`maxRating`, `minReviews`/`maxReviews`, `hasEmail`, `hasPhone`, `hasWebsite`, `hasContact` (only businesses with a named contact person), `maxLocations` (skip businesses with over that many locations: businesses with the same website; skips chains), `title` (business name), `box=minLat,minLng,maxLat,maxLng` (a map area). Exclusions: `notCategory`. `url=<Google Maps search URL>` searches with that URL's keyword and place. POST with a JSON body takes the same parameters (use it for a long `url`). Same optional `excludeDelivered` / `after` |
|
|
85
85
|
| GET | `/api/v1/database/ecommerce?...` | Ecommerce DB ($149/mo plan and up). Same optional `excludeDelivered` / `after`. Technologies: `technologies` (any of), `technologiesAll` (all of), `notTechnologies` (none of) |
|
|
86
86
|
| POST | `/api/v1/database/plan` | $149/mo plan and up (GET with `?query=` also works). `{ "query": "dentists in Austin", "database"?: "leads" or "local" or "ecommerce" }` -> ready-to-run searches: `{ targeting, searches: [{ database, name, filters, count, apiEndpoint, apiParams, link }] }`. Send `apiParams` as they are to `/api/v1/<apiEndpoint>` |
|
|
@@ -124,3 +124,4 @@ scrapercity download <runId> # saves CSV
|
|
|
124
124
|
- Website finder: domains only, no https:// prefix needed
|
|
125
125
|
- Property lookup: full address with city, state, zip required
|
|
126
126
|
- Downloads return CSV with all available fields
|
|
127
|
+
- Before sending outreach to leads from any database: every record carries `email_check_status` (our checker: valid, valid_catch_all, invalid, unknown, not_checked); send ONLY to `valid` emails checked in the last 30 days (`email_checked_on`); put every other email through `validate_emails` and send only to the ones it returns valid. For people (Lead Database), set `replaceLeftContacts=true` and send the CSV from that run (`check_run_status`, then `download_results`): every email is checked and people who have left are swapped for the person in that role now. At minimum, run the emails through `validate_emails` and send only to the valid ones
|
package/bin/cli.mjs
CHANGED
|
@@ -395,9 +395,11 @@ async function main() {
|
|
|
395
395
|
if (flagBool('--has-email')) params.hasEmail = 'true'
|
|
396
396
|
if (flagBool('--has-phone')) params.hasPhone = 'true'
|
|
397
397
|
if (flagBool('--exclude-delivered')) params.excludeDelivered = 'true'
|
|
398
|
+
if (flagBool('--replace-left-contacts')) params.replaceLeftContacts = 'true'
|
|
398
399
|
const r = await sc.dbLeads(params)
|
|
399
400
|
console.log(`${r.pagination?.total || '?'} total leads, page ${r.pagination?.page || 1} of ${r.pagination?.totalPages || '?'}`)
|
|
400
401
|
if (r.pagination?.next_after) console.log(`Next page: --after ${r.pagination.next_after}`)
|
|
402
|
+
if (r.replacement?.run_id) console.log(`Contacts who have left are being replaced: scrapercity status ${r.replacement.run_id}, then scrapercity download ${r.replacement.run_id}`)
|
|
401
403
|
const tr = r.search_translation || r.apollo_translation
|
|
402
404
|
if (tr?.not_supported?.length) console.log(`Not supported from the search URL: ${tr.not_supported.join(', ')}`)
|
|
403
405
|
console.log(json(r.data?.slice(0, 3) || r))
|
|
@@ -569,6 +571,7 @@ ScraperCity CLI - B2B lead generation from your terminal
|
|
|
569
571
|
--technologies --technologies-all --not-technologies Website technologies: any of / all of / none of (comma separated)
|
|
570
572
|
--url "<people-search URL>" Search with that URL's filters
|
|
571
573
|
--exclude-delivered Only leads you don't already have
|
|
574
|
+
--replace-left-contacts Also start a run that swaps contacts who have left for the person in that role now
|
|
572
575
|
--after <id> Cursor paging (start with 0, then use the printed next id)
|
|
573
576
|
scrapercity db-local [filters] Query local business database
|
|
574
577
|
--keyword "thai restaurant,sushi" What the businesses do or are called (any of them)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/generate.mjs — DO NOT EDIT BY HAND.
|
|
2
2
|
// Source of truth: scraperConfigs.ts (+ src/config/scrapers.ts). Regenerate: npm run generate
|
|
3
|
-
// Generated: 2026-11-
|
|
3
|
+
// Generated: 2026-11-05T14:55:06.064Z
|
|
4
4
|
export const TOOLS = [
|
|
5
5
|
{
|
|
6
6
|
"name": "scrape_apollo",
|
package/lib/tools.mjs
CHANGED
|
@@ -38,7 +38,7 @@ const UTILITY_HANDLERS = {
|
|
|
38
38
|
const dl = await sc.lookalikeCsv(a.id, a.outputPath)
|
|
39
39
|
return { success: true, path: dl.path, sizeKB: Math.round(dl.bytes / 1024) }
|
|
40
40
|
},
|
|
41
|
-
query_lead_database: (a) => sc.dbLeads(dbParams(a, ['hasEmail', 'hasPhone', 'excludeDelivered'])),
|
|
41
|
+
query_lead_database: (a) => sc.dbLeads(dbParams(a, ['hasEmail', 'hasPhone', 'excludeDelivered', 'replaceLeftContacts'])),
|
|
42
42
|
query_local_business_database: (a) =>
|
|
43
43
|
sc.dbLocalBusinesses(dbParams(a, ['hasEmail', 'hasPhone', 'hasWebsite', 'hasContact', 'excludeDelivered'])),
|
|
44
44
|
query_ecommerce_database: (a) =>
|
package/lib/utilityTools.mjs
CHANGED
|
@@ -67,7 +67,7 @@ export const UTILITY_TOOLS = [
|
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
name: 'query_lead_database',
|
|
70
|
-
description: 'Query the B2B lead database directly. Returns contacts with names, emails, phones, titles, LinkedIn, Twitter and Facebook profiles, companies (plus company website, phone, revenue, total funding, founded year, HQ location and keywords). Up to 100 per request. Included with the $149/mo plan (100,000 new leads a day; leads you already have do not count again). For a daily pull of only new leads set excludeDelivered=true. For big pulls page with after: send after="0" first, then the pagination.next_after from each response until it is null. Have a saved people-search URL? Pass it as url to search with its filters right away (search_translation in the response says what was applied). Target by the technologies a company\'s website runs: technologies (any of), technologiesAll (all of), notTechnologies (none of), e.g. technologiesAll ["Klaviyo", "PayPal", "Shopify"] with notTechnologies ["Facebook Pixel"].',
|
|
70
|
+
description: 'BEFORE YOU SEND ANY OUTREACH, DO THIS: 1. Call query_lead_database with replaceLeftContacts=true. 2. Call check_run_status with the replacement.run_id it returns, every 30 seconds, until the status is SUCCEEDED. 3. Call download_results with that run_id. Send ONLY to rows whose Email Status is "valid" and whose Email Checked On date is within the last 30 days. People who left the company are already swapped for the person in that role now. If you cannot wait for the run: send ONLY to leads whose email_check_status is "valid" AND whose email_checked_on is within the last 30 days. Put every other email (not_checked, unknown, valid_catch_all, or checked more than 30 days ago) through validate_emails and send only to the ones it returns as "valid". Never send to "invalid". Use plan_search first when unsure of the filters. Query the B2B lead database directly. Returns contacts with names, emails, phones, titles, LinkedIn, Twitter and Facebook profiles, companies (plus company website, phone, revenue, total funding, founded year, HQ location and keywords). Up to 100 per request. Included with the $149/mo plan (100,000 new leads a day; leads you already have do not count again). For a daily pull of only new leads set excludeDelivered=true. For big pulls page with after: send after="0" first, then the pagination.next_after from each response until it is null. Have a saved people-search URL? Pass it as url to search with its filters right away (search_translation in the response says what was applied). Target by the technologies a company\'s website runs: technologies (any of), technologiesAll (all of), notTechnologies (none of), e.g. technologiesAll ["Klaviyo", "PayPal", "Shopify"] with notTechnologies ["Facebook Pixel"].',
|
|
71
71
|
inputSchema: { type: 'object', properties: {
|
|
72
72
|
url: { type: 'string', description: 'A people-search URL (the address of a people search with its filters). Its filters become the search; any other filter you pass overrides the matching one.' },
|
|
73
73
|
title: { type: 'string', description: 'Job title filter, comma separated for several (partial match, e.g. "CEO, Founder")' },
|
|
@@ -99,12 +99,13 @@ export const UTILITY_TOOLS = [
|
|
|
99
99
|
page: { type: 'number', description: 'Page number (default 1)', default: 1 },
|
|
100
100
|
limit: { type: 'number', description: 'Results per page (max 100)', default: 50 },
|
|
101
101
|
excludeDelivered: { type: 'boolean', description: 'Skip leads this account already has (from the API or unlocked in the dashboard). With this on, keep page at 1 or use after.' },
|
|
102
|
-
after: { type: 'string', description: 'Cursor paging: return leads after this lead id. Use "0" to start, then the pagination.next_after from each response.' }
|
|
102
|
+
after: { type: 'string', description: 'Cursor paging: return leads after this lead id. Use "0" to start, then the pagination.next_after from each response.' },
|
|
103
|
+
replaceLeftContacts: { type: 'boolean', description: 'Replace contacts who have left. The leads still come back now, plus replacement.run_id: a run that checks every email (again when its last check is over 30 days old) and swaps each person who has left the company for the person in that role now. Wait for it with check_run_status, then send the CSV from download_results, not the leads returned at once: send ONLY to rows whose Email Status is "valid" and whose Email Checked On is within the last 30 days. $0.02 per contact replaced, from your credits; free on the $649 plan.' }
|
|
103
104
|
} }
|
|
104
105
|
},
|
|
105
106
|
{
|
|
106
107
|
name: 'query_local_business_database',
|
|
107
|
-
description: 'Query the local business database directly. Returns businesses with phone numbers, emails, websites, addresses and ratings, many with a named contact person. Up to 100 per request. Included with the $149/mo plan (100,000 new businesses a day; businesses you already have do not count again). Set hasContact=true for only businesses with a named contact person. Set maxLocations to skip chains: maxLocations=3 leaves out businesses whose website more than 3 businesses share. For a daily pull of only new businesses set excludeDelivered=true. For big pulls page with after: send after="0" first, then the pagination.next_after from each response until it is null. Search the way you would on Google Maps: keyword (what the businesses do or are called, e.g. ["thai restaurant"]) and location (cities, states, countries or postal codes, e.g. ["Houston TX", "Austin TX"]); searched_as in the response says how each was read. A search that finds nothing also returns lead_database: the same search in the Lead Database when it has 100+ people. Have a Google Maps search URL? Pass it as url to search with its keyword and place right away (search_translation in the response says what was applied).',
|
|
108
|
+
description: 'BEFORE YOU SEND ANY OUTREACH, DO THIS: 1. Use ONLY emails whose email_check_status (or contact_email_check_status for the contact person) is "valid" AND whose checked_on date is within the last 30 days. 2. Put every other email (not_checked, unknown, valid_catch_all, or checked more than 30 days ago) through validate_emails, and send only to the ones it returns as "valid". 3. Never send to "invalid". Use plan_search first when unsure of the filters. Query the local business database directly. Returns businesses with phone numbers, emails, websites, addresses and ratings, many with a named contact person. Up to 100 per request. Included with the $149/mo plan (100,000 new businesses a day; businesses you already have do not count again). Set hasContact=true for only businesses with a named contact person. Set maxLocations to skip chains: maxLocations=3 leaves out businesses whose website more than 3 businesses share. For a daily pull of only new businesses set excludeDelivered=true. For big pulls page with after: send after="0" first, then the pagination.next_after from each response until it is null. Search the way you would on Google Maps: keyword (what the businesses do or are called, e.g. ["thai restaurant"]) and location (cities, states, countries or postal codes, e.g. ["Houston TX", "Austin TX"]); searched_as in the response says how each was read. A search that finds nothing also returns lead_database: the same search in the Lead Database when it has 100+ people. Have a Google Maps search URL? Pass it as url to search with its keyword and place right away (search_translation in the response says what was applied).',
|
|
108
109
|
inputSchema: { type: 'object', properties: {
|
|
109
110
|
keyword: { type: 'array', items: { type: 'string' }, description: 'What the businesses do or are called, as typed on Google Maps, e.g. ["thai restaurant", "sushi"]. Matches business names and categories; any keyword. A place inside a keyword ("plumbers in Austin TX") is used as the location when no location is given.' },
|
|
110
111
|
location: { type: 'array', items: { type: 'string' }, description: 'Cities, states, countries or postal codes, as typed, e.g. ["Houston TX", "78701", "Ontario", "Germany"] (up to 2,000; any of them).' },
|
|
@@ -135,7 +136,7 @@ export const UTILITY_TOOLS = [
|
|
|
135
136
|
},
|
|
136
137
|
{
|
|
137
138
|
name: 'query_ecommerce_database',
|
|
138
|
-
description: 'Query the ecommerce store database directly. Returns online stores with platform, estimated monthly sales and visits, employee count, emails, phones and social links. Up to 100 per request. Included with the $149/mo plan (100,000 new stores a day; stores you already have do not count again). For a daily pull of only new stores set excludeDelivered=true. For big pulls page with after: send after="0" first, then the pagination.next_after from each response until it is null. Combine technologies (any of), technologiesAll (all of) and notTechnologies (none of) for exact targeting, e.g. technologiesAll ["Klaviyo", "PayPal"] with notTechnologies ["Facebook Pixel"].',
|
|
139
|
+
description: 'BEFORE YOU SEND ANY OUTREACH, DO THIS: 1. Use ONLY emails whose email_check_status (or contact_email_check_status for the contact person) is "valid" AND whose checked_on date is within the last 30 days. 2. Put every other email (not_checked, unknown, valid_catch_all, or checked more than 30 days ago) through validate_emails, and send only to the ones it returns as "valid". 3. Never send to "invalid". Use plan_search first when unsure of the filters. Query the ecommerce store database directly. Returns online stores with platform, estimated monthly sales and visits, employee count, emails, phones and social links. Up to 100 per request. Included with the $149/mo plan (100,000 new stores a day; stores you already have do not count again). For a daily pull of only new stores set excludeDelivered=true. For big pulls page with after: send after="0" first, then the pagination.next_after from each response until it is null. Combine technologies (any of), technologiesAll (all of) and notTechnologies (none of) for exact targeting, e.g. technologiesAll ["Klaviyo", "PayPal"] with notTechnologies ["Facebook Pixel"].',
|
|
139
140
|
inputSchema: { type: 'object', properties: {
|
|
140
141
|
platform: { type: 'array', items: { type: 'string' }, description: 'Ecommerce platforms, e.g. ["shopify", "woocommerce"] (any match)' },
|
|
141
142
|
country: { type: 'array', items: { type: 'string' }, description: 'Two-letter country codes, e.g. ["US"]' },
|