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