scrapercity 1.0.4 → 1.0.6

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 CHANGED
@@ -18,6 +18,14 @@ apollo
18
18
  Cost: $0.0039/lead | Min 500, max 50000
19
19
  DELIVERY: UP TO 4 DAYS. Use webhook, not polling.
20
20
 
21
+ apollo-filters
22
+ Body: { seniorityLevel, functionDept, companyIndustry, personCountry, personState,
23
+ companyCountry, companyState, companySize, personTitles:[], companyDomains:[],
24
+ companyKeywords:[], personCities:[], companyCities:[], hasPhone, count, fileName }
25
+ At least one filter required.
26
+ Returns: { runId, message }
27
+ Cost: $0.0039/lead | DELIVERY: UP TO 4 DAYS.
28
+
21
29
  maps
22
30
  Body: { searchStringsArray: ["plumbers"], locationQuery: "Denver, CO", maxCrawledPlacesPerSearch: 500 }
23
31
  Returns: { runId, datasetId, priceMicro }
@@ -149,9 +157,7 @@ GET /api/v1/apollo-status
149
157
  Returns: { useApify, message } - check if Apollo URL endpoint is available
150
158
 
151
159
  ────────────────────────────────────────
152
- DATABASES (GET, $149+ plans, 100k/day)
153
- This is the recommended path for filter-based B2B people search (by title,
154
- industry, location, seniority, etc). Returns instantly from a cached dataset.
160
+ DATABASES (GET, $649 plan only, 100k/day)
155
161
  ────────────────────────────────────────
156
162
 
157
163
  GET /api/v1/database/leads?title=CTO&country=United States&hasEmail=true&page=1&limit=100
@@ -178,20 +184,19 @@ ERROR CODES
178
184
  WORKFLOW EXAMPLES
179
185
  ────────────────────────────────────────
180
186
 
181
- 1. LEAD DATABASE (instant, recommended for B2B people search):
182
- GET /api/v1/database/leads?title=CTO&industry=computer+software&hasEmail=true&page=1
183
- Loop pages until page > totalPages.
184
- This is the supported path for filter-based B2B contact search ($149+ plans).
185
-
186
- 2. MAPS SCRAPE (fast):
187
+ 1. MAPS SCRAPE (fast):
187
188
  POST /api/v1/scrape/maps → get runId → poll status every 15s → download CSV
188
189
 
189
- 3. APOLLO SCRAPE (slow, only when user provides an apollo.io URL):
190
+ 2. APOLLO SCRAPE (slow):
190
191
  POST /api/v1/scrape/apollo → get runId → configure webhook → wait for callback
191
192
  Do NOT poll Apollo in a tight loop. Check once per hour at most.
192
193
 
193
- 4. ENRICH PIPELINE:
194
- Database/Maps → download CSV → extract emails → POST email-validator → download validated CSV
194
+ 3. ENRICH PIPELINE:
195
+ Apollo/Maps → download CSV → extract emails → POST email-validator → download validated CSV
196
+
197
+ 4. LEAD DATABASE (instant):
198
+ GET /api/v1/database/leads?title=CTO&industry=computer+software&hasEmail=true&page=1
199
+ Loop pages until page > totalPages
195
200
 
196
201
  5. LOCAL BUSINESS PIPELINE:
197
202
  Yelp/Angi/Maps → download CSV → POST email-finder with names+domains → POST mobile-finder
package/SKILL.md CHANGED
@@ -20,6 +20,7 @@ Auth: `Authorization: Bearer $SCRAPERCITY_API_KEY` on all requests.
20
20
  | Slug | Input | Cost | Speed |
21
21
  |------|-------|------|-------|
22
22
  | `apollo` | `{url, count, fileName}` | $0.0039/lead | ~4 DAYS (use webhook) |
23
+ | `apollo-filters` | `{seniorityLevel, functionDept, companyIndustry, personCountry, personState, companySize, personTitles[], companyDomains[], count}` | $0.0039/lead | ~4 DAYS |
23
24
  | `maps` | `{searchStringsArray:["query"], locationQuery, maxCrawledPlacesPerSearch}` | $0.01/place | 5-30 min |
24
25
  | `email-validator` | `{emails:["a@b.com"]}` | $0.0036/email | 1-10 min |
25
26
  | `email-finder` | `{contacts:[{first_name,last_name,domain}], autoValidateEmails, autoFindMobiles}` | $0.05/contact | 1-10 min |
package/bin/cli.mjs CHANGED
@@ -97,6 +97,40 @@ async function main() {
97
97
  break
98
98
  }
99
99
 
100
+ // ── Apollo Filters ────────────────────────────────────
101
+ case 'apollo-filters': {
102
+ const filters = {}
103
+ for (const f of ['--seniority', '--function', '--industry', '--country', '--state',
104
+ '--company-country', '--company-state', '--company-size', '--count', '--name', '--has-phone']) {
105
+ const v = flag(f)
106
+ if (v === undefined) continue
107
+ const key = {
108
+ '--seniority': 'seniorityLevel', '--function': 'functionDept',
109
+ '--industry': 'companyIndustry', '--country': 'personCountry',
110
+ '--state': 'personState', '--company-country': 'companyCountry',
111
+ '--company-state': 'companyState', '--company-size': 'companySize',
112
+ '--count': 'count', '--name': 'fileName', '--has-phone': 'hasPhone'
113
+ }[f]
114
+ filters[key] = f === '--has-phone' ? true : (f === '--count' ? +v : v)
115
+ }
116
+ // Array flags
117
+ for (const f of ['--titles', '--domains', '--keywords', '--person-cities', '--company-cities']) {
118
+ const v = flag(f)
119
+ if (!v) continue
120
+ const key = { '--titles': 'personTitles', '--domains': 'companyDomains',
121
+ '--keywords': 'companyKeywords', '--person-cities': 'personCities',
122
+ '--company-cities': 'companyCities' }[f]
123
+ filters[key] = v.split(',').map(s => s.trim())
124
+ }
125
+ if (!Object.keys(filters).length) die('At least one filter required. Example: scrapercity apollo-filters --industry "computer software" --country "United States" --count 1000')
126
+ const r = await sc.apolloFilters(filters)
127
+ console.log(`✓ Apollo filter search started`)
128
+ console.log(` Run ID: ${r.runId}`)
129
+ console.log(` ${r.message || ''}`)
130
+ console.log(` Note: Apollo takes up to 4 days. Set up a webhook to get notified.`)
131
+ break
132
+ }
133
+
100
134
  // ── Maps ──────────────────────────────────────────────
101
135
  case 'maps': {
102
136
  const query = flag('--query') || flag('-q')
@@ -432,6 +466,7 @@ ScraperCity CLI - B2B lead generation from your terminal
432
466
 
433
467
  Scrapers:
434
468
  scrapercity apollo <url> [--count N] Apollo scrape (URL-based, ~4 day delivery)
469
+ scrapercity apollo-filters [filters] Apollo scrape (filter-based)
435
470
  scrapercity maps -q <query> -l <loc> Google Maps scrape
436
471
  scrapercity email-validate <emails> Validate email addresses
437
472
  scrapercity email-find --first X --last Y --domain Z Find business emails
package/bin/mcp.mjs CHANGED
@@ -42,6 +42,31 @@ const TOOLS = [
42
42
  required: ['url']
43
43
  }
44
44
  },
45
+ {
46
+ name: 'scrape_apollo_filters',
47
+ description: 'Scrape leads from Apollo.io using filter parameters instead of a URL. Same 4-day delivery - use webhooks. At least one filter required.',
48
+ inputSchema: {
49
+ type: 'object',
50
+ properties: {
51
+ seniorityLevel: { type: 'string', description: 'e.g. "director", "vp", "c_suite", "manager", "senior"' },
52
+ functionDept: { type: 'string', description: 'e.g. "sales", "marketing", "engineering", "finance"' },
53
+ companyIndustry: { type: 'string', description: 'e.g. "computer software", "financial services"' },
54
+ personCountry: { type: 'string', description: 'e.g. "United States", "United Kingdom"' },
55
+ personState: { type: 'string', description: 'e.g. "California", "New York"' },
56
+ companyCountry: { type: 'string', description: 'Company HQ country' },
57
+ companyState: { type: 'string', description: 'Company HQ state' },
58
+ companySize: { type: 'string', description: 'e.g. "11-50", "51-200", "201-500", "501-1000", "1001-5000"' },
59
+ personTitles: { type: 'array', items: { type: 'string' }, description: 'Specific job titles to target' },
60
+ companyDomains: { type: 'array', items: { type: 'string' }, description: 'Specific company domains' },
61
+ companyKeywords: { type: 'array', items: { type: 'string' }, description: 'Company description keywords' },
62
+ personCities: { type: 'array', items: { type: 'string' }, description: 'Person city filter' },
63
+ companyCities: { type: 'array', items: { type: 'string' }, description: 'Company city filter' },
64
+ hasPhone: { type: 'boolean', description: 'Only return contacts with phone numbers', default: false },
65
+ count: { type: 'number', description: 'Number of leads (min 500, max 50000)', default: 1000 },
66
+ fileName: { type: 'string', description: 'Export name', default: 'Apollo Export' }
67
+ }
68
+ }
69
+ },
45
70
  {
46
71
  name: 'scrape_maps',
47
72
  description: 'Scrape businesses from Google Maps. Returns businesses with names, addresses, phone numbers, websites, emails, ratings. Typically completes in 5-30 minutes.',
@@ -358,6 +383,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
358
383
  result = await sc.apollo(args.url, args.count || 1000, args.fileName || '')
359
384
  result._note = 'Apollo takes 11-48+ hours. Configure webhook at app.scrapercity.com/dashboard/webhooks instead of polling.'
360
385
  break
386
+ case 'scrape_apollo_filters':
387
+ result = await sc.apolloFilters(args)
388
+ result._note = 'Apollo takes 11-48+ hours. Configure webhook at app.scrapercity.com/dashboard/webhooks instead of polling.'
389
+ break
361
390
  case 'scrape_maps':
362
391
  result = await sc.maps(args.query, args.location, args.limit || 500)
363
392
  break
package/lib/client.mjs CHANGED
@@ -83,12 +83,8 @@ export async function download(runId, outputPath) {
83
83
  export const apollo = (url, count = 1000, fileName = '') =>
84
84
  post('/api/v1/scrape/apollo', { url, count, fileName })
85
85
 
86
- // apolloFilters was the filter-based Apollo endpoint. It has been retired.
87
- // For B2B people search by filter, use the Lead Database (GET /api/v1/database/leads,
88
- // included on the $149/mo plan and above).
89
- export const apolloFilters = () => {
90
- throw new Error('apolloFilters is no longer available. Use the Lead Database (GET /api/v1/database/leads) instead - included on the $149/mo plan and above.')
91
- }
86
+ export const apolloFilters = (filters) =>
87
+ post('/api/v1/scrape/apollo-filters', filters)
92
88
 
93
89
  export const apolloStatus = () => get('/api/v1/apollo-status')
94
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scrapercity",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "ScraperCity CLI & MCP Server - B2B lead generation for AI agents",
5
5
  "type": "module",
6
6
  "bin": {