1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "records": [
12 {
13 "keyword": "seo audit tool",
14 "checkedAt": "2026-06-01T06:00:00Z",
15 "position": 4,
16 "searchVolume": 1000,
17 "url": "https://example.com/seo-audit-tool"
18 },
19 {
20 "keyword": "seo audit tool",
21 "checkedAt": "2026-06-02T06:00:00Z",
22 "position": 5,
23 "searchVolume": 1000,
24 "url": "https://example.com/seo-audit-tool"
25 },
26 {
27 "keyword": "seo audit tool",
28 "checkedAt": "2026-06-03T06:00:00Z",
29 "position": 7,
30 "searchVolume": 1000,
31 "url": "https://example.com/seo-audit-tool"
32 },
33 {
34 "keyword": "seo audit tool",
35 "checkedAt": "2026-06-04T06:00:00Z",
36 "position": 8,
37 "searchVolume": 1000,
38 "url": "https://example.com/seo-audit-tool"
39 },
40 {
41 "keyword": "seo audit tool",
42 "checkedAt": "2026-06-05T06:00:00Z",
43 "position": 10,
44 "searchVolume": 1000,
45 "url": "https://example.com/seo-audit-tool"
46 },
47 {
48 "keyword": "seo audit tool",
49 "checkedAt": "2026-06-06T06:00:00Z",
50 "position": 11,
51 "searchVolume": 1000,
52 "url": "https://example.com/seo-audit-tool"
53 },
54 {
55 "keyword": "seo audit tool",
56 "checkedAt": "2026-06-07T06:00:00Z",
57 "position": 12,
58 "searchVolume": 1000,
59 "url": "https://example.com/seo-audit-tool"
60 },
61 {
62 "keyword": "seo audit tool",
63 "checkedAt": "2026-06-08T06:00:00Z",
64 "position": 14,
65 "searchVolume": 1000,
66 "url": "https://example.com/seo-audit-tool"
67 },
68 {
69 "keyword": "seo audit tool",
70 "checkedAt": "2026-06-09T06:00:00Z",
71 "position": 15,
72 "searchVolume": 1000,
73 "url": "https://example.com/seo-audit-tool"
74 },
75 {
76 "keyword": "seo audit tool",
77 "checkedAt": "2026-06-10T06:00:00Z",
78 "position": 17,
79 "searchVolume": 1000,
80 "url": "https://example.com/seo-audit-tool"
81 },
82 {
83 "keyword": "seo audit tool",
84 "checkedAt": "2026-06-11T06:00:00Z",
85 "position": 18,
86 "searchVolume": 1000,
87 "url": "https://example.com/seo-audit-tool"
88 },
89 {
90 "keyword": "seo audit tool",
91 "checkedAt": "2026-06-12T06:00:00Z",
92 "position": 19,
93 "searchVolume": 1000,
94 "url": "https://example.com/seo-audit-tool"
95 },
96 {
97 "keyword": "seo audit tool",
98 "checkedAt": "2026-06-13T06:00:00Z",
99 "position": 21,
100 "searchVolume": 1000,
101 "url": "https://example.com/seo-audit-tool"
102 },
103 {
104 "keyword": "seo audit tool",
105 "checkedAt": "2026-06-14T06:00:00Z",
106 "position": 22,
107 "searchVolume": 1000,
108 "url": "https://example.com/seo-audit-tool"
109 },
110 {
111 "keyword": "rank tracker api",
112 "checkedAt": "2026-06-01T06:00:00Z",
113 "position": 3,
114 "searchVolume": 1100,
115 "url": "https://example.com/rank-tracker-api"
116 },
117 {
118 "keyword": "rank tracker api",
119 "checkedAt": "2026-06-02T06:00:00Z",
120 "position": 3,
121 "searchVolume": 1100,
122 "url": "https://example.com/rank-tracker-api"
123 },
124 {
125 "keyword": "rank tracker api",
126 "checkedAt": "2026-06-03T06:00:00Z",
127 "position": 3,
128 "searchVolume": 1100,
129 "url": "https://example.com/rank-tracker-api"
130 },
131 {
132 "keyword": "rank tracker api",
133 "checkedAt": "2026-06-04T06:00:00Z",
134 "position": 4,
135 "searchVolume": 1100,
136 "url": "https://example.com/rank-tracker-api"
137 },
138 {
139 "keyword": "rank tracker api",
140 "checkedAt": "2026-06-05T06:00:00Z",
141 "position": 3,
142 "searchVolume": 1100,
143 "url": "https://example.com/rank-tracker-api"
144 },
145 {
146 "keyword": "rank tracker api",
147 "checkedAt": "2026-06-06T06:00:00Z",
148 "position": 3,
149 "searchVolume": 1100,
150 "url": "https://example.com/rank-tracker-api"
151 },
152 {
153 "keyword": "rank tracker api",
154 "checkedAt": "2026-06-07T06:00:00Z",
155 "position": 4,
156 "searchVolume": 1100,
157 "url": "https://example.com/rank-tracker-api"
158 },
159 {
160 "keyword": "rank tracker api",
161 "checkedAt": "2026-06-08T06:00:00Z",
162 "position": 3,
163 "searchVolume": 1100,
164 "url": "https://example.com/rank-tracker-api"
165 },
166 {
167 "keyword": "rank tracker api",
168 "checkedAt": "2026-06-09T06:00:00Z",
169 "position": 12,
170 "searchVolume": 1100,
171 "url": "https://example.com/rank-tracker-api"
172 },
173 {
174 "keyword": "rank tracker api",
175 "checkedAt": "2026-06-10T06:00:00Z",
176 "position": 14,
177 "searchVolume": 1100,
178 "url": "https://example.com/rank-tracker-api"
179 },
180 {
181 "keyword": "rank tracker api",
182 "checkedAt": "2026-06-11T06:00:00Z",
183 "position": 15,
184 "searchVolume": 1100,
185 "url": "https://example.com/rank-tracker-api"
186 },
187 {
188 "keyword": "rank tracker api",
189 "checkedAt": "2026-06-12T06:00:00Z",
190 "position": 17,
191 "searchVolume": 1100,
192 "url": "https://example.com/rank-tracker-api"
193 },
194 {
195 "keyword": "rank tracker api",
196 "checkedAt": "2026-06-13T06:00:00Z",
197 "position": 18,
198 "searchVolume": 1100,
199 "url": "https://example.com/rank-tracker-api"
200 },
201 {
202 "keyword": "rank tracker api",
203 "checkedAt": "2026-06-14T06:00:00Z",
204 "position": 19,
205 "searchVolume": 1100,
206 "url": "https://example.com/rank-tracker-api"
207 },
208 {
209 "keyword": "ai content optimization",
210 "checkedAt": "2026-06-01T06:00:00Z",
211 "position": 18,
212 "searchVolume": 1700,
213 "url": "https://example.com/ai-content-optimization"
214 },
215 {
216 "keyword": "ai content optimization",
217 "checkedAt": "2026-06-02T06:00:00Z",
218 "position": 17,
219 "searchVolume": 1700,
220 "url": "https://example.com/ai-content-optimization"
221 },
222 {
223 "keyword": "ai content optimization",
224 "checkedAt": "2026-06-03T06:00:00Z",
225 "position": 16,
226 "searchVolume": 1700,
227 "url": "https://example.com/ai-content-optimization"
228 },
229 {
230 "keyword": "ai content optimization",
231 "checkedAt": "2026-06-04T06:00:00Z",
232 "position": 16,
233 "searchVolume": 1700,
234 "url": "https://example.com/ai-content-optimization"
235 },
236 {
237 "keyword": "ai content optimization",
238 "checkedAt": "2026-06-05T06:00:00Z",
239 "position": 15,
240 "searchVolume": 1700,
241 "url": "https://example.com/ai-content-optimization"
242 },
243 {
244 "keyword": "ai content optimization",
245 "checkedAt": "2026-06-06T06:00:00Z",
246 "position": 13,
247 "searchVolume": 1700,
248 "url": "https://example.com/ai-content-optimization"
249 },
250 {
251 "keyword": "ai content optimization",
252 "checkedAt": "2026-06-07T06:00:00Z",
253 "position": 12,
254 "searchVolume": 1700,
255 "url": "https://example.com/ai-content-optimization"
256 },
257 {
258 "keyword": "ai content optimization",
259 "checkedAt": "2026-06-08T06:00:00Z",
260 "position": 11,
261 "searchVolume": 1700,
262 "url": "https://example.com/ai-content-optimization"
263 },
264 {
265 "keyword": "ai content optimization",
266 "checkedAt": "2026-06-09T06:00:00Z",
267 "position": 10,
268 "searchVolume": 1700,
269 "url": "https://example.com/ai-content-optimization"
270 },
271 {
272 "keyword": "ai content optimization",
273 "checkedAt": "2026-06-10T06:00:00Z",
274 "position": 9,
275 "searchVolume": 1700,
276 "url": "https://example.com/ai-content-optimization"
277 },
278 {
279 "keyword": "ai content optimization",
280 "checkedAt": "2026-06-11T06:00:00Z",
281 "position": 8,
282 "searchVolume": 1700,
283 "url": "https://example.com/ai-content-optimization"
284 },
285 {
286 "keyword": "ai content optimization",
287 "checkedAt": "2026-06-12T06:00:00Z",
288 "position": 8,
289 "searchVolume": 1700,
290 "url": "https://example.com/ai-content-optimization"
291 },
292 {
293 "keyword": "ai content optimization",
294 "checkedAt": "2026-06-13T06:00:00Z",
295 "position": 7,
296 "searchVolume": 1700,
297 "url": "https://example.com/ai-content-optimization"
298 },
299 {
300 "keyword": "ai content optimization",
301 "checkedAt": "2026-06-14T06:00:00Z",
302 "position": 6,
303 "searchVolume": 1700,
304 "url": "https://example.com/ai-content-optimization"
305 },
306 {
307 "keyword": "free backlink checker",
308 "checkedAt": "2026-06-01T06:00:00Z",
309 "position": 12,
310 "searchVolume": 1400,
311 "url": "https://example.com/free-backlink-checker"
312 },
313 {
314 "keyword": "free backlink checker",
315 "checkedAt": "2026-06-02T06:00:00Z",
316 "position": 15,
317 "searchVolume": 1400,
318 "url": "https://example.com/free-backlink-checker"
319 },
320 {
321 "keyword": "free backlink checker",
322 "checkedAt": "2026-06-03T06:00:00Z",
323 "position": 10,
324 "searchVolume": 1400,
325 "url": "https://example.com/free-backlink-checker"
326 },
327 {
328 "keyword": "free backlink checker",
329 "checkedAt": "2026-06-04T06:00:00Z",
330 "position": 14,
331 "searchVolume": 1400,
332 "url": "https://example.com/free-backlink-checker"
333 },
334 {
335 "keyword": "free backlink checker",
336 "checkedAt": "2026-06-05T06:00:00Z",
337 "position": 9,
338 "searchVolume": 1400,
339 "url": "https://example.com/free-backlink-checker"
340 },
341 {
342 "keyword": "free backlink checker",
343 "checkedAt": "2026-06-06T06:00:00Z",
344 "position": 13,
345 "searchVolume": 1400,
346 "url": "https://example.com/free-backlink-checker"
347 },
348 {
349 "keyword": "free backlink checker",
350 "checkedAt": "2026-06-07T06:00:00Z",
351 "position": 16,
352 "searchVolume": 1400,
353 "url": "https://example.com/free-backlink-checker"
354 },
355 {
356 "keyword": "free backlink checker",
357 "checkedAt": "2026-06-08T06:00:00Z",
358 "position": 11,
359 "searchVolume": 1400,
360 "url": "https://example.com/free-backlink-checker"
361 },
362 {
363 "keyword": "free backlink checker",
364 "checkedAt": "2026-06-09T06:00:00Z",
365 "position": 12,
366 "searchVolume": 1400,
367 "url": "https://example.com/free-backlink-checker"
368 },
369 {
370 "keyword": "free backlink checker",
371 "checkedAt": "2026-06-10T06:00:00Z",
372 "position": 9,
373 "searchVolume": 1400,
374 "url": "https://example.com/free-backlink-checker"
375 },
376 {
377 "keyword": "free backlink checker",
378 "checkedAt": "2026-06-11T06:00:00Z",
379 "position": 15,
380 "searchVolume": 1400,
381 "url": "https://example.com/free-backlink-checker"
382 },
383 {
384 "keyword": "free backlink checker",
385 "checkedAt": "2026-06-12T06:00:00Z",
386 "position": 13,
387 "searchVolume": 1400,
388 "url": "https://example.com/free-backlink-checker"
389 },
390 {
391 "keyword": "free backlink checker",
392 "checkedAt": "2026-06-13T06:00:00Z",
393 "position": 10,
394 "searchVolume": 1400,
395 "url": "https://example.com/free-backlink-checker"
396 },
397 {
398 "keyword": "free backlink checker",
399 "checkedAt": "2026-06-14T06:00:00Z",
400 "position": 14,
401 "searchVolume": 1400,
402 "url": "https://example.com/free-backlink-checker"
403 },
404 {
405 "keyword": "keyword research software",
406 "checkedAt": "2026-06-01T06:00:00Z",
407 "position": 5,
408 "searchVolume": 1800,
409 "url": "https://example.com/keyword-research-software"
410 },
411 {
412 "keyword": "keyword research software",
413 "checkedAt": "2026-06-02T06:00:00Z",
414 "position": 6,
415 "searchVolume": 1800,
416 "url": "https://example.com/keyword-research-software"
417 },
418 {
419 "keyword": "keyword research software",
420 "checkedAt": "2026-06-03T06:00:00Z",
421 "position": 5,
422 "searchVolume": 1800,
423 "url": "https://example.com/keyword-research-software"
424 },
425 {
426 "keyword": "keyword research software",
427 "checkedAt": "2026-06-04T06:00:00Z",
428 "position": 5,
429 "searchVolume": 1800,
430 "url": "https://example.com/keyword-research-software"
431 },
432 {
433 "keyword": "keyword research software",
434 "checkedAt": "2026-06-05T06:00:00Z",
435 "position": 6,
436 "searchVolume": 1800,
437 "url": "https://example.com/keyword-research-software"
438 },
439 {
440 "keyword": "keyword research software",
441 "checkedAt": "2026-06-06T06:00:00Z",
442 "position": 5,
443 "searchVolume": 1800,
444 "url": "https://example.com/keyword-research-software"
445 },
446 {
447 "keyword": "keyword research software",
448 "checkedAt": "2026-06-07T06:00:00Z",
449 "position": 4,
450 "searchVolume": 1800,
451 "url": "https://example.com/keyword-research-software"
452 },
453 {
454 "keyword": "keyword research software",
455 "checkedAt": "2026-06-08T06:00:00Z",
456 "position": 5,
457 "searchVolume": 1800,
458 "url": "https://example.com/keyword-research-software"
459 },
460 {
461 "keyword": "keyword research software",
462 "checkedAt": "2026-06-09T06:00:00Z",
463 "position": 6,
464 "searchVolume": 1800,
465 "url": "https://example.com/keyword-research-software"
466 },
467 {
468 "keyword": "keyword research software",
469 "checkedAt": "2026-06-10T06:00:00Z",
470 "position": 5,
471 "searchVolume": 1800,
472 "url": "https://example.com/keyword-research-software"
473 },
474 {
475 "keyword": "keyword research software",
476 "checkedAt": "2026-06-11T06:00:00Z",
477 "position": 5,
478 "searchVolume": 1800,
479 "url": "https://example.com/keyword-research-software"
480 },
481 {
482 "keyword": "keyword research software",
483 "checkedAt": "2026-06-12T06:00:00Z",
484 "position": 6,
485 "searchVolume": 1800,
486 "url": "https://example.com/keyword-research-software"
487 },
488 {
489 "keyword": "keyword research software",
490 "checkedAt": "2026-06-13T06:00:00Z",
491 "position": 5,
492 "searchVolume": 1800,
493 "url": "https://example.com/keyword-research-software"
494 },
495 {
496 "keyword": "keyword research software",
497 "checkedAt": "2026-06-14T06:00:00Z",
498 "position": 6,
499 "searchVolume": 1800,
500 "url": "https://example.com/keyword-research-software"
501 }
502 ],
503 "timestampField": "checkedAt",
504 "groupBy": [
505 "keyword"
506 ],
507 "metrics": [
508 {
509 "field": "searchVolume",
510 "type": "higher_is_better"
511 },
512 {
513 "field": "position",
514 "type": "lower_is_better",
515 "lowerIsBetter": true
516 }
517 ],
518 "forecastEngine": "baseline",
519 "tasks": [
520 "volatility_flagging",
521 "anomaly_detection",
522 "action_prioritization",
523 "joint_demand_ranking"
524 ]
525};
526
527
528const run = await client.actor("solutionssmart/predictive-seo-intelligence").call(input);
529
530
531console.log('Results from dataset');
532console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
533const { items } = await client.dataset(run.defaultDatasetId).listItems();
534items.forEach((item) => {
535 console.dir(item);
536});
537
538