1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "derive",
12 "lens": {
13 "matching_modes": {
14 "framing": {
15 "flexibility": {
16 "lexical_markers": [
17 "your own schedule",
18 "whenever you want",
19 "decide when"
20 ]
21 },
22 "earnings": {
23 "lexical_markers": [
24 "earn",
25 "per week",
26 "take home"
27 ]
28 },
29 "onboarding": {
30 "lexical_markers": [
31 "sign up",
32 "no experience",
33 "get started"
34 ]
35 }
36 }
37 },
38 "exemplars": {}
39 },
40 "say": "You set your own schedule. Earn up to $1,200 per week. Sign up in minutes with no experience needed. The dispatcher assigns your route each morning and you cannot decline it.",
41 "question": "What does the current evidence say about this question?",
42 "documents": [
43 "You set your own schedule and decide when to work.",
44 "Work whenever you want with total flexibility.",
45 "Earn up to $1,200 per week driving with us.",
46 "Sign up in minutes. No experience needed."
47 ]
48};
49
50
51const run = await client.actor("equ1n0x/codebook-loop").call(input);
52
53
54console.log('Results from dataset');
55console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
56const { items } = await client.dataset(run.defaultDatasetId).listItems();
57items.forEach((item) => {
58 console.dir(item);
59});
60
61