canonical: https://jentic.com/apis/majestic.com/majestic

# Majestic SEO API

Jentic publishes the only available OpenAPI specification for Majestic SEO API, keeping it validated and agent-ready. Majestic operates one of the largest link-intelligence indexes on the web and exposes a command-style API where each request specifies a Majestic command (such as GetIndexItemInfo, GetBackLinkData, GetTopBackLinks) and the URL or domain to query. The three transport endpoints (JSON GET, JSON POST, XML GET) all share the same command catalogue and return backlink, referring-domain, anchor-text, trust-flow, and citation-flow data.

## For AI agents

Query Majestic's link-intelligence index for backlinks, referring domains, trust flow, and anchor-text data on any URL or domain. Used by SEO agents that audit link profiles and competitor backlink growth.

## Scope

Does not handle paid search, rank tracking, or content optimisation - use for backlink, referring-domain, and anchor-text intelligence only.

## Capabilities

- Pull backlink lists for a target URL or root domain at a chosen depth
- Retrieve trust flow and citation flow scores for any URL or domain
- List the referring domains pointing at a target with first- and last-seen dates
- Inspect the most common anchor text used in backlinks to a target
- Compare the link profile of two domains to surface gap opportunities
- Look up topical trust flow categories for a target domain

## Use cases

### Link Profile Audit

SEO teams audit a target domain's backlink profile to spot toxic links, low-quality referring domains, and disavow candidates. The Majestic API GetBackLinkData and GetTopBackLinks commands return the bulk of the link graph for a URL or domain along with trust flow and citation flow scores, supporting both quick health checks and deep historical audits.

Example prompt: GET `/api/json` with cmd=GetTopBackLinks and item=example.com to return the top 1000 backlinks ordered by trust flow.

### Competitor Link Gap Analysis

Marketing teams compare their referring-domain set against a competitor's to find sites that link to the competitor but not to them. The Majestic referring-domain commands return ranked lists of referrers per target domain so an automation can diff the two and surface link-building opportunities for outreach.

Example prompt: Call GetRefDomains for example.com and competitor.com, diff the two referrer lists, and rank the gap by competitor's trust flow score.

### Anchor-Text Distribution Reporting

Anchor-text mix is a leading indicator of natural versus manipulative link building. Majestic's anchor-text commands return the distribution of anchor phrases pointing at a target so SEO teams can monitor over-optimised anchors that risk algorithmic penalties. Reports run weekly or monthly against a portfolio of domains.

Example prompt: Pull anchor-text distribution for example.com and flag any phrase that exceeds 10% of total backlinks.

### AI Agent SEO Assistant

Marketing operators can delegate routine SEO queries to an agent that pulls Majestic data on demand. Through Jentic the agent searches by intent, loads the schema for the right Majestic command, and executes the call with the API key served from the vault. The same loop powers reporting copilots and competitor-monitoring agents.

Example prompt: Use Jentic to search 'get majestic backlinks for a domain', execute the JSON command with cmd=GetTopBackLinks, and return the top referrers grouped by trust flow.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/json` | Execute a Majestic command and return JSON |
| POST | `/api/json` | Execute a Majestic command via POST and return JSON |
| GET | `/api/xml` | Execute a Majestic command and return XML |

## Key resources

- **Backlinks** — Backlink lists, top backlinks, and backlink counts for URLs and domains.
- **Referring Domains** — Lists of referring domains, their trust flow, and first/last-seen dates.
- **Anchor Text** — Distribution of anchor phrases used in backlinks to a target.
- **Index** — GetIndexItemInfo and related commands that summarise URL- and domain-level metrics.
- **Account** — Account-level commands that report unit balance and quota usage.

## Why Jentic

- **Setup:** Wiring the Majestic SEO API by hand means passing your app_api_key on the query string, targeting the api.majestic.com host, and parsing its JSON or XML backlink responses yourself. Through Jentic you install once, import Majestic from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Majestic exposes backlink intelligence through its JSON and XML endpoints with the target passed in the request, so limit the agent to the operations it needs, such as the JSON lookup, and leave the others out unless you add them. Which operations run is your choice.
- **Credential handling:** Your Majestic API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get backlinks for a domain' or 'check referring domains', and Jentic returns the matching Majestic operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Ahrefs API** — Ahrefs is a competing link-intelligence platform with a similar backlink and referring-domain dataset.
- **SEMrush API** — SEMrush covers backlinks alongside organic and paid search data.
- **Moz API** — Moz exposes domain authority and link metrics that overlap with Majestic's trust flow.

## FAQ

### Why is there no official OpenAPI spec for Majestic SEO API?

Majestic does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Majestic SEO API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Majestic SEO API use?

Majestic accepts an API key passed as the app_api_key query parameter on every request. Through Jentic the key is encrypted in the vault and attached server-side, so the raw key never enters the agent context.

### Can I pull backlinks for a domain through the API?

Yes. Call GET `/api/json` with cmd=GetTopBackLinks (or GetBackLinkData) and the item parameter set to the target URL or domain. The response returns the link list plus trust flow and citation flow scores.

### What commands are available on the JSON endpoint?

All Majestic commands share the same transport. The cmd query parameter selects the command (GetIndexItemInfo, GetBackLinkData, GetTopBackLinks, GetRefDomains, GetAnchorText, etc.) and the rest of the parameters depend on the chosen command.

### What are the rate limits for the Majestic SEO API?

Majestic enforces a unit-based quota rather than a strict request-rate limit. Each command costs a different number of analysis units; check your subscription on majestic.com for the unit balance and the per-command cost.

### How do I run a Majestic command through Jentic?

Run pip install jentic, search 'pull backlinks for a domain via majestic', load the schema for GET `/api/json`, and execute with cmd and item set to your target. Jentic injects the app_api_key from the encrypted vault.

### Can I limit what my agent is allowed to do with the Majestic SEO API?

Yes. Because you run Jentic One yourself, you decide which Majestic operations your agent can reach: you can grant it only the JSON lookup on `/api/json` and leave the XML endpoint and POST variant out unless you add them. The stored API key is attached at execution time by your own instance, so the agent can only run the commands and target the domains your rules permit. Which operations run is your choice.
