$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "rows": [
< {
< "company": "Blue Door Bakery",
< "contact": "MARIA KHOURY",
< "phone": "03 123 456",
< "email": "Maria@BlueDoor.lb",
< "website": "www.bluedoor.lb/",
< "country": "lebanon",
< "added": "03/04/2024"
< },
< {
< "company": "Blue Door Bakery",
< "contact": "Khoury, Maria",
< "phone": "+961 3 123 456",
< "email": "maria@bluedoor.lb",
< "website": "https://bluedoor.lb",
< "country": "LB",
< "added": "2024-04-03"
< },
< {
< "company": "Cedar & Sons Ltd",
< "contact": "john smith jr",
< "phone": "+1 512 677 7667",
< "email": "orders@cedarsons.com",
< "website": "HTTP://CedarSons.com/?utm_source=newsletter",
< "country": "United States",
< "added": "March 5, 2024"
< },
< {
< "company": "CEDAR & SONS",
< "contact": "",
< "phone": "+1 (512) 677-7667",
< "email": "",
< "website": "cedarsons.com",
< "country": "USA",
< "added": ""
< },
< {
< "company": "Atlas Plumbing",
< "contact": "Dr. Rami Haddad",
< "phone": "71 555 888",
< "email": "",
< "website": "atlasplumbing.com.lb",
< "country": "Lebanon",
< "added": "12 Jan 2024"
< },
< {
< "company": "Atlas Plumbing SARL",
< "contact": "",
< "phone": "71555888",
< "email": "info@atlasplumbing.com.lb",
< "website": "",
< "country": "LB",
< "added": "N/A"
< },
< {
< "company": "Nile Dental Clinic",
< "contact": "Dr. Amira Hassan",
< "phone": "+20 100 123 4567",
< "email": "contact@niledental.eg",
< "website": "niledental.eg",
< "country": "Egypt",
< "added": "2024-01-12"
< },
< {
< "company": "Berlin Bike Shop GmbH",
< "contact": "Anna MÜLLER",
< "phone": "+49 30 901820",
< "email": "N/A",
< "website": "https://www.berlinbike.de/shop",
< "country": "Germany",
< "added": "2024-02-29"
< },
< {
< "company": "berlin bike shop",
< "contact": "",
< "phone": "+49 30 901820",
< "email": "info@berlinbike.de",
< "website": "berlinbike.de",
< "country": "DE",
< "added": ""
< },
< {
< "company": "Cafe Beirut",
< "contact": "",
< "phone": "not a number",
< "email": "hello@cafebeirut",
< "website": "cafebeirut.com",
< "country": "Lebanon",
< "added": "n/a"
< },
< {
< "company": "Sunrise Yoga",
< "contact": "Priya Patel",
< "phone": "+91 98765 43210",
< "email": "priya@sunriseyoga.in",
< "website": "sunriseyoga.in/",
< "country": "india",
< "added": "05/03/2024"
< },
< {
< "company": "",
< "contact": "",
< "phone": "",
< "email": "",
< "website": "",
< "country": "",
< "added": ""
< },
< {
< "company": "Sunrise Yoga Studio",
< "contact": "PRIYA PATEL",
< "phone": "",
< "email": "PRIYA@sunriseyoga.in",
< "website": "www.sunriseyoga.in",
< "country": "IN",
< "added": ""
< }
< ],
< "rules": [
< "*: trim",
< "company: title",
< "contact: split-name",
< "phone: phone country=LB",
< "email: email",
< "website: domain into=domain",
< "website: url",
< "country: country",
< "added: date"
< ],
< "defaultCountry": "LB",
< "dedupeBy": [
< "phone",
< "email"
< ],
< "dedupeMatch": "any",
< "keep": "most-complete",
< "dropEmptyColumns": true,
< "renameFields": {
< "company": "businessName"
< },
< "exportCsv": true
<}
<EOF
$curl "https://api.apify.com/v2/actors/opstoolkit~dataset-cleaner/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'