scrapercity 1.0.36 → 1.0.37
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 +4 -1
- package/README.md +1 -1
- package/SKILL.md +2 -2
- package/bin/cli.mjs +3 -0
- package/lib/catalog.generated.mjs +1 -1
- package/lib/tools.mjs +2 -2
- package/lib/utilityTools.mjs +6 -4
- package/package.json +1 -1
package/AGENT_DOCS.txt
CHANGED
|
@@ -356,4 +356,7 @@ WORKFLOW EXAMPLES
|
|
|
356
356
|
Loop pages until page > totalPages
|
|
357
357
|
Every business carries email_check_status / contact_email_check_status and their checked_on dates:
|
|
358
358
|
send ONLY to valid emails checked in the last 30 days; put every other email through email-validator first.
|
|
359
|
-
Before sending:
|
|
359
|
+
Before sending: add replaceLeftContacts=true, wait for replacement.run_id (GET /api/v1/scrape/status/{run_id}),
|
|
360
|
+
then send the CSV from GET /api/downloads/{run_id}: each contact person checked, one who has left swapped for the
|
|
361
|
+
person in that role now ($0.02 per contact replaced, free on the $649 plan). At minimum: POST the emails to
|
|
362
|
+
email-validator and send only to the valid ones.
|
package/README.md
CHANGED
|
@@ -155,7 +155,7 @@ Both SDKs carry the same tool list as the MCP server, regenerated from the live
|
|
|
155
155
|
|
|
156
156
|
## Before You Send
|
|
157
157
|
|
|
158
|
-
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
|
|
158
|
+
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` (`query_local_business_database` and `query_ecommerce_database` take it too, for each business's or store's contact person); 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.
|
|
159
159
|
|
|
160
160
|
## How It Works
|
|
161
161
|
|
package/SKILL.md
CHANGED
|
@@ -86,8 +86,8 @@ Apollo scrapes usually take **15-30 minutes** to deliver; some lists take longer
|
|
|
86
86
|
| GET | `/api/v1/scrape/logs/{runId}` | Run logs |
|
|
87
87
|
| GET | `/api/v1/apollo-status` | Apollo service health: `{status: "url-based" or "legacy", message, timestamp}` |
|
|
88
88
|
| GET | `/api/v1/database/leads?title=CTO&country=United%20States&hasEmail=true&limit=100` | Lead DB (included on $149/mo and up, 100k new leads/day; on a trial or $49 each new lead is paid from credits, see `billing` in the answer). 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`) |
|
|
89
|
-
| GET | `/api/v1/database/local-businesses?category=Dentist&country=US&hasContact=true&limit=100` | Local biz DB (included on $149/mo and up, 100k new businesses/day; per record from credits below it). 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` |
|
|
90
|
-
| GET | `/api/v1/database/ecommerce?...` | Ecommerce DB (included on $149/mo and up; per record from credits below it). Same optional `excludeDelivered` / `after
|
|
89
|
+
| GET | `/api/v1/database/local-businesses?category=Dentist&country=US&hasContact=true&limit=100` | Local biz DB (included on $149/mo and up, 100k new businesses/day; per record from credits below it). 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`, and `replaceLeftContacts=true` (adds `replacement.run_id`: a run that swaps contact people who have left for the person in that role now; $0.02 per contact replaced, free on the $649 plan) |
|
|
90
|
+
| GET | `/api/v1/database/ecommerce?...` | Ecommerce DB (included on $149/mo and up; per record from credits below it). Same optional `excludeDelivered` / `after`, and `replaceLeftContacts=true` (adds `replacement.run_id`: a run that swaps store contact people who have left for the person in that role now; $0.02 per contact replaced, free on the $649 plan). Technologies: `technologies` (any of), `technologiesAll` (all of), `notTechnologies` (none of) |
|
|
91
91
|
| POST | `/api/v1/database/plan` | Free on every plan, trials included (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>` |
|
|
92
92
|
| POST | `/api/v1/autoleads/lookalike` | Every plan, $0.01 per site read. `{ "domains": ["acme.com", "mike@globex.com", ...] }` (websites or work emails, at least 3 company sites) -> 202 `{ job }`. Then GET `/api/v1/autoleads/lookalike?id=<job id>` until `job.status` is `done`: `job.groups` = `[{ name, description, sites, database, filters, count, tool }]`. Send a group's `filters` to that database's endpoint. 402 = balance under $0.01 x every site; 409 = a job is already running. Add `&format=csv` to the GET for every site as a CSV (no extra charge) |
|
|
93
93
|
|
package/bin/cli.mjs
CHANGED
|
@@ -430,9 +430,11 @@ async function main() {
|
|
|
430
430
|
if (flagBool('--has-website')) params.hasWebsite = 'true'
|
|
431
431
|
if (flagBool('--has-contact')) params.hasContact = 'true'
|
|
432
432
|
if (flagBool('--exclude-delivered')) params.excludeDelivered = 'true'
|
|
433
|
+
if (flagBool('--replace-left-contacts')) params.replaceLeftContacts = 'true'
|
|
433
434
|
const r = await sc.dbLocalBusinesses(params)
|
|
434
435
|
console.log(`${r.pagination?.total || '?'} total businesses, page ${r.pagination?.page || 1} of ${r.pagination?.totalPages || '?'}`)
|
|
435
436
|
if (r.pagination?.next_after) console.log(`Next page: --after ${r.pagination.next_after}`)
|
|
437
|
+
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}`)
|
|
436
438
|
if (r.search_translation?.not_supported?.length) console.log(`Not supported from the search URL: ${r.search_translation.not_supported.join(', ')}`)
|
|
437
439
|
if (r.searched_as) {
|
|
438
440
|
const places = (r.searched_as.places || []).map(p => p.not_found ? `${p.text} (not found)` : p.read_as)
|
|
@@ -596,6 +598,7 @@ ScraperCity CLI - B2B lead generation from your terminal
|
|
|
596
598
|
--box "minLat,minLng,maxLat,maxLng" Only businesses inside this map area
|
|
597
599
|
--url "<Google Maps search URL>" Search with that URL's keyword and place
|
|
598
600
|
--exclude-delivered Only businesses you don't already have
|
|
601
|
+
--replace-left-contacts Also start a run that swaps contact people who have left for the person in that role now
|
|
599
602
|
--after <id> Cursor paging (start with 0, then use the printed next id)
|
|
600
603
|
|
|
601
604
|
Env: SCRAPERCITY_API_KEY=... or scrapercity login
|
|
@@ -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-09T18:41:07.212Z
|
|
4
4
|
export const TOOLS = [
|
|
5
5
|
{
|
|
6
6
|
"name": "scrape_apollo",
|
package/lib/tools.mjs
CHANGED
|
@@ -41,9 +41,9 @@ const UTILITY_HANDLERS = {
|
|
|
41
41
|
},
|
|
42
42
|
query_lead_database: (a) => sc.dbLeads(dbParams(a, ['hasEmail', 'hasPhone', 'excludeDelivered', 'replaceLeftContacts'])),
|
|
43
43
|
query_local_business_database: (a) =>
|
|
44
|
-
sc.dbLocalBusinesses(dbParams(a, ['hasEmail', 'hasPhone', 'hasWebsite', 'hasContact', 'excludeDelivered'])),
|
|
44
|
+
sc.dbLocalBusinesses(dbParams(a, ['hasEmail', 'hasPhone', 'hasWebsite', 'hasContact', 'excludeDelivered', 'replaceLeftContacts'])),
|
|
45
45
|
query_ecommerce_database: (a) =>
|
|
46
|
-
sc.dbEcommerce(dbParams(a, ['hasEmail', 'hasPhone', 'hasInstagram', 'hasFacebook', 'hasTiktok', 'excludeDelivered'])),
|
|
46
|
+
sc.dbEcommerce(dbParams(a, ['hasEmail', 'hasPhone', 'hasInstagram', 'hasFacebook', 'hasTiktok', 'excludeDelivered', 'replaceLeftContacts'])),
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
for (const t of UTILITY_TOOLS) {
|
package/lib/utilityTools.mjs
CHANGED
|
@@ -112,7 +112,7 @@ export const UTILITY_TOOLS = [
|
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
name: 'query_local_business_database',
|
|
115
|
-
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 on the $149/mo plan and up (100,000 new businesses a day; businesses you already have do not count again). On a trial or the $49 plan each new business is paid from credits and businesses you already have are free: the answer\'s billing block says what was charged and what is left, and when the credits run out part way it adds billing.not_returned and has_more (a 402 means none could be paid for; start_here gives the live prices). 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).',
|
|
115
|
+
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". To have each contact person checked and swapped for the person in that role now when they have left, set replaceLeftContacts=true, wait for replacement.run_id with check_run_status, then send the CSV from download_results. 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 on the $149/mo plan and up (100,000 new businesses a day; businesses you already have do not count again). On a trial or the $49 plan each new business is paid from credits and businesses you already have are free: the answer\'s billing block says what was charged and what is left, and when the credits run out part way it adds billing.not_returned and has_more (a 402 means none could be paid for; start_here gives the live prices). 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).',
|
|
116
116
|
inputSchema: { type: 'object', properties: {
|
|
117
117
|
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.' },
|
|
118
118
|
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).' },
|
|
@@ -138,12 +138,13 @@ export const UTILITY_TOOLS = [
|
|
|
138
138
|
page: { type: 'number', description: 'Page number (default 1)', default: 1 },
|
|
139
139
|
limit: { type: 'number', description: 'Results per page (max 100)', default: 50 },
|
|
140
140
|
excludeDelivered: { type: 'boolean', description: 'Skip businesses this account already has (from the API or unlocked in the dashboard). With this on, keep page at 1 or use after.' },
|
|
141
|
-
after: { type: 'string', description: 'Cursor paging: return businesses after this id. Use "0" to start, then the pagination.next_after from each response.' }
|
|
141
|
+
after: { type: 'string', description: 'Cursor paging: return businesses after this id. Use "0" to start, then the pagination.next_after from each response.' },
|
|
142
|
+
replaceLeftContacts: { type: 'boolean', description: 'Replace contact people who have left. The businesses still come back now, plus replacement.run_id: a run that checks each business\'s contact person and swaps one 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 businesses returned at once: send ONLY to contacts whose Contact Email Status is "valid" and whose Contact Email Checked On is within the last 30 days. $0.02 per contact replaced, from your credits; free on the $649 plan.' }
|
|
142
143
|
} }
|
|
143
144
|
},
|
|
144
145
|
{
|
|
145
146
|
name: 'query_ecommerce_database',
|
|
146
|
-
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 on the $149/mo plan and up (100,000 new stores a day; stores you already have do not count again). On a trial or the $49 plan each new store is paid from credits and stores you already have are free: the answer\'s billing block says what was charged and what is left, and when the credits run out part way it adds billing.not_returned and has_more (a 402 means none could be paid for; start_here gives the live prices). 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"].',
|
|
147
|
+
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". To have each store\'s contact person checked and swapped for the person in that role now when they have left, set replaceLeftContacts=true, wait for replacement.run_id with check_run_status, then send the CSV from download_results. 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 on the $149/mo plan and up (100,000 new stores a day; stores you already have do not count again). On a trial or the $49 plan each new store is paid from credits and stores you already have are free: the answer\'s billing block says what was charged and what is left, and when the credits run out part way it adds billing.not_returned and has_more (a 402 means none could be paid for; start_here gives the live prices). 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"].',
|
|
147
148
|
inputSchema: { type: 'object', properties: {
|
|
148
149
|
platform: { type: 'array', items: { type: 'string' }, description: 'Ecommerce platforms, e.g. ["shopify", "woocommerce"] (any match)' },
|
|
149
150
|
country: { type: 'array', items: { type: 'string' }, description: 'Two-letter country codes, e.g. ["US"]' },
|
|
@@ -170,7 +171,8 @@ export const UTILITY_TOOLS = [
|
|
|
170
171
|
page: { type: 'number', description: 'Page number (default 1)', default: 1 },
|
|
171
172
|
limit: { type: 'number', description: 'Results per page (max 100)', default: 50 },
|
|
172
173
|
excludeDelivered: { type: 'boolean', description: 'Skip stores this account already has (from the API or unlocked in the dashboard). With this on, keep page at 1 or use after.' },
|
|
173
|
-
after: { type: 'string', description: 'Cursor paging: return stores after this id. Use "0" to start, then the pagination.next_after from each response.' }
|
|
174
|
+
after: { type: 'string', description: 'Cursor paging: return stores after this id. Use "0" to start, then the pagination.next_after from each response.' },
|
|
175
|
+
replaceLeftContacts: { type: 'boolean', description: 'Replace contact people who have left. The stores still come back now, plus replacement.run_id: a run that checks each store\'s contact person and swaps one 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 stores returned at once: send ONLY to contacts whose contact_email_status is "valid" and whose contact_email_checked_on is within the last 30 days. $0.02 per contact replaced, from your credits; free on the $649 plan.' }
|
|
174
176
|
} }
|
|
175
177
|
}
|
|
176
178
|
]
|