scrapeless-mcp-server 0.3.0 → 0.4.0

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.
@@ -0,0 +1,74 @@
1
+ import { defineTool, wrapMcpResponse } from "../utils.js";
2
+ import z from "zod";
3
+ export const googleScholar = defineTool({
4
+ name: 'google_scholar',
5
+ description: `Search for academic papers on Google Scholar.
6
+ Restrictions: Activated only for academic or scientific research queries.
7
+ Valid: Find papers by "Yoshua Bengio" on deep learning.
8
+ Invalid: Search for news articles about "Yoshua Bengio" (use google_search).`,
9
+ inputSchema: {
10
+ q: z
11
+ .string()
12
+ .describe('Parameter defines the query you want to search. You can also use helpers in your query such as: author:, or source:. Usage of cites parameter makes q optional. Usage of cites together with q triggers search within citing articles. Usage of cluster together with q and cites parameters is prohibited. Use cluster parameter only.')
13
+ .default('Coffee'),
14
+ cites: z
15
+ .string()
16
+ .describe('Parameter defines unique ID for an article to trigger Cited By searches. Usage of cites will bring up a list of citing documents in Google Scholar. Example value: cites=1275980731835430123. Usage of cites and q parameters triggers search within citing articles.')
17
+ .optional(),
18
+ as_ylo: z
19
+ .string()
20
+ .describe('Parameter defines the year from which you want the results to be included. (e.g. if you set as_ylo parameter to the year 2018, the results before that year will be omitted.). This parameter can be combined with the as_yhi parameter.')
21
+ .optional(),
22
+ as_yhi: z
23
+ .string()
24
+ .describe('Parameter defines the year until which you want the results to be included. (e.g. if you set as_yhi parameter to the year 2018, the results after that year will be omitted.). This parameter can be combined with the as_ylo parameter.')
25
+ .optional(),
26
+ scisbd: z
27
+ .string()
28
+ .describe('Parameter defines articles added in the last year, sorted by date. It can be set to 1 to include only abstracts, or 2 to include everything. The default value is 0 which means that the articles are sorted by relevance.')
29
+ .optional(),
30
+ cluster: z.string().describe('Versions Of').optional(),
31
+ hl: z.string().describe('Language').default('en'),
32
+ author_id: z.string().describe('Show in google.scholar result').optional(),
33
+ citation_id: z
34
+ .string()
35
+ .describe('Parameter is used for retrieving individual article citation. It is a required parameter when view_op=view_citation is selected. You can access IDs inside our structured JSON response.')
36
+ .optional(),
37
+ view_op: z
38
+ .union([
39
+ z.literal('view_citation').describe('View Citation'),
40
+ z.literal('list_colleagues').describe('View List Colleagues')
41
+ ])
42
+ .describe('Parameter is used for viewing specific parts of a page. It has two options: view_citation - Select to view citations. citation_id is required. list_colleagues - Select to view all co-authors')
43
+ .optional(),
44
+ lr: z.string().describe('Set Multiple Languages').optional(),
45
+ start: z.string().describe('Result Offset').optional(),
46
+ num: z.string().describe('Number of Results').optional(),
47
+ as_sdt: z
48
+ .union([z.literal('1').describe('Abstracts'), z.literal('2').describe('Everything')])
49
+ .describe('Search Type / Filter')
50
+ .optional(),
51
+ safe: z
52
+ .union([z.literal('active').describe('Active'), z.literal('off').describe('Off')])
53
+ .describe('Adult Content Filtering')
54
+ .optional(),
55
+ filter: z
56
+ .union([z.literal('1').describe('On'), z.literal('0').describe('Off')])
57
+ .describe('Results Filtering')
58
+ .optional(),
59
+ as_vis: z
60
+ .union([z.literal('1').describe('On'), z.literal('0').describe('Off')])
61
+ .describe('Show Citations')
62
+ .optional(),
63
+ as_rr: z
64
+ .union([z.literal('1').describe('On'), z.literal('0').describe('Off')])
65
+ .describe('Show Only Review Articles')
66
+ .optional()
67
+ },
68
+ handle: async (params, client) => {
69
+ return wrapMcpResponse(() => client.deepserp.scrape({
70
+ actor: 'scraper.google.scholar',
71
+ input: params
72
+ }));
73
+ }
74
+ });
@@ -0,0 +1,269 @@
1
+ import { defineTool, wrapMcpResponse } from "../utils.js";
2
+ import z from "zod";
3
+ export const googleSearch = defineTool({
4
+ name: 'google-search',
5
+ description: 'Universal Information Search Engine.Retrieves any data information; Explanatory queries (why, how).Comparative analysis requests',
6
+ inputSchema: {
7
+ q: z
8
+ .string()
9
+ .describe('Parameter defines the query you want to search. You can use anything that you would use in a regular Google search. e.g. inurl:, site:, intitle:. We also support advanced search query parameters such as as_dt and as_eq.')
10
+ .default('Top news headlines'),
11
+ hl: z
12
+ .string()
13
+ .describe("Parameter defines the language to use for the Google search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French).")
14
+ .default('en'),
15
+ gl: z
16
+ .string()
17
+ .describe("Parameter defines the country to use for the Google search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France).")
18
+ .default('us'),
19
+ google_domain: z
20
+ .union([
21
+ z.literal('google.com'),
22
+ z.literal('google.ad'),
23
+ z.literal('google.ae'),
24
+ z.literal('google.com.af'),
25
+ z.literal('google.com.ag'),
26
+ z.literal('google.com.ai'),
27
+ z.literal('google.al'),
28
+ z.literal('google.am'),
29
+ z.literal('google.co.ao'),
30
+ z.literal('google.com.ar'),
31
+ z.literal('google.as'),
32
+ z.literal('google.at'),
33
+ z.literal('google.com.au'),
34
+ z.literal('google.az'),
35
+ z.literal('google.ba'),
36
+ z.literal('google.com.bd'),
37
+ z.literal('google.be'),
38
+ z.literal('google.bf'),
39
+ z.literal('google.bg'),
40
+ z.literal('google.com.bh'),
41
+ z.literal('google.bi'),
42
+ z.literal('google.bj'),
43
+ z.literal('google.com.bn'),
44
+ z.literal('google.com.bo'),
45
+ z.literal('google.com.br'),
46
+ z.literal('google.bs'),
47
+ z.literal('google.bt'),
48
+ z.literal('google.co.bw'),
49
+ z.literal('google.by'),
50
+ z.literal('google.com.bz'),
51
+ z.literal('google.ca'),
52
+ z.literal('google.com.kh'),
53
+ z.literal('google.cd'),
54
+ z.literal('google.cf'),
55
+ z.literal('google.cg'),
56
+ z.literal('google.ch'),
57
+ z.literal('google.ci'),
58
+ z.literal('google.co.ck'),
59
+ z.literal('google.cl'),
60
+ z.literal('google.cm'),
61
+ z.literal('google.com.co'),
62
+ z.literal('google.co.cr'),
63
+ z.literal('google.com.cu'),
64
+ z.literal('google.cv'),
65
+ z.literal('google.com.cy'),
66
+ z.literal('google.cz'),
67
+ z.literal('google.de'),
68
+ z.literal('google.dj'),
69
+ z.literal('google.dk'),
70
+ z.literal('google.dm'),
71
+ z.literal('google.com.do'),
72
+ z.literal('google.dz'),
73
+ z.literal('google.com.ec'),
74
+ z.literal('google.ee'),
75
+ z.literal('google.com.eg'),
76
+ z.literal('google.es'),
77
+ z.literal('google.com.et'),
78
+ z.literal('google.fi'),
79
+ z.literal('google.fm'),
80
+ z.literal('google.com.fj'),
81
+ z.literal('google.fr'),
82
+ z.literal('google.ga'),
83
+ z.literal('google.ge'),
84
+ z.literal('google.com.gh'),
85
+ z.literal('google.com.gi'),
86
+ z.literal('google.gl'),
87
+ z.literal('google.gm'),
88
+ z.literal('google.gp'),
89
+ z.literal('google.gr'),
90
+ z.literal('google.com.gt'),
91
+ z.literal('google.gy'),
92
+ z.literal('google.com.hk'),
93
+ z.literal('google.hn'),
94
+ z.literal('google.hr'),
95
+ z.literal('google.ht'),
96
+ z.literal('google.hu'),
97
+ z.literal('google.co.id'),
98
+ z.literal('google.iq'),
99
+ z.literal('google.ie'),
100
+ z.literal('google.co.il'),
101
+ z.literal('google.co.in'),
102
+ z.literal('google.is'),
103
+ z.literal('google.it'),
104
+ z.literal('google.je'),
105
+ z.literal('google.com.jm'),
106
+ z.literal('google.jo'),
107
+ z.literal('google.co.jp'),
108
+ z.literal('google.co.ke'),
109
+ z.literal('google.ki'),
110
+ z.literal('google.kg'),
111
+ z.literal('google.co.kr'),
112
+ z.literal('google.com.kw'),
113
+ z.literal('google.kz'),
114
+ z.literal('google.la'),
115
+ z.literal('google.com.lb'),
116
+ z.literal('google.li'),
117
+ z.literal('google.lk'),
118
+ z.literal('google.co.ls'),
119
+ z.literal('google.lt'),
120
+ z.literal('google.lu'),
121
+ z.literal('google.lv'),
122
+ z.literal('google.com.ly'),
123
+ z.literal('google.co.ma'),
124
+ z.literal('google.md'),
125
+ z.literal('google.mg'),
126
+ z.literal('google.mk'),
127
+ z.literal('google.ml'),
128
+ z.literal('google.com.mm'),
129
+ z.literal('google.mn'),
130
+ z.literal('google.ms'),
131
+ z.literal('google.com.mt'),
132
+ z.literal('google.mu'),
133
+ z.literal('google.mv'),
134
+ z.literal('google.mw'),
135
+ z.literal('google.com.mx'),
136
+ z.literal('google.com.my'),
137
+ z.literal('google.co.mz'),
138
+ z.literal('google.com.na'),
139
+ z.literal('google.ne'),
140
+ z.literal('google.com.ng'),
141
+ z.literal('google.com.ni'),
142
+ z.literal('google.nl'),
143
+ z.literal('google.no'),
144
+ z.literal('google.com.np'),
145
+ z.literal('google.nr'),
146
+ z.literal('google.nu'),
147
+ z.literal('google.co.nz'),
148
+ z.literal('google.com.om'),
149
+ z.literal('google.com.pk'),
150
+ z.literal('google.com.pa'),
151
+ z.literal('google.com.pe'),
152
+ z.literal('google.com.ph'),
153
+ z.literal('google.pl'),
154
+ z.literal('google.com.pg'),
155
+ z.literal('google.com.pr'),
156
+ z.literal('google.ps'),
157
+ z.literal('google.pt'),
158
+ z.literal('google.com.py'),
159
+ z.literal('google.com.qa'),
160
+ z.literal('google.ro'),
161
+ z.literal('google.rs'),
162
+ z.literal('google.ru'),
163
+ z.literal('google.rw'),
164
+ z.literal('google.com.sa'),
165
+ z.literal('google.com.sb'),
166
+ z.literal('google.sc'),
167
+ z.literal('google.se'),
168
+ z.literal('google.com.sg'),
169
+ z.literal('google.sh'),
170
+ z.literal('google.si'),
171
+ z.literal('google.sk'),
172
+ z.literal('google.com.sl'),
173
+ z.literal('google.sn'),
174
+ z.literal('google.sm'),
175
+ z.literal('google.so'),
176
+ z.literal('google.sr'),
177
+ z.literal('google.com.sv'),
178
+ z.literal('google.td'),
179
+ z.literal('google.tg'),
180
+ z.literal('google.co.th'),
181
+ z.literal('google.com.tj'),
182
+ z.literal('google.tk'),
183
+ z.literal('google.tl'),
184
+ z.literal('google.tm'),
185
+ z.literal('google.tn'),
186
+ z.literal('google.to'),
187
+ z.literal('google.com.tr'),
188
+ z.literal('google.tt'),
189
+ z.literal('google.com.tw'),
190
+ z.literal('google.co.tz'),
191
+ z.literal('google.com.ua'),
192
+ z.literal('google.co.ug'),
193
+ z.literal('google.co.uk'),
194
+ z.literal('google.com.uy'),
195
+ z.literal('google.co.uz'),
196
+ z.literal('google.com.vc'),
197
+ z.literal('google.co.ve'),
198
+ z.literal('google.vg'),
199
+ z.literal('google.co.vi'),
200
+ z.literal('google.com.vn'),
201
+ z.literal('google.vu'),
202
+ z.literal('google.ws')
203
+ ])
204
+ .describe('Parameter defines the Google domain to use. It defaults to google.com.')
205
+ .default('google.com'),
206
+ start: z
207
+ .number()
208
+ .describe("Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.).")
209
+ .default(0),
210
+ num: z
211
+ .number()
212
+ .describe('Parameter defines the maximum number of results to return. (e.g., 10 (default) returns 10 results, 40 returns 40 results, and 100 returns 100 results).')
213
+ .default(10),
214
+ ludocid: z
215
+ .string()
216
+ .describe('Parameter defines the id (CID) of the Google My Business listing you want to scrape. Also known as Google Place ID.')
217
+ .optional(),
218
+ kgmid: z
219
+ .string()
220
+ .describe('Parameter defines the id (KGMID) of the Google Knowledge Graph listing you want to scrape. Also known as Google Knowledge Graph ID. Searches with kgmid parameter will return results for the originally encrypted search parameters. For some searches, kgmid may override all other parameters except start, and num parameters.')
221
+ .optional(),
222
+ ibp: z
223
+ .string()
224
+ .describe('Parameter is responsible for rendering layouts and expansions for some elements (e.g., gwp;0,7 to expand searches with ludocid for expanded knowledge graph).')
225
+ .optional(),
226
+ cr: z
227
+ .string()
228
+ .describe('Parameter defines one or multiple countries to limit the search to. It uses country{two-letter upper-case country code} to specify countries and | as a delimiter. (e.g., countryFR|countryDE will only search French and German pages).')
229
+ .optional(),
230
+ lr: z
231
+ .string()
232
+ .describe('Parameter defines one or multiple languages to limit the search to. It uses lang_{two-letter language code} to specify languages and | as a delimiter. (e.g., lang_fr|lang_de will only search French and German pages).')
233
+ .optional(),
234
+ tbs: z
235
+ .string()
236
+ .describe("(to be searched) parameter defines advanced search parameters that aren't possible in the regular query field. (e.g., advanced search for patents, dates, news, videos, images, apps, or text contents).")
237
+ .optional(),
238
+ safe: z
239
+ .union([z.literal('active').describe('Active'), z.literal('off').describe('Off')])
240
+ .optional()
241
+ .describe('Parameter defines the level of filtering for adult content. It can be set to active or off, by default Google will blur explicit content.'),
242
+ nfpr: z
243
+ .union([z.literal('1').describe('1'), z.literal('0').describe('0')])
244
+ .optional()
245
+ .describe('Parameter defines the exclusion of results from an auto-corrected query when the original query is spelled wrong. It can be set to 1 to exclude these results, or 0 to include them (default). Note that this parameter may not prevent Google from returning results for an auto-corrected query if no other results are available.'),
246
+ filter: z
247
+ .union([z.literal('1').describe('1(enable filters)'), z.literal('0').describe('0(disable filters)')])
248
+ .optional()
249
+ .describe("Parameter defines if the filters for 'Similar Results' and 'Omitted Results' are on or off. It can be set to 1 (default) to enable these filters, or 0 to disable these filters."),
250
+ tbm: z
251
+ .union([
252
+ z.literal('isch').describe('isch - Google Images'),
253
+ z.literal('lcl').describe('lcl - Google Local'),
254
+ z.literal('nws').describe('nws - Google News'),
255
+ z.literal('shop').describe('shop - Google Shopping'),
256
+ z.literal('vid').describe('vid - Google Videos'),
257
+ z.literal('pts').describe('pts - Google Patents'),
258
+ z.literal('jobs').describe('jobs - Google Jobs')
259
+ ])
260
+ .optional()
261
+ .describe('(to be matched) parameter defines the type of search you want to do.\n\nIt can be set to:\n(no tbm parameter): regular Google Search,\nisch: Google Images API,\nlcl - Google Local API\nvid: Google Videos API,\nnws: Google News API,\nshop: Google Shopping API,\npts: Google Patents API,\nor any other Google service.')
262
+ },
263
+ handle: async (params, client) => {
264
+ return wrapMcpResponse(() => client.deepserp.scrape({
265
+ actor: 'scraper.google.search',
266
+ input: params
267
+ }));
268
+ }
269
+ });
@@ -0,0 +1,208 @@
1
+ import { defineTool, wrapMcpResponse } from "../utils.js";
2
+ import z from "zod";
3
+ export const googleTrends = defineTool({
4
+ name: 'google_trends',
5
+ description: `Get trending search data from Google Trends.
6
+ Restrictions: Activated for queries about trends, popularity, or interest over time.
7
+ Valid: Find the search interest for "AI" over the last year.
8
+ Invalid: A general question like "What is AI?" (use google_search).`,
9
+ inputSchema: {
10
+ q: z
11
+ .string()
12
+ .describe('Parameter defines the query or queries you want to search. You can use anything that you would use in a regular Google Trends search. The maximum number of queries per search is 5 (this only applies to interest_over_time and compared_breakdown_by_region data_type, other types of data will only accept 1 query per search).')
13
+ .default('Mercedes-Benz,BMW X5'),
14
+ data_type: z
15
+ .union([
16
+ z.literal('autocomplete').describe('Auto complete'),
17
+ z.literal('interest_over_time').describe('Interest over time'),
18
+ z.literal('compared_breakdown_by_region').describe('Compared breakdown by region'),
19
+ z.literal('interest_by_subregion').describe('Interest by region'),
20
+ z.literal('related_queries').describe('Related queries'),
21
+ z.literal('related_topics').describe('Related topics')
22
+ ])
23
+ .describe('The supported types are: autocomplete,interest_over_time,compared_breakdown_by_region,interest_by_subregion,related_queries,related_topics.')
24
+ .default('interest_over_time'),
25
+ date: z
26
+ .string()
27
+ .describe('The supported dates are: now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all.\n\nYou can also pass custom values:\n\nDates from 2004 to present: yyyy-mm-dd yyyy-mm-dd (e.g. 2021-10-15 2022-05-25)\nDates with hours within a week range: yyyy-mm-ddThh yyyy-mm-ddThh (e.g. 2022-05-19T10 2022-05-24T22). Hours will be calculated depending on the tz (time zone) parameter.')
28
+ .default('today 1-m'),
29
+ hl: z
30
+ .string()
31
+ .describe("Parameter defines the language to use for the Google Trends search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French).")
32
+ .default('en'),
33
+ tz: z.string().describe('time zone offset. default is 420.').default('420'),
34
+ geo: z
35
+ .union([
36
+ z.literal(''),
37
+ z.literal('AR'),
38
+ z.literal('AU'),
39
+ z.literal('AT'),
40
+ z.literal('BE'),
41
+ z.literal('BR'),
42
+ z.literal('CA'),
43
+ z.literal('CL'),
44
+ z.literal('CO'),
45
+ z.literal('CZ'),
46
+ z.literal('DK'),
47
+ z.literal('EG'),
48
+ z.literal('FI'),
49
+ z.literal('FR'),
50
+ z.literal('DE'),
51
+ z.literal('GR'),
52
+ z.literal('HK'),
53
+ z.literal('HU'),
54
+ z.literal('IN'),
55
+ z.literal('ID'),
56
+ z.literal('IE'),
57
+ z.literal('IL'),
58
+ z.literal('IT'),
59
+ z.literal('JP'),
60
+ z.literal('KE'),
61
+ z.literal('MY'),
62
+ z.literal('MX'),
63
+ z.literal('NL'),
64
+ z.literal('NZ'),
65
+ z.literal('NG'),
66
+ z.literal('NO'),
67
+ z.literal('PE'),
68
+ z.literal('PH'),
69
+ z.literal('PL'),
70
+ z.literal('PT'),
71
+ z.literal('RO'),
72
+ z.literal('RU'),
73
+ z.literal('SA'),
74
+ z.literal('SG'),
75
+ z.literal('ZA'),
76
+ z.literal('KR'),
77
+ z.literal('ES'),
78
+ z.literal('SE'),
79
+ z.literal('CH'),
80
+ z.literal('TW'),
81
+ z.literal('TH'),
82
+ z.literal('TR'),
83
+ z.literal('UA'),
84
+ z.literal('GB'),
85
+ z.literal('US'),
86
+ z.literal('VN')
87
+ ])
88
+ .describe('Parameter defines the location from where you want the search to originate. It defaults to Worldwide (activated when the value of geo parameter is not set or empty).')
89
+ .optional(),
90
+ cat: z
91
+ .union([
92
+ z.literal('0').describe('All categories'),
93
+ z.literal('3').describe('Arts & Entertainment'),
94
+ z.literal('5').describe('Computers & Electronics'),
95
+ z.literal('7').describe('Finance'),
96
+ z.literal('8').describe('Games'),
97
+ z.literal('11').describe('Home & Garden'),
98
+ z.literal('12').describe('Business & Industrial'),
99
+ z.literal('13').describe('Internet & Telecom'),
100
+ z.literal('14').describe('People & Society'),
101
+ z.literal('16').describe('News'),
102
+ z.literal('18').describe('Shopping'),
103
+ z.literal('19').describe('Law & Government'),
104
+ z.literal('20').describe('Sports'),
105
+ z.literal('22').describe('Books & Literature'),
106
+ z.literal('23').describe('Performing Arts'),
107
+ z.literal('24').describe('Visual Art & Design'),
108
+ z.literal('25').describe('Advertising & Marketing'),
109
+ z.literal('28').describe('Office Services'),
110
+ z.literal('29').describe('Real Estate'),
111
+ z.literal('30').describe('Computer Hardware'),
112
+ z.literal('31').describe('Programming'),
113
+ z.literal('32').describe('Software'),
114
+ z.literal('33').describe('Offbeat'),
115
+ z.literal('34').describe('Movies'),
116
+ z.literal('35').describe('Music & Audio'),
117
+ z.literal('36').describe('TV & Video'),
118
+ z.literal('37').describe('Banking'),
119
+ z.literal('38').describe('Insurance'),
120
+ z.literal('39').describe('Card Games'),
121
+ z.literal('41').describe('Computer & Video Games'),
122
+ z.literal('42').describe('Jazz'),
123
+ z.literal('43').describe('Online Goodies'),
124
+ z.literal('44').describe('Beauty & Fitness'),
125
+ z.literal('45').describe('Health'),
126
+ z.literal('46').describe('Agriculture & Forestry'),
127
+ z.literal('47').describe('Autos & Vehicles'),
128
+ z.literal('48').describe('Construction & Maintenance'),
129
+ z.literal('49').describe('Manufacturing'),
130
+ z.literal('50').describe('Transportation & Logistics'),
131
+ z.literal('53').describe('Web Hosting & Domain Registration'),
132
+ z.literal('54').describe('Social Issues & Advocacy'),
133
+ z.literal('55').describe('Dating & Personals'),
134
+ z.literal('56').describe('Ethnic & Identity Groups'),
135
+ z.literal('57').describe('Charity & Philanthropy'),
136
+ z.literal('58').describe('Parenting'),
137
+ z.literal('59').describe('Religion & Belief'),
138
+ z.literal('60').describe('Jobs'),
139
+ z.literal('61').describe('Classifieds'),
140
+ z.literal('63').describe('Weather'),
141
+ z.literal('64').describe('Antiques & Collectibles'),
142
+ z.literal('65').describe('Hobbies & Leisure'),
143
+ z.literal('66').describe('Pets & Animals'),
144
+ z.literal('67').describe('Travel'),
145
+ z.literal('68').describe('Apparel'),
146
+ z.literal('69').describe('Consumer Resources'),
147
+ z.literal('70').describe('Gifts & Special Event Items'),
148
+ z.literal('71').describe('Food & Drink'),
149
+ z.literal('73').describe('Mass Merchants & Department Stores'),
150
+ z.literal('74').describe('Education'),
151
+ z.literal('75').describe('Legal'),
152
+ z.literal('76').describe('Government'),
153
+ z.literal('77').describe('Enterprise Technology'),
154
+ z.literal('78').describe('Consumer Electronics'),
155
+ z.literal('82').describe('Environmental Issues'),
156
+ z.literal('83').describe('Marketing Services'),
157
+ z.literal('84').describe('Search Engine Optimization & Marketing'),
158
+ z.literal('89').describe('Vehicle Parts & Accessories'),
159
+ z.literal('91').describe('Stereo Systems & Components'),
160
+ z.literal('93').describe('Skin & Nail Care'),
161
+ z.literal('94').describe('Fitness'),
162
+ z.literal('95').describe('Office Supplies'),
163
+ z.literal('96').describe('Real Estate Agencies'),
164
+ z.literal('97').describe('Consumer Advocacy & Protection'),
165
+ z.literal('98').describe('Fashion Designers & Collections'),
166
+ z.literal('99').describe('Gifts'),
167
+ z.literal('100').describe('Cards & Greetings'),
168
+ z.literal('101').describe('Spirituality'),
169
+ z.literal('102').describe('Personals'),
170
+ z.literal('104').describe('ISPs'),
171
+ z.literal('105').describe('Online Games'),
172
+ z.literal('107').describe('Investing'),
173
+ z.literal('108').describe('Language Resources'),
174
+ z.literal('112').describe('Broadcast & Network News'),
175
+ z.literal('113').describe('Gay-Lesbian-Bisexual-Transgender'),
176
+ z.literal('115').describe('Baby Care & Hygiene'),
177
+ z.literal('118').describe('Water Sports'),
178
+ z.literal('119').describe('Wildlife'),
179
+ z.literal('120').describe('Cookware & Diningware'),
180
+ z.literal('121').describe('Grocery & Food Retailers'),
181
+ z.literal('122').describe('Cooking & Recipes'),
182
+ z.literal('123').describe('Tobacco Products'),
183
+ z.literal('124').describe('Clothing Accessories'),
184
+ z.literal('137').describe('Homemaking & Interior Decor'),
185
+ z.literal('138').describe('Vehicle Maintenance'),
186
+ z.literal('143').describe('Face & Body Care'),
187
+ z.literal('144').describe('Unwanted Body & Facial Hair Removal'),
188
+ z.literal('145').describe('Spas & Beauty Services'),
189
+ z.literal('146').describe('Hair Care'),
190
+ z.literal('147').describe('Cosmetology & Beauty Professionals'),
191
+ z.literal('148').describe('Off-Road Vehicles'),
192
+ z.literal('154').describe('Kids & Teens'),
193
+ z.literal('157').describe('Human Resources'),
194
+ z.literal('158').describe('Home Improvement'),
195
+ z.literal('166').describe('Public Safety'),
196
+ z.literal('168').describe('Emergency Services'),
197
+ z.literal('170').describe('Vehicle Licensing & Registration')
198
+ ])
199
+ .describe('Parameter is used to define a search category. The default value is set to 0 ("All categories").')
200
+ .default('0')
201
+ },
202
+ handle: async (params, client) => {
203
+ return wrapMcpResponse(() => client.deepserp.scrape({
204
+ actor: 'scraper.google.trends',
205
+ input: params
206
+ }));
207
+ }
208
+ });
@@ -0,0 +1,7 @@
1
+ export * from './deepserp/googleFlights.js';
2
+ export * from './deepserp/googleSearch.js';
3
+ export * from './deepserp/googleTrends.js';
4
+ export * from './deepserp/googleScholar.js';
5
+ export * from './universal/scrapeHtml.js';
6
+ export * from './universal/scrapeMarkdown.js';
7
+ export * from './universal/scrapeScreenshot.js';
@@ -0,0 +1,22 @@
1
+ import { defineTool, wrapMcpResponse } from "../utils.js";
2
+ import z from "zod";
3
+ export const scrapeHtml = defineTool({
4
+ name: 'scrape_html',
5
+ description: `Scrape a URL and return its full HTML content.
6
+ Restrictions: Activated for URLs that require JavaScript rendering or bot protection.
7
+ Valid: Get HTML from a dynamic, JS-heavy single-page application.
8
+ Invalid: Fetching a simple static page (use a standard HTTP client).`,
9
+ inputSchema: {
10
+ url: z.string().url().describe('target URL'),
11
+ },
12
+ handle: async (params, client) => {
13
+ return wrapMcpResponse(() => client.universal.scrape({
14
+ actor: 'unlocker.webunlocker',
15
+ input: {
16
+ url: params.url,
17
+ js_render: true,
18
+ response_type: 'html'
19
+ }
20
+ }));
21
+ }
22
+ });
@@ -0,0 +1,22 @@
1
+ import { defineTool, wrapMcpResponse } from "../utils.js";
2
+ import z from "zod";
3
+ export const scrapeMarkdown = defineTool({
4
+ name: 'scrape_markdown',
5
+ description: `Scrape a URL and return its content as Markdown.
6
+ Restrictions: Best for articles, blog posts, and other text-heavy pages.
7
+ Valid: Scrape a news article to get its readable content.
8
+ Invalid: Scrape a complex web application dashboard.`,
9
+ inputSchema: {
10
+ url: z.string().url().describe('target URL'),
11
+ },
12
+ handle: async (params, client) => {
13
+ return wrapMcpResponse(() => client.universal.scrape({
14
+ actor: 'unlocker.webunlocker',
15
+ input: {
16
+ url: params.url,
17
+ js_render: true,
18
+ response_type: 'markdown'
19
+ }
20
+ }));
21
+ }
22
+ });
@@ -0,0 +1,48 @@
1
+ import { defineTool } from "../utils.js";
2
+ import z from "zod";
3
+ export const scrapeScreenshot = defineTool({
4
+ name: 'scrape_screenshot',
5
+ description: `Capture a high-quality screenshot of any webpage.
6
+ Restrictions: Bypasses bot detection and CAPTCHAs using residential proxies.
7
+ Valid: Get a screenshot of a price-checker page protected by Cloudflare.
8
+ Invalid: Taking a screenshot of the local browser (use browser_screenshot)`,
9
+ inputSchema: {
10
+ url: z.string().url().describe('target URL'),
11
+ },
12
+ handle: async (params, client) => {
13
+ try {
14
+ const result = await client.universal.scrape({
15
+ actor: 'unlocker.webunlocker',
16
+ input: {
17
+ url: params.url,
18
+ js_render: true,
19
+ response_type: "png",
20
+ response_image_full_page: true
21
+ }
22
+ });
23
+ return {
24
+ content: [
25
+ {
26
+ type: "image",
27
+ data: result,
28
+ mimeType: "image/png",
29
+ },
30
+ {
31
+ type: "text",
32
+ text: result,
33
+ }
34
+ ],
35
+ };
36
+ }
37
+ catch (error) {
38
+ return {
39
+ content: [
40
+ {
41
+ type: "text",
42
+ text: `Failed to fetch data. Error: ${error.message}`,
43
+ },
44
+ ],
45
+ };
46
+ }
47
+ }
48
+ });