1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "csvContent": """Handle,Title,Body (HTML),Vendor,Type,Tags,Published,Option1 Name,Option1 Value,Variant SKU,Variant Grams,Variant Inventory Qty,Variant Inventory Policy,Variant Fulfillment Service,Variant Price,Variant Compare At Price,Variant Requires Shipping,Variant Taxable,Variant Barcode,Image Src,Image Position,Status
9cafe-mug,Café Mug,<p>Stoneware mug</p>,Acme,Mugs,\"mug, coffee\",TRUE,Title,Default Title,MUG-001,350,12,deny,manual,$12.50,,TRUE,TRUE,1.23457E+12,https://drive.google.com/file/d/1AbCdEfGhIjK/view?usp=sharing,1,active
10cafe-mug,,,,,,,,,,,,deny,manual,12.50,,TRUE,TRUE,,https://cdn.example.com/mug-back.jpg,2,
11Mug Big,Big Mug,<p>Large mug</p>,Acme,Mugs,mug,yes,Size,Large,MUG-001,500,5,deny,manual,\"12,50\",,TRUE,TRUE,36000291452,https://cdn.example.com/big mug.jpg,1,Active
12tee,Basic Tee,<p>Cotton tee</p>,Acme,Shirts,tee,TRUE,Size,S,TEE-S,200,3,deny,manual,9.99,8.00,TRUE,TRUE,,https://cdn.example.com/tee.jpg,1,active
13tee,,,,,,,,S,TEE-S2,200,4,deny,manual,9.99,,TRUE,TRUE,,,,
14""" }
15
16
17run = client.actor("naricky/product-csv-import-validator").call(run_input=run_input)
18
19
20print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
21for item in client.dataset(run.default_dataset_id).iterate_items():
22 print(item)
23
24