Command status: Active
Supported by OpenApps API: Yes
Supported by Internal/Reseller API: Yes
Possibly queued processing: No

This function is designed to return one or more URLs from root domain or subdomain. This function is also the only guaranteed way to check if a URL is present in index because GetIndexItemInfo only works with a limited number of URLs with high enough number of backlinks or referring domains.

Calls to this function will result in usage of the following subscription resources:

Resource Description


AnalysisResUnits will be reduced by GetTopPagesAnalysisResUnitsCost reported by GetSubscriptionInfo. Note: this function is fixed cost per call and it supports batching of large number of query items - use it to obtain data efficiently.


RetrievalResUnits will be reduced by actual number of returned rows of data.

This function accepts the following parameters:

Parameter Description


Required: must be set to: GetTopPages


Optional - defaults to historic
Either: "fresh" - to query against fresh index, or "historic" - to query against historic index.


Required: query string that one of the following:

  1. Root domain such as:
  2. Sub domain such as:
  3. URL such as: - in this case only this specific URL will be checked


Optional: controls how many URLs a given root domain or subdomain should be returned.

Default: 10
Maximum: 10,000


Optional: Setting to 1 will activate prefix mode.

This operates like the "Path ( URL* )" functionality in Majestic Site Explorer on the website.

This commands will check if real time querying of given item is possible, if that's not the case then RealTimePrefixQueryNotPossible error code will be returned.

See also Get Prefix Query Estimate


This query in the Fresh Index produces the following XML:

This query in the Fresh Index produces the following JSON:

Matches data table will have the following variables:

  1. SearchResultCode: 0 - found data, 1 - not found (domain can be wrong or otherwise no data in index)
  2. TotalMatches: total number of matches in index (same as IndexedURLs returned by GetIndexItemInfo)

Data is returned back in tabled named Matches with columns as follows:

  1. ACRank - ACRank value of the URL
  2. URL - URL from root domain or subdomain
  3. Title - title of the page if it was crawled (FlagPageData set to True) or same value as URL
  4. Date - last crawl date if FlagPageData is True, or first found backlink date otherwise.
  5. FlagPageData - True if the URL was crawled, False otherwise
  6. FlagRedirect - True if the URL was found to be redirecting elsewhere on crawl, False otherwise
  7. FlagFrames - True if this URL is part of frameset (experimental)
  8. ExtBackLinks - number of external backlinks pointing to this URL
  9. RefDomains - number of referring domains pointing to this URL
  10. RefIPs - number of referring IP addresses pointing to this URL
  11. RefSubNets - number of referring IP Class C subnets pointing to this URL
  12. LastCrawlResult - describes the response from attempting to crawl the page
  13. FinalRedirectResult - describes the response from attempting to crawl the page after all redirects are followed
  14. RedirectTo - (optional) the initial redirect location
  15. Citation Flow - Citation Flow of this URL
  16. Trust Flow - Trust Flow of this URL
  17. Topical Trust Flow - Topical Trust Flow Categories for this URL, currently only available in the Fresh Index

DomainInfo table shows additional information on queried domain, specifically:

  1. Domain - domain in question
  2. Found - true if domain was found, false otherwise
  3. SubDomains - number of subdomains on that domain
  4. Pages - number of crawled URLs on that domain
  5. Links - number of links (not yet crawled URLs on that domain)
  6. TotalBackLinks - total number of backlinks
  7. ExtBackLinks - external backlinks
  8. RefDomains - referring domains
  9. FlagRedirects - number of backlinks marked as redirects
  10. FlagFrames - number of backlinks marked as frames
  11. FlagImages - number of backlinks marked as images
  12. FlagNoFollow - number of backlinks marked as nofollow
  13. FlagOldCrawl - number of backlinks marked as deleted (found removed upon recrawl)
  14. PriceTableName - legacy reference, should not be used
  15. TotalMentions - total number of mentions (see Glossary on Majestic site )
  16. MentionDomains - total number of mention domains
  17. PriceChartName - legacy reference, should not be used
  18. RefIPs - number of referring IPs
  19. RefSubNets - number of referring C class subnets
  20. RefDomainsWorld_EDU - number of referring .EDU/.AC/.EDU.xx domains
  21. RefDomainsUSA_EDU - number of exact .EDU domains
  22. RefDomainsWorld_GOV - number of referring .GOV/.MIL/.GOV.xx domains
  23. RefDomainsUSA_GOV - number of referring .GOV/.MIL domains
  24. RefLinksWorld_EDU - number of referring .EDU/.AC/.EDU.xx links
  25. RefLinksUSA_EDU - number of exact .EDU links
  26. RefLinksWorld_GOV - number of referring .GOV/.MIL/.GOV.xx links
  27. RefLinksUSA_GOV - number of referring .GOV/.MIL links

For more information about access to the Majestic API suite, visit our Plans & Pricing page.