1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "baseUrl": "gemini",
12 "model": "gemini-2.5-flash",
13 "serpDatasetId": "",
14 "queries": `"seeking subcontractors" "custom home" OR "remodel" "Washington"
15"roofing subcontractor needed" OR "roofing crew wanted" "Washington"
16"looking for framing crew" OR "framing subcontractor needed" "WA"
17"drywall subcontractor needed" OR "drywall crew wanted" "King County" OR "Snohomish"
18"subcontractors wanted" "residential" "Seattle" OR "Tacoma" OR "Bellevue"
19"subcontractor opportunities" "residential" "Washington state"`
20};
21
22
23const run = await client.actor("deep_zinc/leads-construccion-wa").call(input);
24
25
26console.log('Results from dataset');
27console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
28const { items } = await client.dataset(run.defaultDatasetId).listItems();
29items.forEach((item) => {
30 console.dir(item);
31});
32
33