1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "rows": [
10 {
11 "company": "Stripe",
12 "website": "stripe.com",
13 "description": "Online payment processing platform for internet businesses.",
14 "address": "354 Oyster Point Blvd, South San Francisco, CA 94080, USA",
15 },
16 {
17 "company": "Bimbo",
18 "website": "grupobimbo.com",
19 "description": "Multinational bakery products manufacturer with brands like Bimbo, Marinela and Sara Lee.",
20 "address": "Prolongación Paseo de la Reforma 1000, Santa Fe, 01210 Ciudad de México, CDMX",
21 },
22 {
23 "company": "Shopify",
24 "website": "shopify.com",
25 "description": "Commerce platform that lets anyone start, manage and grow an online store.",
26 "address": "151 O'Connor St, Ottawa, ON K2P 2L8, Canada",
27 },
28 {
29 "company": "Mayo Clinic",
30 "website": "mayoclinic.org",
31 "description": "Nonprofit academic medical center focused on patient care, research and education.",
32 "address": "200 First St SW, Rochester, MN 55905, USA",
33 },
34 {
35 "company": "Siemens",
36 "website": "siemens.com",
37 "description": "Technology company focused on industry, infrastructure, mobility and healthcare.",
38 "address": "Werner-von-Siemens-Straße 1, 80333 München, Germany",
39 },
40 {
41 "company": "Cemex",
42 "website": "cemex.com",
43 "description": "Global building materials company producing cement, ready-mix concrete and aggregates.",
44 "address": "Av. Ricardo Margáin Zozaya 325, San Pedro Garza García, N.L., Mexico",
45 },
46 {
47 "company": "Duolingo",
48 "website": "duolingo.com",
49 "description": "Language-learning app with gamified lessons in 40+ languages.",
50 "address": "5900 Penn Ave, Pittsburgh, PA 15206, USA",
51 },
52 {
53 "company": "Zara (Inditex)",
54 "website": "inditex.com",
55 "description": "Fashion retailer operating Zara, Pull&Bear, Massimo Dutti and other apparel brands.",
56 "address": "Avenida de la Diputación, 15143 Arteixo, A Coruña, Spain",
57 },
58 {
59 "company": "Airbnb",
60 "website": "airbnb.com",
61 "description": "Online marketplace for short-term homestays and experiences.",
62 "address": "888 Brannan St, San Francisco, CA 94103, USA",
63 },
64 {
65 "company": "Tesla",
66 "website": "tesla.com",
67 "description": "Designs and manufactures electric vehicles, battery storage and solar products.",
68 "address": "1 Tesla Road, Austin, TX 78725, USA",
69 },
70 {
71 "company": "Rappi",
72 "website": "rappi.com",
73 "description": "Latin American on-demand delivery app for food, groceries and pharmacy.",
74 "address": "Calle 93 #19-58, Bogotá, Colombia",
75 },
76 {
77 "company": "Deloitte",
78 "website": "deloitte.com",
79 "description": "Professional services network providing audit, consulting, tax and advisory services.",
80 "address": "1 New Street Square, London EC4A 3HQ, United Kingdom",
81 },
82 ],
83 "columns": [
84 {
85 "name": "industry",
86 "instruction": "Classify the company's industry.",
87 "type": "enum",
88 "options": [
89 "Software & Internet",
90 "Fintech",
91 "Retail & E-commerce",
92 "Food & Beverage",
93 "Healthcare",
94 "Manufacturing & Industrial",
95 "Construction & Materials",
96 "Automotive",
97 "Travel & Hospitality",
98 "Education",
99 "Professional Services",
100 "Other",
101 ],
102 },
103 {
104 "name": "city",
105 "instruction": "Extract the city from the address. Return only the city name.",
106 "type": "text",
107 },
108 {
109 "name": "is_b2b",
110 "instruction": "True if the company mainly sells to other businesses (B2B). False if it mainly sells to consumers (B2C). Decide from the description; do not return null unless the description is missing.",
111 "type": "boolean",
112 },
113 {
114 "name": "lead_score",
115 "instruction": "Score from 1 to 10 how well this company fits as a potential customer for a B2B SaaS product (data, operations or automation software). 10 is an excellent fit (mid-market or enterprise software buyer). 1 is a poor fit (pure consumer brand with no likely software-buying team).",
116 "type": "number",
117 },
118 {
119 "name": "fit_reason",
120 "instruction": "One sentence in English (max 20 words) explaining the lead_score.",
121 "type": "text",
122 },
123 ],
124}
125
126
127run = client.actor("datatools-ai/ai-table-enricher").call(run_input=run_input)
128
129
130print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
131for item in client.dataset(run.default_dataset_id).iterate_items():
132 print(item)
133
134