# BIMI Record Auditor (`phoenix2810/bimi-record-auditor`) Actor

Audit a public domain's BIMI brand-logo record and DMARC enforcement prerequisite in one API call. Optionally validates the HTTPS SVG logo. Returns score and recommendations.

- **URL**: https://apify.com/phoenix2810/bimi-record-auditor.md
- **Developed by:** [Sanskar Jaiswal](https://apify.com/phoenix2810) (community)
- **Categories:** SEO tools, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## BIMI Record Auditor

Apify Actor that audits a public domain's **BIMI (Brand Indicators for
Message Identification)** email-branding record in one cheap API call.

### What it does

- Reads the BIMI record at `<selector>._bimi.<domain>` (default selector
  `default`) via a public DNS-over-HTTPS resolver (Cloudflare 1.1.1.1 JSON
  API, no auth).
- Parses every `tag=value` pair with full BIMI record semantics:
  - `v=` version tag (BIMI1 / BIMI2 / BIMI3; flags unknown versions and
    the legacy BIMI1-without-`a=` configuration that is not displayable).
  - `l=` logo location (required) — must be an absolute HTTPS URL.
  - `a=` authority evidence location — HTTPS URL of the VMC/CMC
    certificate required by Gmail and Apple Mail.
  - Duplicate tags, unparseable segments, and unknown tags.
- Verifies the **DMARC enforcement prerequisite**: reads `_dmarc.<domain>`
  TXT and confirms `p=quarantine` or `p=reject` — receivers MUST NOT
  display BIMI logos without it.
- Optionally fetches the `l=` logo (HTTPS only, redirect-revalidated,
  size-capped) and validates it is an SVG with a square `viewBox`, no
  scripts, and no external references.
- Returns a weighted **readiness score (0-100)**, letter grade, issues,
  and concrete recommendations.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `startUrl` | string (required) | Public domain or URL to audit |
| `selector` | string | BIMI selector label, default `default` |
| `checkLogo` | boolean | Fetch and validate the logo (default true) |
| `logoMaxBytes` | integer | Logo response size cap, default 2 MB |
| `timeoutSeconds` | integer | Network timeout, default 10 |

### Output (default dataset)

One JSON object: `domain`, `selector`, `bimiName`, `bimiFound`,
`recordCount`, `recordText`, `version`, `logoUrl`, `authorityUrl`,
`hasRequiredLogoTag`, `dmarcPolicy`, `dmarcEnforced`, `logo` (status,
contentType, contentLength, format, formatIssues, issues), `authority`
(valid, issues), `recordIssues`, `score`, `grade`, `issues`,
`recommendations`, `checkedAt`.

### Security

- DNS TXT lookups only via a public DoH resolver; the input URL itself is
  never fetched.
- The only HTTP fetch is the `l=` logo URL from the domain's own BIMI
  record, when `checkLogo` is enabled — HTTPS only, with SSRF protection:
  credentials rejected, private IPv4/IPv6 literals blocked, DNS
  resolutions checked against private ranges, and every redirect target
  revalidated before following. 2 MB body cap enforced against both
  Content-Length and the streamed body.
- `a=` authority evidence URLs are validated as URL strings only and are
  NEVER fetched.

### Use cases

- Email deliverability and brand-protection audits (does our logo show in
  Gmail/Apple Mail, and why not?).
- Post-migration QA after DNS or ESP changes.
- B2B lead filtering: find senders with (or without) verified brand
  indicators.
- Compliance monitoring for DMARC+BIMI programs at list scale.

### Pricing suggestion

$0.005 actor start + $0.01 per domain audited (~$0.015 per run).

# Actor input Schema

## `startUrl` (type: `string`):

Public domain or URL to audit. The actor queries selector.\_bimi.<domain> and \_dmarc.<domain> TXT records via a public DoH resolver. Private IP ranges are blocked.

## `selector` (type: `string`):

BIMI selector label (default: 'default'). The record is read from <selector>.\_bimi.<domain>.

## `checkLogo` (type: `boolean`):

Fetch the l= logo URL (HTTPS only) and validate it serves a BIMI-appropriate SVG. Disable for DNS-only audits.

## `logoMaxBytes` (type: `integer`):

Maximum logo response size in bytes (default 2097152). Larger responses are rejected without reading.

## `timeoutSeconds` (type: `integer`):

Timeout for DoH lookups and the logo fetch.

## Actor input object example

```json
{
  "startUrl": "https://example.com",
  "selector": "default",
  "checkLogo": true,
  "logoMaxBytes": 2097152,
  "timeoutSeconds": 10
}
```

# Actor output Schema

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

No description

# 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 = {
    "startUrl": "https://example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("phoenix2810/bimi-record-auditor").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 = { "startUrl": "https://example.com" }

# Run the Actor and wait for it to finish
run = client.actor("phoenix2810/bimi-record-auditor").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 '{
  "startUrl": "https://example.com"
}' |
apify call phoenix2810/bimi-record-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,phoenix2810/bimi-record-auditor"
        }
    }
}
```

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/tXssRYrZ5PdVK3FYn/builds/dqBc4rPYI6iqZgU5u/openapi.json
