GetHostedDomains

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

This function is designed to return domains co-hosted on known IP address or domain (IP address in this case will be looked up).

Example of data returned by this function can be found in the Neighbourhood checker tool used on our website: https://www.majestic.com/reports/neighbourhood-checker

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

Resource Description

AnalysisResUnits

AnalysisResUnits will be reduced by GetHostedDomainsAnalysisResUnitsCost reported by GetSubscriptionInfo.

RetrievalResUnits

RetrievalResUnits will be reduced by actual number of returned rows of data, up to a maximum specified by providing MaxDomains parameter to this function or it's default value.

This function accepts the following parameters:

Parameter Description

cmd

Required: must be set to: GetHostedDomains

datasource

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

Domain

Required: Domain (root domain will be extracted in case of subdomains) or IP (v4) address to check.

MaxDomains

Maximum number of domains to be returned.

Default: 10 Maximum: 100

Note: actual number of returned domains can be lower than requested if there are not enough of them found in index.

Example:
https://api.majestic.com/api/xml?app_api_key=APP_KEY&cmd=GetHostedDomains&Domain=www.google.com&datasource=fresh

This query in the Fresh Index produces the following XML:



https://api.majestic.com/api/json?app_api_key=APP_KEY&cmd=GetHostedDomains&Domain=www.google.com&datasource=fresh

This query in the Fresh Index produces the following JSON:

Note that no data was returned, this is because large sites like google.com would often have round robin DNS, in our system we will store only first IP address which in case of clash would be recommended to subsequently query, returned as RecommendedIP="173.194.41.148".

Subsequently another query will need to be run:

https://api.majestic.com/api/xml.php?app_api_key=APP_KEY&cmd=GetHostedDomains&Domain=173.194.41.148&datasource=fresh



https://api.majestic.com/api/json?app_api_key=APP_KEY&cmd=GetHostedDomains&Domain=173.194.41.148&datasource=fresh

This query in the Fresh Index produces the following JSON:


Note: data is returned for both exact IP address as well as Class C subnet. For each of the co-hosted domains number of referring domains and external backlinks are provided, and that list is sorted by referring domain. In the event when too many domains hosted on the same IP or subnet additional variables provide overall information:

  1. TotalDomains - total number of domains hosted on that IP/subnet
  2. TotalExtBackLinks - total number of external backlinks pointing to all domains hosted on that IP/subnet
  3. TotalRefDomains - total number of referring domains pointing to all domains hosted on that IP/subnet
  4. TopicalTrustFlow_Topic_0 - most significant Topical Trust Flow category for each domain
  5. TopicalTrustFlow_Value_0 -value of Topical Trust Flow for listed category

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