scrapercity 1.0.4 → 1.0.7

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/lib/client.mjs CHANGED
@@ -2,6 +2,7 @@
2
2
  import fs from 'fs'
3
3
  import path from 'path'
4
4
  import os from 'os'
5
+ import { ENDPOINTS } from './catalog.generated.mjs'
5
6
 
6
7
  const BASE = 'https://app.scrapercity.com'
7
8
  const RC_PATH = path.join(os.homedir(), '.scrapercityrc')
@@ -81,20 +82,13 @@ export async function download(runId, outputPath) {
81
82
 
82
83
  // ── Apollo ────────────────────────────────────────────────────
83
84
  export const apollo = (url, count = 1000, fileName = '') =>
84
- post('/api/v1/scrape/apollo', { url, count, fileName })
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
- }
85
+ post(ENDPOINTS['apollo'], { url, count, fileName })
92
86
 
93
87
  export const apolloStatus = () => get('/api/v1/apollo-status')
94
88
 
95
89
  // ── Maps ──────────────────────────────────────────────────────
96
90
  export const maps = (query, location, limit = 500) =>
97
- post('/api/v1/scrape/maps', {
91
+ post(ENDPOINTS['maps'], {
98
92
  searchStringsArray: Array.isArray(query) ? query : [query],
99
93
  locationQuery: location,
100
94
  maxCrawledPlacesPerSearch: limit
@@ -102,11 +96,11 @@ export const maps = (query, location, limit = 500) =>
102
96
 
103
97
  // ── Email Validator ───────────────────────────────────────────
104
98
  export const emailValidate = (emails) =>
105
- post('/api/v1/scrape/email-validator', { emails })
99
+ post(ENDPOINTS['email-validator'], { emails })
106
100
 
107
101
  // ── Email Finder ──────────────────────────────────────────────
108
102
  export const emailFind = (contacts, opts = {}) =>
109
- post('/api/v1/scrape/email-finder', {
103
+ post(ENDPOINTS['email-finder'], {
110
104
  contacts,
111
105
  autoValidateEmails: opts.validate || false,
112
106
  autoFindMobiles: opts.mobiles || false
@@ -114,64 +108,63 @@ export const emailFind = (contacts, opts = {}) =>
114
108
 
115
109
  // ── Mobile Finder ─────────────────────────────────────────────
116
110
  export const mobileFinder = (inputs) =>
117
- post('/api/v1/scrape/mobile-finder', { inputs })
111
+ post(ENDPOINTS['mobile-finder'], { inputs })
118
112
 
119
113
  // ── People Finder / Skip Trace ────────────────────────────────
120
114
  export const peopleFinder = (params) =>
121
- post('/api/v1/scrape/people-finder', params)
115
+ post(ENDPOINTS['skip-trace'], params)
122
116
 
123
117
  // ── Store Leads (Ecommerce) ───────────────────────────────────
124
118
  export const storeLeads = (params) =>
125
- post('/api/v1/scrape/store-leads', params)
119
+ post(ENDPOINTS['store-leads'], params)
126
120
 
127
121
  // ── BuiltWith ─────────────────────────────────────────────────
128
122
  export const builtwith = (technology, fileName) =>
129
- post('/api/v1/scrape/builtwith', { technology, fileName })
123
+ post(ENDPOINTS['builtwith'], { technology, fileName })
130
124
 
131
125
  // ── Criminal Records ──────────────────────────────────────────
132
126
  export const criminal = (name, state, dob) =>
133
- post('/api/v1/scrape/criminal-records', { name, state, dob })
127
+ post(ENDPOINTS['criminal-records'], { name, state, dob })
134
128
 
135
129
  // ── Airbnb Email ──────────────────────────────────────────────
136
130
  export const airbnb = (params) =>
137
- post('/api/v1/scrape/airbnb-email', params)
138
-
139
- // ── YouTube Email ─────────────────────────────────────────────
140
- export const youtubeEmail = (channels) =>
141
- post('/api/v1/scrape/youtube-email', { channels })
131
+ post(ENDPOINTS['airbnb-email'], params)
142
132
 
143
133
  // ── Website Finder ────────────────────────────────────────────
144
134
  export const websiteFinder = (domains, jobTitle) =>
145
- post('/api/v1/scrape/website-finder', { domains, jobTitle })
135
+ post(ENDPOINTS['website-finder'], { domains, jobTitle })
146
136
 
147
137
  // ── Yelp ──────────────────────────────────────────────────────
148
138
  export const yelp = (params) =>
149
- post('/api/v1/scrape/yelp-scraper', params)
139
+ post(ENDPOINTS['yelp-scraper'], params)
150
140
 
151
141
  // ── Angi (Angie's List) ──────────────────────────────────────
152
142
  export const angi = (keyword, zipCodes, maxItems = 100) =>
153
- post('/api/v1/scrape/angi-angies-list-scraper', { keyword, zipCodes, maxItems })
143
+ post(ENDPOINTS['angi-angies-list-scraper'], { keyword, zipCodes, maxItems })
154
144
 
155
145
  // ── Zillow Agents ─────────────────────────────────────────────
156
146
  export const zillowAgents = (location, opts = {}) =>
157
- post('/api/v1/scrape/zillow-agents', { location, ...opts })
147
+ post(ENDPOINTS['zillow-agents'], { location, ...opts })
158
148
 
159
149
  // ── BizBuySell ────────────────────────────────────────────────
160
150
  export const bizbuysell = (startUrls, maxItems = 100) =>
161
- post('/api/v1/scrape/bizbuysell-scraper', { startUrls, maxItems })
151
+ post(ENDPOINTS['bizbuysell-scraper'], { startUrls, maxItems })
162
152
 
163
153
  // ── Crexi ─────────────────────────────────────────────────────
164
154
  export const crexi = (startUrls) =>
165
- post('/api/v1/scrape/crexi-scraper', { startUrls })
155
+ post(ENDPOINTS['crexi-scraper'], { startUrls })
166
156
 
167
- // ── Property Lookup ───────────────────────────────────────────
168
- export const propertyLookup = (addresses, includeOwnerContact = false) =>
169
- post('/api/v1/scrape/property-lookup', { addresses, includeOwnerContact })
157
+ // ── Deal Finder (distressed properties) ──────────────────────
158
+ export const distressList = (params) =>
159
+ post(ENDPOINTS['distress-list'], params)
170
160
 
171
161
  // ── Generic Scraper (fallback for any slug) ───────────────────
172
162
  export const scrape = (slug, body) =>
173
163
  post(`/api/v1/scrape/${slug}`, body)
174
164
 
165
+ // ── Generic: POST args straight to a full endpoint (used by the MCP) ──
166
+ export const postEndpoint = (endpoint, body) => post(endpoint, body)
167
+
175
168
  // ── Databases ($649 plan) ─────────────────────────────────────
176
169
  export const dbLeads = (params) => {
177
170
  const qs = new URLSearchParams()
@@ -180,7 +173,7 @@ export const dbLeads = (params) => {
180
173
  if (Array.isArray(v)) v.forEach(x => qs.append(k, x))
181
174
  else qs.append(k, String(v))
182
175
  }
183
- return get(`/api/v1/database/leads?${qs}`)
176
+ return get(`${ENDPOINTS['database-leads']}?${qs}`)
184
177
  }
185
178
 
186
179
  export const dbLocalBusinesses = (params) => {
@@ -190,7 +183,7 @@ export const dbLocalBusinesses = (params) => {
190
183
  if (Array.isArray(v)) v.forEach(x => qs.append(k, x))
191
184
  else qs.append(k, String(v))
192
185
  }
193
- return get(`/api/v1/database/local-businesses?${qs}`)
186
+ return get(`${ENDPOINTS['database-local-businesses']}?${qs}`)
194
187
  }
195
188
 
196
189
  export const dbEcommerce = (params) => {
@@ -200,7 +193,7 @@ export const dbEcommerce = (params) => {
200
193
  if (Array.isArray(v)) v.forEach(x => qs.append(k, x))
201
194
  else qs.append(k, String(v))
202
195
  }
203
- return get(`/api/v1/database/ecommerce?${qs}`)
196
+ return get(`${ENDPOINTS['database-ecommerce']}?${qs}`)
204
197
  }
205
198
 
206
199
  // ── Poll until done ───────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scrapercity",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "ScraperCity CLI & MCP Server - B2B lead generation for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,9 +36,13 @@
36
36
  "url": "https://github.com/scrapercity/scrapercity-cli"
37
37
  },
38
38
  "dependencies": {
39
- "@modelcontextprotocol/sdk": "^1.0.0"
39
+ "@modelcontextprotocol/sdk": "^1.30.0"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=18"
43
+ },
44
+ "scripts": {
45
+ "generate": "node scripts/generate.mjs",
46
+ "prepublishOnly": "node scripts/generate.mjs --check"
43
47
  }
44
48
  }