API Documentation
Reference for the BinVerify REST API: authentication, request fields for every tool, the response envelope, error codes, limits and sandbox keys.
Every tool in your plan is available over HTTPS as a single POST endpoint. Requests and responses are JSON; all timestamps are UTC.
| Base URL | https://binverify.com/api/v1 |
| Method | POST |
| Content-Type | application/json |
| Endpoint | POST /api/v1/tool/{slug} |
Send your API key as a Bearer token in the Authorization header of every request. Session cookies are not accepted on API routes.
Authorization: Bearer bv_pk_live_0123456789abcdef0123456789abcdef
Keys are shown once, at creation. They start with bv_pk_live_ (live) or bv_pk_test_ (sandbox) followed by 32 characters. Only a hash is stored, so a lost key has to be replaced.
Create, scope, restrict and revoke keys on the API Keys page of your panel. A key only works for the tools selected as its scopes.
Checks performed on every request
The checks run in this order; the first failure ends the request with the status shown.
- Authorization header present with a Bearer token — otherwise 401.
- Key prefix is bv_pk_live_ or bv_pk_test_ — otherwise 401.
- Key exists, is active and has not expired — otherwise 401.
- Request IP is in the key's IP allowlist, when one is set — otherwise 403.
- The tool is among the key's scopes — otherwise 403.
- Your plan includes API access — otherwise 403.
- Rate limit of your plan — otherwise 429 rate_limit_exceeded.
- Monthly allowance or credits for the tool (live keys only) — otherwise 429 quota_exceeded or 403.
Send the tool's fields as a JSON object in the request body with Content-Type: application/json. Form-encoded bodies (application/x-www-form-urlencoded) are accepted as well.
POST /api/v1/tool/bin-lookup HTTP/1.1
Host: binverify.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"bin": "411111"
}
- Boolean fields: send JSON true/false (or 1/0). The strings “true” and “false” are both read as true by most tools.
- Numeric options outside their range are clamped to the nearest limit and list options with an unknown value fall back to their default; the request is not rejected.
- A missing or malformed required field returns 400 with meta.validation_errors naming the field.
One section per tool: endpoint, request fields and a request example. The field rules mirror the validation the API performs.
| Tool | Endpoint |
|---|---|
| BIN Lookup | POST /api/v1/tool/bin-lookup |
| IP Address Lookup | POST /api/v1/tool/ip-info |
| VPN & Proxy Detection | POST /api/v1/tool/ip-probe |
| IP Blacklist Check | POST /api/v1/tool/ip-blocklist |
| Phone Number Validator | POST /api/v1/tool/phone-validate |
| Email Verifier | POST /api/v1/tool/email-verify |
| Email Validator | POST /api/v1/tool/email-validate |
| Domain Lookup | POST /api/v1/tool/domain-lookup |
| QR Code Generator | POST /api/v1/tool/qr-code |
| HTTP Status Checker | POST /api/v1/tool/url-info |
| User Agent Parser | POST /api/v1/tool/ua-lookup |
| Image Watermark | POST /api/v1/tool/image-watermark |
| Image Resize | POST /api/v1/tool/image-resize |
| HTML to PDF Converter | POST /api/v1/tool/html-render |
| HTML Sanitizer | POST /api/v1/tool/html-clean |
| Address to Coordinates | POST /api/v1/tool/geocode-address |
| Coordinates to Address | POST /api/v1/tool/geocode-reverse |
| Web Page Extractor | POST /api/v1/tool/browser-bot |
| DNSBL Check | POST /api/v1/tool/host-reputation |
| Profanity Filter | POST /api/v1/tool/bad-word-filter |
| Currency & Unit Converter | POST /api/v1/tool/convert |
bin-lookupEndpoint: POST https://binverify.com/api/v1/tool/bin-lookup
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
bin |
string |
Yes | First 6–8 digits of the card number (digits only). | 411111 |
Request example
{
"bin": "411111"
}
ip-infoEndpoint: POST https://binverify.com/api/v1/tool/ip-info
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ip |
string |
Yes | IPv4 or IPv6 address, or a CIDR block such as 192.0.2.0/24. | 8.8.8.8 |
reverse_lookup |
boolean |
No | Also resolve the hostname. Default false. | true |
Request example
{
"ip": "8.8.8.8",
"reverse_lookup": true
}
ip-probeEndpoint: POST https://binverify.com/api/v1/tool/ip-probe
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ip |
string |
Yes | IPv4 or IPv6 address, or a CIDR block. | 8.8.8.8 |
Request example
{
"ip": "8.8.8.8"
}
ip-blocklistEndpoint: POST https://binverify.com/api/v1/tool/ip-blocklist
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ip |
string |
Yes | IPv4 or IPv6 address, CIDR block or IP:port; several entries may be separated by commas. | 198.51.100.1 |
vpn_lookup |
boolean |
No | Also check VPN and proxy data. Default false; when false, is_vpn is null. | true |
Request example
{
"ip": "198.51.100.1",
"vpn_lookup": true
}
phone-validateEndpoint: POST https://binverify.com/api/v1/tool/phone-validate
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
number |
string |
Yes | Phone number in international (+90…) or local format; digits, spaces and + - ( ) . / are allowed. | +442079460018 |
country_code |
string |
No | Two-letter ISO country code for local-format numbers (upper-cased automatically). | GB |
ip |
string |
No | IP address used to infer the country for local-format numbers. | 8.8.8.8 |
Request example
{
"number": "+442079460018"
}
email-verifyEndpoint: POST https://binverify.com/api/v1/tool/email-verify
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
email |
string |
Yes | Email address to verify (includes the SMTP mailbox check). | user@example.com |
fix_typos |
boolean |
No | Correct common domain typos before verifying. Default false. | true |
Request example
{
"email": "user@example.com",
"fix_typos": true
}
email-validateEndpoint: POST https://binverify.com/api/v1/tool/email-validate
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
email |
string |
Yes | Email address to validate (syntax and DNS/MX checks, no SMTP). | user@example.com |
fix_typos |
boolean |
No | Correct common domain typos before validating. Default false. | true |
Request example
{
"email": "user@example.com",
"fix_typos": true
}
domain-lookupEndpoint: POST https://binverify.com/api/v1/tool/domain-lookup
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
host |
string |
Yes | Domain, hostname, FQDN, URL or email address. | example.com |
live |
boolean |
No | Perform live DNS checks. Default true. | true |
Request example
{
"host": "example.com",
"live": true
}
qr-codeEndpoint: POST https://binverify.com/api/v1/tool/qr-code
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
content |
string |
Yes | Text or URL to encode (max 4096 characters). | https://example.com |
width |
integer |
No | Image width in pixels, 50–1000. Default 256. | 256 |
height |
integer |
No | Image height in pixels, 50–1000. Default 256. | 256 |
fg_color |
string |
No | Foreground color as #RRGGBB. Default #000000. | #000000 |
bg_color |
string |
No | Background color as #RRGGBB. Default #ffffff. | #ffffff |
Request example
{
"content": "https://example.com",
"width": 256,
"height": 256,
"fg_color": "#000000",
"bg_color": "#ffffff"
}
url-infoEndpoint: POST https://binverify.com/api/v1/tool/url-info
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
url |
string |
Yes | Absolute URL including the scheme. | https://example.com/ |
fetch_content |
boolean |
No | Fetch and analyse the page content. Default false. | true |
ignore_certificate_errors |
boolean |
No | Ignore TLS certificate errors. Default false. | false |
timeout |
integer |
No | Request timeout in seconds, 1–60. Default 60. | 30 |
retry |
integer |
No | Retries on failure, 0–3. Default 0. | 1 |
Request example
{
"url": "https://example.com/",
"fetch_content": true
}
ua-lookupEndpoint: POST https://binverify.com/api/v1/tool/ua-lookup
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
ua |
string |
Yes | User-Agent string to analyse. | Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.144 Mobile Safari/537.36 |
ua_version |
string |
No | Client hint: Sec-CH-UA full version. | 120.0.6099.144 |
ua_platform |
string |
No | Client hint: Sec-CH-UA-Platform. | Android |
ua_platform_version |
string |
No | Client hint: Sec-CH-UA-Platform-Version. | 13 |
ua_mobile |
string |
No | Client hint: Sec-CH-UA-Mobile (?1 or ?0). | ?1 |
ua_arch |
string |
No | Client hint: Sec-CH-UA-Arch. | arm |
ua_bitness |
string |
No | Client hint: Sec-CH-UA-Bitness. | 64 |
ua_form_factors |
string |
No | Client hint: Sec-CH-UA-Form-Factors. | Mobile |
device_model |
string |
No | Device model, when known. | Pixel 7 |
device_brand |
string |
No | Device brand, when known. | Google |
Request example
{
"ua": "Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.144 Mobile Safari/537.36"
}
image-watermarkEndpoint: POST https://binverify.com/api/v1/tool/image-watermark
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
image_url |
string |
Yes | Absolute URL of the image to watermark. | https://example.com/photo.jpg |
watermark_url |
string |
Yes | Absolute URL of the watermark image. | https://example.com/logo.png |
opacity |
integer |
No | Watermark opacity, 0–100. Default 50. | 50 |
format |
string |
No | Output format: png or jpg. Default png. | png |
position |
string |
No | center, top-left, top-center, top-right, bottom-left, bottom-center or bottom-right. Default center. | bottom-right |
width |
integer |
No | Output width in pixels, 50–4000. | 800 |
height |
integer |
No | Output height in pixels, 50–4000. | 600 |
resize_mode |
string |
No | scale, pad or crop. Default scale. | scale |
bg_color |
string |
No | transparent or #RRGGBB. Default transparent. | transparent |
Request example
{
"image_url": "https://example.com/photo.jpg",
"watermark_url": "https://example.com/logo.png",
"opacity": 50,
"position": "bottom-right"
}
image-resizeEndpoint: POST https://binverify.com/api/v1/tool/image-resize
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
image_url |
string |
Yes | Absolute URL of the image to resize. | https://example.com/photo.jpg |
width |
integer |
Yes | Output width in pixels, 50–4000. | 800 |
height |
integer |
No | Output height in pixels, 50–4000. | 600 |
format |
string |
No | Output format: png or jpg. Default png. | png |
resize_mode |
string |
No | scale, pad or crop. Default scale. | scale |
bg_color |
string |
No | transparent or #RRGGBB. Default transparent. | transparent |
Request example
{
"image_url": "https://example.com/photo.jpg",
"width": 800,
"height": 600,
"resize_mode": "scale"
}
html-renderEndpoint: POST https://binverify.com/api/v1/tool/html-render
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
content |
string |
Yes | URL (http:// or https://) or raw HTML, max 100000 characters. | https://example.com/ |
format |
string |
No | pdf, png or jpg. Default pdf. | pdf |
title |
string |
No | Document title (max 255 characters). | Example |
page_size |
string |
No | A3, A4, A5, Letter, Legal or Ledger. Default A4. | A4 |
image_width |
integer |
No | Viewport width in pixels for png/jpg, 50–4000. Default 1024. | 1024 |
image_height |
integer |
No | Image height in pixels for png/jpg, 50–4000. | 768 |
margin |
number |
No | Page margin, 0 or more. Default 0. | 10 |
landscape |
boolean |
No | Landscape orientation. Default false. | false |
grayscale |
boolean |
No | Render in grayscale. Default false. | false |
zoom |
number |
No | Zoom factor, 0.1–5.0. Default 1.0. | 1 |
bg_color |
string |
No | transparent or #RRGGBB. | #ffffff |
css |
string |
No | Extra CSS injected into the page. | body { font-family: sans-serif; } |
delay |
integer |
No | Seconds to wait before rendering, 0–30. Default 0. | 2 |
ignore_certificate_errors |
boolean |
No | Ignore TLS certificate errors. Default false. | false |
Request example
{
"content": "https://example.com/",
"format": "pdf",
"page_size": "A4"
}
html-cleanEndpoint: POST https://binverify.com/api/v1/tool/html-clean
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
content |
string |
Yes | URL or raw HTML, max 100000 characters. | <p>Hello <b>world</b></p> |
output_type |
string |
Yes | plain-text, simple-text, basic-html, basic-html-with-images or advanced-html. | plain-text |
Request example
{
"content": "<p>Hello <b>world</b></p>",
"output_type": "plain-text"
}
geocode-addressEndpoint: POST https://binverify.com/api/v1/tool/geocode-address
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
address |
string |
Yes | Free-form address, max 500 characters. | 1600 Pennsylvania Ave NW, Washington, DC |
country_code |
string |
No | Two-letter ISO country code to narrow the search. | US |
language_code |
string |
No | ar, de, en, es, fr, it, ja, nl, pt, ru or zh. Default en. | en |
fuzzy_search |
boolean |
No | Allow approximate matches. Default false. | false |
limit |
integer |
No | Maximum number of results, 1–32. Default 8. | 5 |
Request example
{
"address": "1600 Pennsylvania Ave NW, Washington, DC",
"country_code": "US",
"limit": 5
}
geocode-reverseEndpoint: POST https://binverify.com/api/v1/tool/geocode-reverse
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
latitude |
number |
Conditional | Latitude, -90 to 90. Required together with longitude unless geohash is sent. | 38.8977 |
longitude |
number |
Conditional | Longitude, -180 to 180. Required together with latitude unless geohash is sent. | -77.0365 |
geohash |
string |
Conditional | Geohash (1–12 characters) as an alternative to coordinates; ignored when coordinates are sent. | dqcjqcp84c6e |
language_code |
string |
No | ar, de, en, es, fr, it, ja, nl, pt, ru or zh. Default en. | en |
zoom |
string |
No | Result detail: address, street, city, state or country. Default address. | address |
Request example
{
"latitude": 38.8977,
"longitude": -77.0365,
"zoom": "address"
}
browser-botEndpoint: POST https://binverify.com/api/v1/tool/browser-bot
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
url |
string |
Yes | Absolute URL of the page to load. | https://www.example.com/ |
selector |
string |
No | CSS selector of the elements to extract (max 500 characters). | a |
timeout |
integer |
No | Page load timeout in seconds, 1–30. Default 30. | 30 |
delay |
integer |
No | Seconds to wait after loading, 0–10. Default 3. | 3 |
user_agent |
string |
No | Custom User-Agent string (max 500 characters). | Mozilla/5.0 |
ignore_certificate_errors |
boolean |
No | Ignore TLS certificate errors. Default false. | false |
Request example
{
"url": "https://www.example.com/",
"selector": "a"
}
host-reputationEndpoint: POST https://binverify.com/api/v1/tool/host-reputation
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
host |
string |
Yes | IP address, domain, FQDN or URL (max 2048 characters). | 8.8.8.8 |
list_rating |
integer |
No | Which blocklists to check: 1 = rating 1 lists only, 2 = ratings 1 and 2, 3 = all lists (ratings 1–3). Default 3. | 3 |
Request example
{
"host": "8.8.8.8",
"list_rating": 3
}
bad-word-filterEndpoint: POST https://binverify.com/api/v1/tool/bad-word-filter
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
content |
string |
Yes | Text, HTML or a URL, max 100000 characters. | This damn printer is crap |
censor_character |
string |
No | Single character used to mask matches (longer values are cut to one character). | * |
catalog |
string |
No | Word catalog: strict or obscene. Default strict. | strict |
Request example
{
"content": "This damn printer is crap",
"censor_character": "*",
"catalog": "strict"
}
convertEndpoint: POST https://binverify.com/api/v1/tool/convert
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
from_value |
string |
Yes | Amount to convert as a numeric string (max 50 characters). | 100 |
from_type |
string |
Yes | Source currency, cryptocurrency or unit code, for example USD (max 30 characters). | USD |
to_type |
string |
Yes | Target currency, cryptocurrency or unit code, for example EUR. | EUR |
historical_date |
string |
No | Use the rate of a past date: YYYY-MM-DD, YYYY-MM or YYYY. | 2026-01-15 |
Request example
{
"from_value": "100",
"from_type": "USD",
"to_type": "EUR"
}
Every response, success or error, is a JSON object with the same four keys: success, data, error and meta.
Success — bin-lookup
{
"success": true,
"data": {
"bin": "411111",
"brand": "VISA",
"type": "CREDIT",
"category": "CLASSIC",
"country": "United States",
"country_iso": "US",
"country_iso3": "USA",
"currency": "USD",
"bank": "EXAMPLE BANK N.A.",
"bank_phone": "+1 800 555 0100",
"bank_website": "https://www.example-bank.com",
"prepaid": false,
"commercial": false,
"reloadable": null
},
"error": null,
"meta": {
"request_id": "3f9c2a1b7d4e5f60",
"tool": "bin-lookup",
"cache_hit": false,
"duration_ms": 142
}
}
data holds the tool result. For bin-lookup the keys are exactly those shown; values the issuer data does not provide are null. reloadable is given only for prepaid cards and is null for other cards.
meta keys on success
| Key | Description |
|---|---|
request_id |
Unique identifier of this request (16 hex characters). Quote it when contacting support. |
tool |
The tool slug that was executed. |
cache_hit |
true when the answer was served from BinVerify's stored results instead of a live provider call. |
duration_ms |
Server-side processing time in milliseconds. |
sandbox |
Present, and true, only on sandbox (test key) responses. |
Error
On errors success is false, data is null and error carries either a fixed code (for example quota_exceeded) or a short message. meta is null for authentication errors, holds request_id and tool for errors raised during execution, and carries extra details for validation and quota errors.
{
"success": false,
"data": null,
"error": "Validation failed.",
"meta": {
"request_id": "3f9c2a1b7d4e5f60",
"tool": "bin-lookup",
"validation_errors": {
"bin": "BIN must be 6–8 digits."
}
}
}
Allowance exhausted — 429 quota_exceeded
HTTP/1.1 429 Too Many Requests
Retry-After: 1296000
{
"success": false,
"data": null,
"error": "quota_exceeded",
"meta": {
"tool_slug": "bin-lookup",
"monthly_limit": 1000,
"used": 1000,
"remaining": 0,
"period_end": "2026-11-01T00:00:00Z",
"retry_after": 1296000
}
}
monthly_limit, used and remaining describe the tool's allowance in the current period. period_end (UTC) and retry_after (seconds) are present for subscribers and say when the allowance renews; the same number is sent in the Retry-After header.
Every value the error field can take, grouped by HTTP status.
| HTTP | error value | Meaning |
|---|---|---|
400 |
Validation failed. |
A required field is missing or a value is malformed; meta.validation_errors maps each field to a message. |
400 |
Invalid Idempotency-Key (1-255 visible ASCII characters). |
The Idempotency-Key header must be 1–255 visible ASCII characters. |
401 |
Missing or invalid Authorization header.Empty bearer token. |
The Authorization: Bearer header is missing or empty. |
401 |
Invalid key format.Invalid key environment prefix. |
The token does not start with bv_pk_live_ or bv_pk_test_. |
401 |
Invalid API key. |
No active key matches the token. |
401 |
API key is revoked.API key is expired.API key has expired. |
The key was revoked on the API Keys page or its expiry date has passed. |
401 |
User account not found. |
The account that owns the key no longer exists. |
403 |
Request IP not in allowed list. |
The request IP is not in the key's IP allowlist. |
403 |
API key does not have scope for this tool. |
The tool is not among the key's scopes. |
403 |
Your plan does not include API access. |
Your plan does not include API access; upgrade to a plan with API access. |
403 |
no_api_access |
Your plan stopped including API access (for example the subscription ended) while the request was being processed. |
403 |
tool_not_in_plan |
The tool is blocked for your plan or not part of it; credits cannot unlock it. |
403 |
entitlement_check_failed |
The allowance could not be verified, so the request was denied (fail-closed). Retry shortly. |
403 |
No entitlement left for this tool. |
The last remaining unit was taken by a concurrent request before this one could be charged. |
404 |
Tool not found. |
No tool with this slug exists. |
409 |
A request with this Idempotency-Key is still in progress. |
A request with the same Idempotency-Key is still running; retry after it finishes. |
422 |
Idempotency-Key was already used for a different request. |
The Idempotency-Key was already used with a different tool or body within the last 24 hours. |
429 |
rate_limit_exceeded |
Too many requests in the current minute; wait Retry-After seconds (also in meta.retry_after). |
429 |
quota_exceeded |
The tool's monthly allowance and your credits are used up; meta carries the allowance state and period_end. |
500 |
Internal error. |
Unexpected server error; details are logged and nothing is charged. |
502 |
Tool execution failed. |
The data provider failed or timed out; nothing is charged. Retry later. |
503 |
maintenance |
BinVerify is in maintenance; retry after meta.retry_after seconds. |
Send an optional Idempotency-Key header (1–255 visible ASCII characters, unique per API key) to make a request safe to retry, for example after a network timeout.
Idempotency-Key: order-7781
- Same key, same tool and same body within 24 hours: the stored response is returned again with the header Idempotent-Replayed: true, and nothing is charged a second time.
- Same key with a different tool or body: 422.
- Same key while the first request is still running: 409 (a request that never finished is released after 10 minutes).
- An error response (4xx or 5xx) does not reserve the key, so the request can be retried with the same key.
- Sandbox keys ignore the Idempotency-Key header.
Rate limits are counted per tool in fixed one-minute windows and are shared between the API and the web tools. The defaults per plan are:
| Plan | Requests per minute (per tool) |
|---|---|
| Free | 15 |
| Starter | 30 |
| Pro | 60 |
| Pro Rollover | 60 |
| Enterprise | Unlimited |
Above the limit the API returns 429 rate_limit_exceeded with a Retry-After header (seconds until the window resets). Retry-After is the only rate-limit header; no X-RateLimit-* headers are sent.
HTTP/1.1 429 Too Many Requests
Retry-After: 37
{
"success": false,
"data": null,
"error": "rate_limit_exceeded",
"meta": {
"retry_after": 37
}
}
Live keys consume the same monthly allowance as the web tools: one unit per successful response (stored answers included), taken first from rollover, then from the period's allowance, then from purchased credits. The unit is held before the provider is called and released if the call fails, so failed requests are never charged.
When the allowance and credits are exhausted the API returns 429 quota_exceeded. Your remaining allowance per tool is shown on the Dashboard.
Keys created with the test environment (bv_pk_test_…) run in sandbox mode:
- No provider is called; each tool returns fixed, realistic sample data in the live response shape.
- No allowance or credits are consumed and nothing is charged.
- Responses are deterministic: the same input always returns the same data, and input values such as bin, ip or email are echoed back.
- Input is not validated and the Idempotency-Key header is ignored.
- Authentication, the IP allowlist, scopes, plan API access and rate limits apply exactly as for live keys.
- meta.sandbox is true, and the calls appear in your history with the status sandbox.
Sandbox responses carry this meta object:
"meta": {
"request_id": "3f9c2a1b7d4e5f60",
"tool": "bin-lookup",
"sandbox": true,
"cache_hit": false,
"duration_ms": 1
}
Replace YOUR_API_KEY with a key from the API Keys page. Send your own User-Agent header that names your application (for example MyShop/1.0): the default user agent of some HTTP libraries, such as Python's urllib, is blocked as automated traffic (error 1010).
cURL
curl -X POST https://binverify.com/api/v1/tool/bin-lookup \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-7781" \
-d '{"bin": "411111"}'
PHP
$ch = curl_init('https://binverify.com/api/v1/tool/bin-lookup');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['bin' => '411111']),
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body['success']) {
echo $body['data']['brand'], ' / ', $body['data']['bank'];
} elseif ($status === 429) {
echo 'Wait: ', $body['error'], ' (retry_after ', $body['meta']['retry_after'] ?? '?', ')';
} else {
echo 'Error: ', $body['error'];
}
Python (requests)
import requests
response = requests.post(
'https://binverify.com/api/v1/tool/bin-lookup',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={'bin': '411111'},
timeout=10,
)
result = response.json()
if result['success']:
print(result['data']['brand'], '/', result['data']['bank'])
elif response.status_code == 429:
print('wait', result['error'], response.headers.get('Retry-After'))
else:
print('error', result['error'])
JavaScript (fetch)
const response = await fetch('https://binverify.com/api/v1/tool/bin-lookup', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ bin: '411111' }),
});
const result = await response.json();
if (result.success) {
console.log(result.data.brand, result.data.bank);
} else if (response.status === 429) {
console.log('wait', result.error, response.headers.get('Retry-After'));
} else {
console.log('error', result.error);
}