1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://apify.com/louisdeconinck/ai-gpt-scraper"
13 ],
14 "fields": [
15 {
16 "name": "name",
17 "description": "The name/title of the scraper tool",
18 "type": "string"
19 },
20 {
21 "name": "price",
22 "description": "The price per 1000 results, only the number",
23 "type": "number"
24 },
25 {
26 "name": "author",
27 "description": "The author or maintainer of the scraper",
28 "type": "string"
29 }
30 ],
31 "cssSelector": "main",
32 "predefinedModel": "google/gemini-2.0-flash-001",
33 "useCustomModel": false,
34 "proxyConfiguration": {
35 "useApifyProxy": true
36 }
37};
38
39
40const run = await client.actor("louisdeconinck/ai-gpt-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50