1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "targetUrl": "https://citedcart.com",
12 "startUrls": [
13 {
14 "url": "https://citedcart.com"
15 }
16 ],
17 "pages": [
18 "/"
19 ],
20 "visitCount": 5,
21 "maxConcurrency": 2,
22 "dwellTimeSecs": 6,
23 "aiGoal": "Explore featured products, tools, pricing, or guides like an engaged organic visitor.",
24 "searchQuery": "ecommerce seo visibility audit",
25 "scenarioSteps": [
26 {
27 "type": "goto",
28 "value": "/",
29 "label": "Open landing page"
30 },
31 {
32 "type": "dismiss_overlays",
33 "label": "Accept cookie/consent banner if present"
34 },
35 {
36 "type": "human_browse",
37 "value": 5000,
38 "label": "Biometric mouse & reading scroll"
39 },
40 {
41 "type": "play_video",
42 "label": "Verify on-page video playback if present"
43 },
44 {
45 "type": "ai_explore",
46 "label": "AI autonomous page discovery (Playbook Cached)"
47 }
48 ],
49 "countryCode": "US",
50 "proxyConfiguration": {
51 "useApifyProxy": true
52 }
53};
54
55
56const run = await client.actor("hirepulse/website-traffic-generator").call(input);
57
58
59console.log('Results from dataset');
60console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
61const { items } = await client.dataset(run.defaultDatasetId).listItems();
62items.forEach((item) => {
63 console.dir(item);
64});
65
66