# Migrate from NeverBounce to Tomba

This guide will help you seamlessly transition from NeverBounce to Tomba's email verification service, offering better accuracy, more data attributes, and competitive pricing.

---

## Why Choose Tomba Over NeverBounce?

| Feature                    | NeverBounce             | Tomba                                                             |
| -------------------------- | ----------------------- | ----------------------------------------------------------------- |
| **Accuracy**               | 95-98%                  | 99%+                                                              |
| **Pricing**                | $0.008 per email        | More competitive rates                                            |
| **Catchall Detection**     | Basic                   | Advanced with confidence scoring                                  |
| **Speed**                  | Fast                    | Ultra-fast with optimized infrastructure                          |
| **Bulk Verification**      | Yes                     | Yes, with better batch processing                                 |
| **API Access**             | REST API                | REST API + MCP integration                                        |
| **Data Attributes**        | Basic verification data | Rich attributes including SMTP provider, MX records, risk scoring |
| **Real-time Verification** | Yes                     | Yes, with 3-month smart caching                                   |
| **Webmail Detection**      | Limited                 | Advanced with provider identification                             |

---

## Key Advantages of Tomba

### 1. Superior Accuracy

Tomba achieves 99%+ accuracy through:

- Multi-layered verification process
- Real-time SMTP checks
- Advanced pattern recognition
- Machine learning algorithms

### 2. Better Pricing

- More cost-effective per verification
- No hidden fees
- Flexible credit-based system
- Credits roll over monthly

### 3. Advanced Catchall Detection

- Confidence scoring for catch-all domains
- Risk assessment for accept-all addresses
- Better decision-making data

### 4. Faster Processing

- Optimized infrastructure for speed
- Parallel processing for bulk operations
- Smart caching for instant results

### 5. Richer Data Attributes

Tomba returns comprehensive verification data including 15+ attributes:

- `status`: valid, invalid, accept_all, webmail, disposable, unknown
- `result`: deliverable, undeliverable, risky
- `score`: Confidence score (0-100)
- `smtp_provider`: Email service provider identification (e.g., "Google Workspace")
- `mx`: Complete MX records array
- `mx_check`: MX record validation
- `smtp_server`: SMTP server availability
- `smtp_check`: SMTP validation status
- `accept_all`: Catch-all domain detection
- `disposable`: Temporary email detection
- `webmail`: Public email provider detection
- `block`: Blacklist status
- `gibberish`: Random pattern detection
- `greylisted`: Greylisting detection
- `regex`: Email format validation
- `whois`: Domain registration details (registrar, creation date, referral URL)
- `sources`: Array of sources where email was found (URI, website, dates, availability)

**Example comprehensive response:**

```json
{
    "data": {
        "email": {
            "email": "dayna.winter@shopify.com",
            "result": "deliverable",
            "status": "valid",
            "score": 99,
            "smtp_provider": "Google Workspace",
            "mx": {
                "records": [
                    "aspmx.l.google.com",
                    "alt1.aspmx.l.google.com",
                    "alt2.aspmx.l.google.com",
                    "alt4.aspmx.l.google.com",
                    "alt3.aspmx.l.google.com"
                ]
            },
            "mx_check": true,
            "smtp_server": true,
            "smtp_check": true,
            "accept_all": true,
            "greylisted": false,
            "block": false,
            "gibberish": false,
            "disposable": false,
            "webmail": false,
            "regex": true,
            "whois": {
                "registrar_name": "markmonitor inc.",
                "referral_url": "http://www.markmonitor.com",
                "created_date": "2005-03-11T06:18:03+01:00"
            }
        },
        "sources": [
            {
                "uri": "https://www.shopify.com/blog/black-friday-cyber-monday-shopify-apps",
                "website_url": "www.shopify.com",
                "extracted_on": "2022-11-07T13:16:42+01:00",
                "last_seen_on": "2022-11-07T13:16:42+01:00",
                "still_on_page": true
            }
        ]
    }
}
```

---

## Migration Steps

### Step 1: Get Your Tomba API Credentials

1. Sign up at [app.tomba.io](https://app.tomba.io)
2. Navigate to **API** → **API Keys**
3. Copy your **API Key** and **Secret Key**

### Step 2: Update API Endpoints

**NeverBounce endpoint:**

```
POST https://api.neverbounce.com/v4/single/check
```

**Tomba endpoint:**

```
GET https://api.tomba.io/v1/email-verifier?email={email}
```

### Step 3: Update Authentication

**NeverBounce authentication:**

```javascript
{
  "key": "your_neverbounce_key",
  "email": "test@example.com"
}
```

**Tomba authentication:**

```javascript
// Headers
{
  "X-Tomba-Key": "your_api_key",
  "X-Tomba-Secret": "your_secret_key"
}
```

### Step 4: Update Response Mapping

**NeverBounce response:**

```json
{
    "status": "success",
    "result": "valid",
    "flags": ["has_dns", "has_known_bounces"],
    "suggested_correction": "",
    "execution_time": 208
}
```

**Tomba response:**

```json
{
    "data": {
        "email": "test@example.com",
        "status": "valid",
        "result": "deliverable",
        "score": 100,
        "regex": true,
        "mx_records": true,
        "smtp_server": true,
        "smtp_check": true,
        "smtp_provider": "Google Workspace",
        "accept_all": false,
        "block": false,
        "disposable": false,
        "webmail": false
    }
}
```

---

## Code Migration Examples

### Node.js

**Before (NeverBounce):**

```javascript
const axios = require("axios");

async function verifyEmail(email) {
    const response = await axios.post(
        "https://api.neverbounce.com/v4/single/check",
        {
            key: process.env.NEVERBOUNCE_KEY,
            email: email,
        },
    );

    return response.data.result;
}
```

**After (Tomba):**

```javascript
const axios = require("axios");

async function verifyEmail(email) {
    const response = await axios.get(`https://api.tomba.io/v1/email-verifier`, {
        params: { email: email },
        headers: {
            "X-Tomba-Key": process.env.TOMBA_KEY,
            "X-Tomba-Secret": process.env.TOMBA_SECRET,
        },
    });

    return response.data.data;
}
```

### Python

**Before (NeverBounce):**

```python
import requests

def verify_email(email):
    response = requests.post(
        'https://api.neverbounce.com/v4/single/check',
        json={
            'key': os.environ['NEVERBOUNCE_KEY'],
            'email': email
        }
    )
    return response.json()['result']
```

**After (Tomba):**

```python
import requests

def verify_email(email):
    response = requests.get(
        'https://api.tomba.io/v1/email-verifier',
        params={'email': email},
        headers={
            'X-Tomba-Key': os.environ['TOMBA_KEY'],
            'X-Tomba-Secret': os.environ['TOMBA_SECRET']
        }
    )
    return response.json()['data']
```

### PHP

**Before (NeverBounce):**

```php
<?php
function verifyEmail($email) {
    $data = [
        'key' => $_ENV['NEVERBOUNCE_KEY'],
        'email' => $email
    ];

    $ch = curl_init('https://api.neverbounce.com/v4/single/check');
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
    curl_close($ch);

    return json_decode($response)->result;
}
```

**After (Tomba):**

```php
<?php
function verifyEmail($email) {
    $ch = curl_init('https://api.tomba.io/v1/email-verifier?email=' . urlencode($email));
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'X-Tomba-Key: ' . $_ENV['TOMBA_KEY'],
        'X-Tomba-Secret: ' . $_ENV['TOMBA_SECRET']
    ]);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
    curl_close($ch);

    return json_decode($response)->data;
}
```

---

## Status Mapping

| NeverBounce Status | Tomba Status | Tomba Result    |
| ------------------ | ------------ | --------------- |
| `valid`            | `valid`      | `deliverable`   |
| `invalid`          | `invalid`    | `undeliverable` |
| `disposable`       | `disposable` | `undeliverable` |
| `catchall`         | `accept_all` | `risky`         |
| `unknown`          | `unknown`    | `risky`         |

---

## Bulk Verification Migration

**NeverBounce bulk process:**

1. Upload CSV file
2. Wait for processing
3. Download results

**Tomba bulk process:**

1. Use bulk verification API endpoint
2. Real-time or batch processing

```javascript
// Tomba Bulk Verification
const bulkVerify = async (emails) => {
    const response = await axios.post(
        "https://api.tomba.io/v1/bulk/email-verifier",
        { emails: emails },
        {
            headers: {
                "X-Tomba-Key": process.env.TOMBA_KEY,
                "X-Tomba-Secret": process.env.TOMBA_SECRET,
            },
        },
    );

    return response.data;
};
```

---

## Testing Your Migration

1. **Run parallel tests**: Verify the same emails with both services
2. **Compare results**: Check accuracy and data completeness
3. **Performance testing**: Measure response times
4. **Cost analysis**: Calculate actual costs per verification
5. **Gradual rollout**: Start with a small percentage of traffic

---

## Support and Resources

- [Tomba API Documentation](https://docs.tomba.io)
- [Email Verifier Attributes](https://docs.tomba.io/attributes/verifier)
- [Bulk Verification Guide](https://docs.tomba.io/bulks/email-verifier)
- [Support Portal](https://help.tomba.io)

Need help with migration? Contact our support team for personalized assistance.

---

## FAQ

**Q: Will I lose any features by switching?**
A: No, Tomba provides all NeverBounce features plus additional data attributes and insights.

**Q: How long does migration take?**
A: Most migrations can be completed in under an hour with our straightforward API.

**Q: Can I test before fully migrating?**
A: Yes! Sign up for a free account with 25 verifications to test the service.

**Q: What about my existing credits?**
A: Plan your transition timing to use remaining NeverBounce credits before switching.

**Q: Do you offer migration support?**
A: Yes, our team can help with code review and migration assistance for enterprise customers.
