1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "websiteUrls": [
12 "https://www.example.com"
13 ],
14 "bots": [
15 "GPTBot",
16 "OAI-SearchBot",
17 "ChatGPT-User",
18 "ClaudeBot",
19 "Claude-User",
20 "Claude-SearchBot",
21 "PerplexityBot",
22 "Perplexity-User",
23 "Google-Extended",
24 "Applebot-Extended",
25 "meta-externalagent",
26 "Bytespider",
27 "Amazonbot",
28 "CCBot",
29 "cohere-ai"
30 ]
31};
32
33
34const run = await client.actor("persistent_violet_qhb/ai-crawler-audit-1").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44