# Bulk BIC / SWIFT Code Validator (`bite-sized-insights/bulk-bic-swift-code-validator`) Actor

Validate BIC / SWIFT codes in bulk. Checks the structure and country of every code and returns the normalized form plus institution, country, location and branch parts. Offline format check, no bank or institution lookup.

- **URL**: https://apify.com/bite-sized-insights/bulk-bic-swift-code-validator.md
- **Developed by:** [bite-sized-insights](https://apify.com/bite-sized-insights) (community)
- **Categories:** Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.39 / 1,000 apify-default-dataset-items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

***Validate BIC / SWIFT codes in bulk - check the structure and the country of every code and get the compact upper-case form plus the institution, country, location and branch parts.***

Provide a list of BIC (SWIFT) codes in any common written format and get back one structured record per code: whether it is valid, the clean upper-case form to import, and its parts - institution code, country, location code and branch code. An invalid code gets a short reason. Typos, wrong lengths and unknown country codes are caught before a payment or onboarding record is saved.

No login required. No cookies needed. Pay-per-event pricing.

### Why Choose This Actor?

**"Check every BIC / SWIFT code in your list before it goes into a payment or a supplier record"**

Our Bulk BIC Validator provides:

- **Structure and Country Check**: 8 or 11 characters, the right letters and digits in each position, and a known country code
- **Clean Normalized Form**: `normalized_bic` is the compact upper-case code, ready for imports and payment files
- **Parts Split Out**: `institution_code`, `country_code`, `location_code` and `branch_code` for valid codes (`branch_code` is null for 8-character codes)
- **Forgiving Input**: spaces, dashes and lower case are ignored, and surrounding whitespace is trimmed
- **Reasons for Failures**: every invalid code comes back with a short explanation instead of being dropped
- **Bad Entries Never Stop the Run**: a value that is not text or an empty line comes back as a result with `is_valid: false` and a `reason`
- **Cost-Effective**: Pay only for the codes you validate: `$0.60 / 1k BICs`
- **No Third-Party Dependency**: runs entirely offline on bundled country data - no upstream service to fail or rate-limit you, and your list never leaves the run

### Quick Start

```json
{
  "bics": ["DEUTDEFF500", "NWBKGB2L", "DEUTXXFF"]
}
```

### Usage Examples

#### Clean Up a Supplier Bank Details List

```json
{
  "bics": ["deut de ff", "NWBK-GB-2L", "BNPAFRPP", "COBADEFFXXX"]
}
```

Use `normalized_bic` for your system and the part fields to group codes by country.

#### Pair It With IBAN Checks

Validate the BICs here and the matching account numbers with the [IBAN validator](https://apify.com/bite-sized-insights/validator-iban), or both in one run with the [mixed validator](https://apify.com/bite-sized-insights/bulk-email-phone-iban-bic-validator).

### Output Example

```json
{
  "bic": "DEUTDEFF500",
  "normalized_bic": "DEUTDEFF500",
  "institution_code": "DEUT",
  "country_code": "DE",
  "location_code": "FF",
  "branch_code": "500",
  "is_valid": true,
  "reason": null
}
```

```json
{
  "bic": "NWBKGB2L",
  "normalized_bic": "NWBKGB2L",
  "institution_code": "NWBK",
  "country_code": "GB",
  "location_code": "2L",
  "branch_code": null,
  "is_valid": true,
  "reason": null
}
```

```json
{
  "bic": "DEUTXXFF",
  "normalized_bic": "DEUTXXFF",
  "institution_code": null,
  "country_code": null,
  "location_code": null,
  "branch_code": null,
  "is_valid": false,
  "reason": "One of the parts of the number are invalid or unknown."
}
```

### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `bics` | array | Yes | 1-100,000 BIC / SWIFT codes (max 32 characters each) |

### Output Fields

| Field | Type | Description |
|-------|------|--------------|
| `bic` | string | The BIC exactly as provided in the input |
| `normalized_bic` | null/string | Compact upper-case form with spaces and separators removed; null only for an empty value |
| `institution_code` | null/string | First four characters; valid BICs only |
| `country_code` | null/string | Two-letter country code; valid BICs only |
| `location_code` | null/string | Two-character location code; valid BICs only |
| `branch_code` | null/string | Three-character branch code; null for 8-character BICs and invalid codes |
| `is_valid` | boolean | Whether the structure and the country are valid |
| `reason` | null/string | Short explanation when the BIC is not valid, otherwise null |

### Pricing

| Cost | Description |
|------|-------------|
| $0.0001 / start | Charged per actor run |
| $0.60 / 1,000 BICs | Charged per BIC validated, valid or not |

| Description | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|
| Charged per BIC validated | $0.60 / 1,000 BICs | $0.57 / 1,000 BICs | $0.51 / 1,000 BICs | $0.39 / 1,000 BICs |

Gold, Platinum and Diamond share one price. The price depends on your Apify subscription plan and applies automatically.

BICs that could not be checked are not charged: they are left out of the dataset and listed in the `FAILED_RECORDS` record of the run's key-value store, and the run ends with a message so you can retry them.

### API Integration

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/bite-sized-insights~validator-bic/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "bics": ["DEUTDEFF500", "DEUTXXFF"]
  }'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("bite-sized-insights/validator-bic").call(
    run_input={"bics": ["DEUTDEFF500", "DEUTXXFF"]}
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['bic']}: valid={item['is_valid']} country={item['country_code']} ({item['reason']})")
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('bite-sized-insights/validator-bic').call({
    bics: ['DEUTDEFF500', 'DEUTXXFF'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
    console.log(`${item.bic}: valid=${item.is_valid} country=${item.country_code} (${item.reason})`);
});
```

### Use Cases

- **Supplier and Payee Onboarding**: Catch mistyped BIC / SWIFT codes before an international payment is rejected
- **Payment File Preparation**: Check the BICs of a batch before it goes to your bank
- **Data Migration**: Normalize bank fields to one compact upper-case format
- **Form and Import Checks**: Batch-validate codes collected through forms, spreadsheets or CSV exports
- **Reporting**: Split valid codes into institution, country, location and branch for grouping

### FAQ

#### Does this check that the bank exists?

No. The checks cover structure and a known country code. A well-formed BIC can still belong to no institution, a closed bank or a different bank than you expect. There is no bank or institution lookup and no name or address data; use a SWIFT directory if you need that.

#### What does a valid BIC look like?

Eight or eleven characters: four letters for the institution, two letters for the country, two letters or digits for the location and, optionally, three letters or digits for the branch (`XXX` is accepted as a branch code). The country must be a known country code.

#### Which input formats are accepted?

Upper or lower case, with spaces or dashes inside the code, and with surrounding whitespace. `bic` always echoes your input as provided; `normalized_bic` is the compact upper-case form.

#### What happens to an empty entry or something that is not text?

The run continues. The result has `is_valid: false` and a `reason` such as `Empty BIC`, and it is counted like any other BIC.

#### Are the results in the same order as my input?

Yes. Result number N always belongs to BIC number N of the input.

#### Is my list stored or shared anywhere?

No. Input is processed for the duration of the run only and results are written to your own private run dataset, same as any other Apify actor.

### Free plan

Free-plan users get 5 runs in total. Each free run validates only the first 10 BICs of your input (the rest is ignored without an error) and returns at most 10 results. Console test runs have the same cap.

### Related Actors

- [IBAN validator](https://apify.com/bite-sized-insights/validator-iban) - Check length, structure and check digits of IBANs.
- [email, phone, IBAN and BIC validator](https://apify.com/bite-sized-insights/bulk-email-phone-iban-bic-validator) - Mixed validators in one run.
- [Bulk Email Validator & Verifier](https://apify.com/bite-sized-insights/validator-email) - Find invalid and risky addresses.
- [check phone numbers in bulk](https://apify.com/bite-sized-insights/validator-phone) - Normalize to E.164 and detect line types.

### Disclaimer

This actor validates BIC / SWIFT codes against structure and country rules. It does not contact any bank or SWIFT directory and cannot confirm that an institution exists. Country data changes over time; results reflect the data bundled with the current version of the actor.

***

**Need help?** Open an issue on the actor's repository or contact support through Apify Console.

# Actor input Schema

## `bics` (type: `array`):

BIC / SWIFT codes to validate. Spaces and dashes inside a value are ignored. Free and test runs take the first 10.

## Actor input object example

```json
{
  "bics": [
    "DEUTDEFF500",
    "NWBKGB2L",
    "DEUTXXFF"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Per-code results: validity, normalized form, institution, country, location and branch parts

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "bics": [
        "DEUTDEFF500",
        "NWBKGB2L",
        "DEUTXXFF"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bite-sized-insights/bulk-bic-swift-code-validator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "bics": [
        "DEUTDEFF500",
        "NWBKGB2L",
        "DEUTXXFF",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bite-sized-insights/bulk-bic-swift-code-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "bics": [
    "DEUTDEFF500",
    "NWBKGB2L",
    "DEUTXXFF"
  ]
}' |
apify call bite-sized-insights/bulk-bic-swift-code-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bite-sized-insights/bulk-bic-swift-code-validator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3jlIhuvficlLatdPK/builds/Q0X3yati8igDDHejN/openapi.json
