scrapercity 1.0.6 → 1.0.8

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,16 +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
- export const apolloFilters = (filters) =>
87
- post('/api/v1/scrape/apollo-filters', filters)
85
+ post(ENDPOINTS['apollo'], { url, count, fileName })
88
86
 
89
87
  export const apolloStatus = () => get('/api/v1/apollo-status')
90
88
 
91
89
  // ── Maps ──────────────────────────────────────────────────────
92
90
  export const maps = (query, location, limit = 500) =>
93
- post('/api/v1/scrape/maps', {
91
+ post(ENDPOINTS['maps'], {
94
92
  searchStringsArray: Array.isArray(query) ? query : [query],
95
93
  locationQuery: location,
96
94
  maxCrawledPlacesPerSearch: limit
@@ -98,11 +96,11 @@ export const maps = (query, location, limit = 500) =>
98
96
 
99
97
  // ── Email Validator ───────────────────────────────────────────
100
98
  export const emailValidate = (emails) =>
101
- post('/api/v1/scrape/email-validator', { emails })
99
+ post(ENDPOINTS['email-validator'], { emails })
102
100
 
103
101
  // ── Email Finder ──────────────────────────────────────────────
104
102
  export const emailFind = (contacts, opts = {}) =>
105
- post('/api/v1/scrape/email-finder', {
103
+ post(ENDPOINTS['email-finder'], {
106
104
  contacts,
107
105
  autoValidateEmails: opts.validate || false,
108
106
  autoFindMobiles: opts.mobiles || false
@@ -110,64 +108,63 @@ export const emailFind = (contacts, opts = {}) =>
110
108
 
111
109
  // ── Mobile Finder ─────────────────────────────────────────────
112
110
  export const mobileFinder = (inputs) =>
113
- post('/api/v1/scrape/mobile-finder', { inputs })
111
+ post(ENDPOINTS['mobile-finder'], { inputs })
114
112
 
115
113
  // ── People Finder / Skip Trace ────────────────────────────────
116
114
  export const peopleFinder = (params) =>
117
- post('/api/v1/scrape/people-finder', params)
115
+ post(ENDPOINTS['skip-trace'], params)
118
116
 
119
117
  // ── Store Leads (Ecommerce) ───────────────────────────────────
120
118
  export const storeLeads = (params) =>
121
- post('/api/v1/scrape/store-leads', params)
119
+ post(ENDPOINTS['store-leads'], params)
122
120
 
123
121
  // ── BuiltWith ─────────────────────────────────────────────────
124
122
  export const builtwith = (technology, fileName) =>
125
- post('/api/v1/scrape/builtwith', { technology, fileName })
123
+ post(ENDPOINTS['builtwith'], { technology, fileName })
126
124
 
127
125
  // ── Criminal Records ──────────────────────────────────────────
128
126
  export const criminal = (name, state, dob) =>
129
- post('/api/v1/scrape/criminal-records', { name, state, dob })
127
+ post(ENDPOINTS['criminal-records'], { name, state, dob })
130
128
 
131
129
  // ── Airbnb Email ──────────────────────────────────────────────
132
130
  export const airbnb = (params) =>
133
- post('/api/v1/scrape/airbnb-email', params)
134
-
135
- // ── YouTube Email ─────────────────────────────────────────────
136
- export const youtubeEmail = (channels) =>
137
- post('/api/v1/scrape/youtube-email', { channels })
131
+ post(ENDPOINTS['airbnb-email'], params)
138
132
 
139
133
  // ── Website Finder ────────────────────────────────────────────
140
134
  export const websiteFinder = (domains, jobTitle) =>
141
- post('/api/v1/scrape/website-finder', { domains, jobTitle })
135
+ post(ENDPOINTS['website-finder'], { domains, jobTitle })
142
136
 
143
137
  // ── Yelp ──────────────────────────────────────────────────────
144
138
  export const yelp = (params) =>
145
- post('/api/v1/scrape/yelp-scraper', params)
139
+ post(ENDPOINTS['yelp-scraper'], params)
146
140
 
147
141
  // ── Angi (Angie's List) ──────────────────────────────────────
148
142
  export const angi = (keyword, zipCodes, maxItems = 100) =>
149
- post('/api/v1/scrape/angi-angies-list-scraper', { keyword, zipCodes, maxItems })
143
+ post(ENDPOINTS['angi-angies-list-scraper'], { keyword, zipCodes, maxItems })
150
144
 
151
145
  // ── Zillow Agents ─────────────────────────────────────────────
152
146
  export const zillowAgents = (location, opts = {}) =>
153
- post('/api/v1/scrape/zillow-agents', { location, ...opts })
147
+ post(ENDPOINTS['zillow-agents'], { location, ...opts })
154
148
 
155
149
  // ── BizBuySell ────────────────────────────────────────────────
156
150
  export const bizbuysell = (startUrls, maxItems = 100) =>
157
- post('/api/v1/scrape/bizbuysell-scraper', { startUrls, maxItems })
151
+ post(ENDPOINTS['bizbuysell-scraper'], { startUrls, maxItems })
158
152
 
159
153
  // ── Crexi ─────────────────────────────────────────────────────
160
154
  export const crexi = (startUrls) =>
161
- post('/api/v1/scrape/crexi-scraper', { startUrls })
155
+ post(ENDPOINTS['crexi-scraper'], { startUrls })
162
156
 
163
- // ── Property Lookup ───────────────────────────────────────────
164
- export const propertyLookup = (addresses, includeOwnerContact = false) =>
165
- post('/api/v1/scrape/property-lookup', { addresses, includeOwnerContact })
157
+ // ── Deal Finder (distressed properties) ──────────────────────
158
+ export const distressList = (params) =>
159
+ post(ENDPOINTS['distress-list'], params)
166
160
 
167
161
  // ── Generic Scraper (fallback for any slug) ───────────────────
168
162
  export const scrape = (slug, body) =>
169
163
  post(`/api/v1/scrape/${slug}`, body)
170
164
 
165
+ // ── Generic: POST args straight to a full endpoint (used by the MCP) ──
166
+ export const postEndpoint = (endpoint, body) => post(endpoint, body)
167
+
171
168
  // ── Databases ($649 plan) ─────────────────────────────────────
172
169
  export const dbLeads = (params) => {
173
170
  const qs = new URLSearchParams()
@@ -176,7 +173,7 @@ export const dbLeads = (params) => {
176
173
  if (Array.isArray(v)) v.forEach(x => qs.append(k, x))
177
174
  else qs.append(k, String(v))
178
175
  }
179
- return get(`/api/v1/database/leads?${qs}`)
176
+ return get(`${ENDPOINTS['database-leads']}?${qs}`)
180
177
  }
181
178
 
182
179
  export const dbLocalBusinesses = (params) => {
@@ -186,7 +183,7 @@ export const dbLocalBusinesses = (params) => {
186
183
  if (Array.isArray(v)) v.forEach(x => qs.append(k, x))
187
184
  else qs.append(k, String(v))
188
185
  }
189
- return get(`/api/v1/database/local-businesses?${qs}`)
186
+ return get(`${ENDPOINTS['database-local-businesses']}?${qs}`)
190
187
  }
191
188
 
192
189
  export const dbEcommerce = (params) => {
@@ -196,7 +193,7 @@ export const dbEcommerce = (params) => {
196
193
  if (Array.isArray(v)) v.forEach(x => qs.append(k, x))
197
194
  else qs.append(k, String(v))
198
195
  }
199
- return get(`/api/v1/database/ecommerce?${qs}`)
196
+ return get(`${ENDPOINTS['database-ecommerce']}?${qs}`)
200
197
  }
201
198
 
202
199
  // ── Poll until done ───────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scrapercity",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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
  }