1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "queries": [
13 "developpeur"
14 ],
15 "location": "Paris",
16 "radius": 10,
17 "publishedDate": "Last Week",
18 "contractType": [
19 "Permanent contract (CDI) | CDI"
20 ],
21 "contractDuration": [
22 "Full-time | Temps plein"
23 ],
24 "jobCategory": [
25 "IT | Informatique, Télécommunication"
26 ],
27 "minSalary": 0,
28 "experience": [],
29 "seniority": [],
30 "onlyFranceTravail": false,
31 "inclusiveEmployer": false,
32 "adaptedCompany": false,
33 "sortBy": "Newest | Date",
34 "urls": [
35 "https://candidat.francetravail.fr/offres/recherche?motsCles=developpeur",
36 "https://candidat.francetravail.fr/offres/recherche?motsCles=developpeur&lieux=75D&offresPartenaires=true&range=0-19&rayon=10&tri=0",
37 "https://candidat.francetravail.fr/offres/recherche?motsCles=developpeur&range=20-39",
38 "https://candidat.francetravail.fr/offres/recherche?typeContrat=CDI&lieux=69D&tri=1",
39 "https://candidat.francetravail.fr/offres/recherche?domaine=M&motsCles=cariste&departement=69",
40 "https://candidat.francetravail.fr/offres/recherche/detail/215PPHG",
41 "https://candidat.francetravail.fr/offres/recherche/detail/8265879",
42 "https://candidat.pole-emploi.fr/offres/recherche?motsCles=comptable"
43 ],
44 "maxItems": 20,
45 "maxPages": 0,
46 "fetchDetails": true,
47 "proxy": {
48 "useApifyProxy": true
49 },
50 "incrementalMode": false,
51 "emitUnchanged": false,
52 "emitExpired": false
53};
54
55
56const run = await client.actor("abotapi/francetravail-fr-scraper").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