GetRefDomains

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

This function operates on domain, subdomain or URL level, and returns information about the relationships between domains

It is a replacement for GetLinkedDomains

Resource Description

AnalysisResUnits

1000

RetrievalResUnits

This resource will be decreased by actual number of rows of data retrieved (returned) by this function.

This function accepts the following parameters:

Parameter Description

cmd

Required: must be set to: GetRefDomains

datasource

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

item0, item1, item2, item 3

URL, subdomain or rootdomain level

Count

Number of results to be returned back.

Default: 100

AnalysisDepth

Maximum number of referring domains to be used for each of the root domains queried in case they have more. If number of referring domains exceeds this value then top domains will be used. Sorting criteria in this case is subject to change but current is AlexaRank in ascending order thus giving preference to domains with more traffic.

Default: 1000 Maximum: 100000

MinMatchesRequired

Minimum number of matches required - useful to limit the list of cross matched domains to only those that have at least 2 or more matches.

Default: 1

OrderBy1

Integer value that controls how results will be ordered (sorted):

0: sorted by number of matches
1: AlexaRank (lowest number means higher traffic)
2: number of referring root domains linking to a root domain.
3: number of external backlinks linking to a root domain.
4: number of URLs from root domain added to our index, includes both crawled and uncrawled URLs.
5: number of URLs from root domain that were crawled by our crawlers.
6: The date when this root domain was first crawled: this can be treated as "domain age" with earliest date being Jun 2006 - any domain close to this date may have existed before
7: The date when we last successfully crawled any URL on this root domain
8: IP address of the domain.
9: C-class subnet of the IP address of the domain
10: Country code of the domain where it is hosted based on geo-location of its IP address
11: Number of matched links (useful when querying data for multiple domains)

This parameter can be combined with secondary sorting.

OrderDir1

Direction of sorting: 1 for descending, 0 - ascending.

OrderBy2

Secondary sorting parameter - input values are the same OrderBy1.

OrderDir2

Direction of sorting for secondary sorting parameter.

UsePrefixScan

Optional: Setting to 1 will activate prefix mode.

This operates like the "Path ( URL* )" functionality in Majestic Site Explorer on the majestic.com 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

Example:
https://api.majestic.com/api/xml?app_api_key=API_KEY&cmd=GetRefDomains&item0=majestic.com&Count=10&datasource=fresh

This query in the Fresh Index produces the following XML:



https://api.majestic.com/api/json?app_api_key=API_KEY&cmd=GetRefDomains&item0=majestic.com&Count=10&datasource=fresh

This query in the Fresh Index produces the following JSON:

Data is returned back in table named Results with columns as follows:

  1. Position - Relative position based on your order by selection
  2. Domain - The referring domain which matches at least 1 of the items in your request
  3. RefDomains - Number of ref domains the Domain as listed in 'Domain' has
  4. AlexaRank - Alexa Rank of the root domain (only valid for top 1 mln domains), see more for details: http://www.alexa.com/help/traffic-learn-more
  5. Matches - How many items in your list of submitted items0, item1... are linked to by this domain
  6. MatchedLinks - Cumulative total number of backlinks from this domain to all submitted items
  7. ExtBackLinks - number of external backlinks pointing to the root domain listed in the 'Domain' field
  8. IndexedURLs - number of unique URLs in index (includes crawled and uncrawled) for the domain listed in the 'Domain' field
  9. CrawledURLs - number of unique URLs that were crawled of the domain listed in the 'Domain' field
  10. FirstCrawled - date when domain was first crawled
  11. LastSuccessfulCrawl - date when domain was last successfully crawled
  12. IP - IPv4 Address of the domain (note: for hosts with multiple IPs only one IP will be taken)
  13. SubNet - calculated from IP
  14. CountryCode - geo-located country of hosting based on IP address
  15. TLD - top level domain of the root domain
  16. Citation Flow - Citation Flow of domain
  17. Trust Flow - Trust Flow of domain
  18. TopicalTrustFlow_Topic_0 - Highest Trust Flow Category of the domain. Only returned in the Fresh Index.
  19. TopicalTrustFlow_Value_0 - Value of the highest Topical Trust Flow for this category of the domain.
  20. BackLinks_<item0> - Number of backlink from the domain listed in domain to the submitted item0
  21. FirstLinkDate_<item0> - Date the first backlink was found between the domain and item0 (within the last 90 days if querying fresh index)
  22. LastLinkDate_<item0> - The last date any link between Domain and item0 was visited by our bots
  23. last 3 fields repeated for all items

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