# Domain Rank Checker: Majestic Million Rank and DNS (`atesen-software/domain-rank-lookup`) Actor

Check up to 5,000 domains for Majestic Million rank, referring subnets and IPs, changes from the previous list, and optional DNS name servers and mail servers.

- **URL**: https://apify.com/atesen-software/domain-rank-lookup.md
- **Developed by:** [Atesen Software](https://apify.com/atesen-software) (community)
- **Categories:** SEO tools, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 domain rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Domain Rank Checker: Majestic Million Rank and DNS

Check up to 5,000 domains for Majestic Million rank, referring subnets and IPs, and changes since the previous list. Add live DNS name servers and mail servers to the same dataset. Export the results as JSON, CSV or Excel.

### Rank coverage

- The rank comes from the **Majestic Million**, a free list of the 1,000,000 domains with the most referring subnets. The rank is based on **referring subnets** (how many different IP ranges link to the domain).
- It covers **only the first 1,000,000 domains**. A domain that is not listed gets `inMajesticMillion: false`. That is a normal answer, not an error, and it does not say the site is bad or new.
- This Actor does **not** give Domain Rating or Authority scores, website traffic, keyword rankings or a backlink count. If you need those, this is the wrong tool. Every output row repeats this in the `rankBasis` field.
- Name servers and mail servers come from live DNS lookups.

### Three ways to use it

1. **Prioritise a domain list.** You have 2,000 domains from a sheet, a CRM export or a scrape. Sort the output by `globalRank` or `refSubNets` to see which ones are well linked and which are not listed at all, before you spend time on them.
2. **Screen link and source candidates.** Before you reach out to a site for a link, a mention or a data source, check whether it is listed and whether its rank rose or fell (`rankChange`).
3. **Audit DNS for a portfolio.** Export name servers and mail servers for a list of domains. Use `dnsStatus` to distinguish missing records from lookup errors.

### What you get

One row per distinct domain. Every row has the same fields.

| Field | Meaning |
|---|---|
| `type` | `domain` for a result row; `failed` or `invalid` for a free status row |
| `input`, `domain` | The normalized registrable domain. Status rows leave these fields empty. |
| `inMajesticMillion` | `true` when listed, `false` when not in the top 1,000,000 |
| `globalRank`, `tldRank`, `tld` | Position in the Majestic Million and among domains of the same top-level domain |
| `refSubNets`, `refIPs` | Referring subnets (the number the rank is based on) and referring IP addresses |
| `prevGlobalRank`, `prevTldRank`, `prevRefSubNets`, `prevRefIPs` | Values in the previous Majestic list, empty when the domain was not listed then |
| `rankChange`, `refSubNetsChange` | Previous rank minus current rank (positive means the domain moved up) and the change in referring subnets |
| `majesticDataDate` | Date of the Majestic file that was read |
| `dnsStatus`, `nameservers`, `mxHosts`, `hasMx` | Live NS records, MX hosts (best priority first) and whether mail is set up |
| `message` | Plain-language note, for example why a domain is not listed |
| `rankBasis`, `source`, `attribution`, `fetchedAt` | What the rank means, which sources fed the row, the required credit and when the row was made |

Rows with `type` `failed` or `invalid` are status rows that explain what went wrong. They are free.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `domains` | list of text | Empty | Public domains, one per line. URLs are reduced to the registrable domain and duplicates are dropped. Up to 5,000. |
| `includeDns` | yes/no | yes | Add live name servers and mail servers |
| `maxDomains` | number | 5000 | Hard cap on domain rows for the run, 1 to 5,000 |

Example input:

```json
{
  "domains": ["google.com", "wikipedia.org"],
  "includeDns": true,
  "maxDomains": 2
}
```

What happens to odd input:

- Saved inputs that contain `includeRdap` get one free `failed` row. Remove the option and rerun.
- Missing or empty input gives one `failed` status row without a source request or domain result event.
- A line that is not a domain (an IP address, text with spaces) gets a free `invalid` row. The other lines are still looked up.
- Domains over `maxDomains` are not looked up; one free `invalid` row says how many were left out.

Enter public domains. For API text input, place each URL or email address on its own line. Commas and semicolons can separate plain domains. Apify retains the run input according to its storage settings. The Actor uses the registrable domain in its queries and exports, so URL credentials, paths, query strings, fragments and email local parts are omitted from the results.

### Example output

```json
{
  "type": "domain",
  "input": "wikipedia.org",
  "domain": "wikipedia.org",
  "inMajesticMillion": true,
  "globalRank": 13,
  "tldRank": 1,
  "tld": "org",
  "refSubNets": 225268,
  "refIPs": 684292,
  "prevGlobalRank": 13,
  "rankChange": 0,
  "refSubNetsChange": -261,
  "dnsStatus": "ok",
  "nameservers": ["ns0.wikimedia.org", "ns1.wikimedia.org", "ns2.wikimedia.org"],
  "mxHosts": ["mx-in1001.wikimedia.org", "mx-in2001.wikimedia.org"],
  "hasMx": true,
  "source": "majestic-million+dns"
}
```

A domain that is not listed keeps the same fields, with `inMajesticMillion: false`, empty rank fields and a `message` that says so. When enabled, DNS is still checked.

### Speed, time limit and cost control

- The Majestic file (about 80 MB, 27 MB compressed) is read as a stream and only your domains are kept, so the run fits in 256 to 512 MB of memory. Reading it takes seconds. A rank-only run (`includeDns` off) is done in about that time even for thousands of domains.
- As the run approaches its time limit, the Actor writes the remaining rank rows with `dnsStatus: skipped_time_limit`.
- Set a maximum cost per run in the run options. The Actor stops writing rows when the limit is reached and does not go over it.
- A saved domain row generates one domain event. Status rows do not generate domain events. Results already saved count when a run ends early. See the Pricing tab for applicable prices.

### Where the data comes from

- **Rank data:** the Majestic Million CSV, published by Majestic under CC BY 3.0. The Actor reads a specific version of the daily copy from a public Apify key-value store. It can stop streaming once every requested domain is found. The file date is in `majesticDataDate`. An unavailable copy or one more than four days old gives a free failure status with empty rank fields.
- **Name servers and mail servers:** live DNS queries for NS and MX records.

If the Majestic snapshot is unavailable, the run returns one `failed` status row without a domain event.

### Attribution

The rank data in this Actor's output comes from the Majestic Million, published by Majestic at https://majestic.com/reports/majestic-million and licensed under the Creative Commons Attribution 3.0 Unported License (https://creativecommons.org/licenses/by/3.0/). If you republish or share this data, keep that credit.

The data was changed: only the domains you asked for are selected, the values of the previous list are compared with the current ones (`rankChange`, `refSubNetsChange`), and fields are renamed. Every row carries this credit in its `attribution` field. Majestic does not endorse this Actor, and this Actor is not affiliated with Majestic.

### Limits

- Rank covers the Majestic Million only (the first 1,000,000 domains). Smaller sites are not listed.
- The rank is not Domain Rating or Authority, not traffic, not keyword data and not a backlink count.
- Subdomains are not ranked separately. `blog.example.com` is looked up as `example.com`.
- DNS answers are a snapshot from the moment of the run.
- Majestic publishes a new file regularly; `majesticDataDate` tells you which file you got.

### Use via API

One request runs the Actor, waits for it and returns the dataset items as JSON. Send your token in the `Authorization` header, not in the URL:

```bash
curl -X POST "https://api.apify.com/v2/acts/atesen-software~domain-rank-lookup/run-sync-get-dataset-items?timeout=120" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domains":["apify.com","wikipedia.org"]}'
```

The synchronous endpoint waits up to 300 seconds. For longer jobs start a run with `POST https://api.apify.com/v2/acts/atesen-software~domain-rank-lookup/runs` and read the dataset when it finishes.

**JavaScript** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('atesen-software/domain-rank-lookup').call({ domains: ["apify.com", "wikipedia.org"] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Use with AI agents (MCP)

Claude Desktop, Cursor, VS Code and other MCP clients can call this Actor as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Load only this Actor with:

```text
https://mcp.apify.com?tools=atesen-software/domain-rank-lookup
```

Client config (sign in with Apify OAuth when the browser opens, or add an `Authorization: Bearer <APIFY_TOKEN>` header instead):

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com?tools=atesen-software/domain-rank-lookup" }
  }
}
```

Then ask in plain words, for example: "What is the Majestic Million rank of apify.com and wikipedia.org?" The agent fills the same input fields you see on the Input tab, and runs are billed to your Apify account at the prices on the Pricing tab.

### Related actors

- [WHOIS Lookup (Bulk): Domain Age, Expiry, Registrar, DNS & MX](https://apify.com/atesen-software/domain-whois-rdap-lookup)
- [Tech Stack Detector: Website Technology Lookup, 3,600+ Techs](https://apify.com/atesen-software/website-tech-stack-detector)
- [SEO Audit Tool & Broken Link Checker: Website Crawler](https://apify.com/atesen-software/website-seo-audit)

# Actor input Schema

## `domains` (type: `array`):

Enter the public domains you want to look up, one per line. URLs are reduced to their registrable domain. Duplicate domains are dropped. Up to 5,000 per run. Avoid entering credentials or private URLs.

## `includeDns` (type: `boolean`):

Looks up the live NS and MX records of each domain.

## `maxDomains` (type: `integer`):

Hard cap on domain rows for the whole run, between 1 and 5,000. You only pay for rows that are written. Domains over the cap get one free note.

## Actor input object example

```json
{
  "includeDns": true,
  "maxDomains": 5000
}
```

# Actor output Schema

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

One row per domain; failed and invalid rows are free status rows

## `summary` (type: `string`):

Counts, Majestic file date, stop reason and the attribution text

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("atesen-software/domain-rank-lookup").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("atesen-software/domain-rank-lookup").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 '{}' |
apify call atesen-software/domain-rank-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,atesen-software/domain-rank-lookup"
        }
    }
}
```

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/Iyv2ExGIbLfQYQ8P8/builds/9auWLmSRPm9HG9bxY/openapi.json
