GetIndexItemInfo

Status

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

Purpose

This command returns the amount of Analysis Resource units that will be used by the DownloadBacklinks command.

Resources consumed

Resource Description

IndexItemInfoResUnits

This resource will be decreased by the number of items that were queried by this command.

Parameters

Parameter Description

cmd

Required: must be set to: GetIndexItemInfo

datasource

Optional - defaults to historic
Either: "fresh" - to query against Fresh Index, or "historic" - to query against Historic Index.

items

Required: must be a positive integer from 1 to maximum of 100 indicating how many items this query supplies in itemN parameters

item0, item1 ... itemN

One or more items starting from item0 that information

Note: do not forget to URL encode each item even if item may already contain URL encoding.

DesiredTopics

Optional: The number of trust flow topics which will be displayed, this is limited to 30 for Domains, 20 for Subdomains and 10 for URL.

Default: 3

AddAllTopics

Optional: When AddAllTopics=1, This call will return a column called TrustCategories with data similar to below:

Society/Government=19.99%=33,Reference/Education=9.10%=28

EnableResourceUnitFailover

Optional: When all IndexItemInfo resource units have been used setting this parameter to 1 will use Analysis and Retreival Resource units at the rate of 500 Analysis Resource Units per call, plus 50 Analysis Resource Units per item, and 1 Retrieval Resource unit per row returned.

Default: 0

Sample queries and response

This command returns key information about "index items":

  1. Root domain name, ie: example.com - analysis will be done for all urls that belong to this root domain, this will include all subdomains
  2. Subdomain, ie: www.example.com - analysis will be done for all urls that belong to this subdomain
  3. Exact URL, ie: http://www.example.com - analysis will be only done for this particular URL only.
Note: for URLs with very few external backlinks this command may return estimated numbers rather than exact, in which case returned field Status will be set to MayExist.

https://api.majestic.com/api/xml?app_api_key=API_KEY&cmd=GetIndexItemInfo&items=1&item0=http://www.majestic.com&datasource=fresh

This query in the Fresh Index produces the following XML:


			<Result Code="OK" ErrorMessage="" FullError=""><GlobalVars FirstBackLinkDate="2017-07-13" IndexBuildDate="2017-10-15 16:23:38" IndexType="1" MostRecentBackLinkDate="2017-10-14" QueriedRootDomains="0" QueriedSubDomains="0" QueriedURLs="1" QueriedURLsMayExist="0" ServerBuild="2017-10-13 13:57:22" ServerName="QUACKYO" ServerVersion="1.0.6495.23321" UniqueIndexID="20171015162338-FRESH"/><DataTables Count="1"><DataTable Name="Results" RowsCount="1" Headers="ItemNum|Item|ResultCode|Status|ExtBackLinks|RefDomains|AnalysisResUnitsCost|ACRank|ItemType|IndexedURLs|GetTopBackLinksAnalysisResUnitsCost|DownloadBacklinksAnalysisResUnitsCost|DownloadRefDomainBacklinksAnalysisResUnitsCost|RefIPs|RefSubNets|RefDomainsEDU|ExtBackLinksEDU|RefDomainsGOV|ExtBackLinksGOV|RefDomainsEDU_Exact|ExtBackLinksEDU_Exact|RefDomainsGOV_Exact|ExtBackLinksGOV_Exact|CrawledFlag|LastCrawlDate|LastCrawlResult|RedirectFlag|FinalRedirectResult|OutDomainsExternal|OutLinksExternal|OutLinksInternal|OutLinksPages|LastSeen|Title|RedirectTo|Language|LanguageDesc|LanguageConfidence|LanguagePageRatios|LanguageTotalPages|RefLanguage|RefLanguageDesc|RefLanguageConfidence|RefLanguagePageRatios|RefLanguageTotalPages|CrawledURLs|RootDomainIPAddress|TotalNonUniqueLinks|NonUniqueLinkTypeHomepages|NonUniqueLinkTypeIndirect|NonUniqueLinkTypeDeleted|NonUniqueLinkTypeNoFollow|NonUniqueLinkTypeProtocolHTTPS|NonUniqueLinkTypeFrame|NonUniqueLinkTypeImageLink|NonUniqueLinkTypeRedirect|NonUniqueLinkTypeTextLink|RefDomainTypeLive|RefDomainTypeFollow|RefDomainTypeHomepageLink|RefDomainTypeDirect|RefDomainTypeProtocolHTTPS|CitationFlow|TrustFlow|TrustMetric|TopicalTrustFlow_Topic_0|TopicalTrustFlow_Value_0|TopicalTrustFlow_Topic_1|TopicalTrustFlow_Value_1|TopicalTrustFlow_Topic_2|TopicalTrustFlow_Value_2" MaxTopicsRootDomain="30" MaxTopicsSubDomain="20" MaxTopicsURL="10" TopicsCount="3"><Row>0|http://www.majestic.com/|OK|Found|390371|681|390371|6|3|1|5000|390372|63620|358|323|3|11|0|0|1|1|0|0|True|2017-10-14|HTTP_301_PermanentRedirect|True|DownloadedSuccessfully|0|0|1|1| |Majestic┬«: Marketing Search Engine and SEO Backlink Checker|https://majestic.com/| | | | |0| | | | |0|1| |390448|24|0|2421|388515|68837|0|388424|7|2017|662|595|19|681|0|43|32|32|Computers/Internet/Web Design and Development|29|Computers/Internet|28|Business/E-Commerce|25</Row></DataTable></DataTables></Result>
		
https://api.majestic.com/api/json?app_api_key=API_KEY&cmd=GetIndexItemInfo&items=1&item0=http://www.majestic.com&datasource=fresh

This query in the Fresh Index produces the following JSON:


{
  "Code": "OK",
  "ErrorMessage": "",
  "FullError": "",
  "FirstBackLinkDate": "2017-07-13",
  "IndexBuildDate": "2017-10-15 16:23:38",
  "IndexType": 1,
  "MostRecentBackLinkDate": "2017-10-14",
  "QueriedRootDomains": 0,
  "QueriedSubDomains": 0,
  "QueriedURLs": 1,
  "QueriedURLsMayExist": 0,
  "ServerBuild": "2017-10-13 13:57:22",
  "ServerName": "QUACKYO",
  "ServerVersion": "1.0.6495.23321",
  "UniqueIndexID": "20171015162338-FRESH",
  "DataTables": {
    "Results": {
      "Headers": {
        "MaxTopicsRootDomain": 30,
        "MaxTopicsSubDomain": 20,
        "MaxTopicsURL": 10,
        "TopicsCount": 3
      },
      "Data": [
        {
          "ItemNum": 0,
          "Item": "http://www.majestic.com/",
          "ResultCode": "OK",
          "Status": "Found",
          "ExtBackLinks": 390371,
          "RefDomains": 681,
          "AnalysisResUnitsCost": 390371,
          "ACRank": 6,
          "ItemType": 3,
          "IndexedURLs": 1,
          "GetTopBackLinksAnalysisResUnitsCost": 5000,
          "DownloadBacklinksAnalysisResUnitsCost": 390372,
          "DownloadRefDomainBacklinksAnalysisResUnitsCost": 63620,
          "RefIPs": 358,
          "RefSubNets": 323,
          "RefDomainsEDU": 3,
          "ExtBackLinksEDU": 11,
          "RefDomainsGOV": 0,
          "ExtBackLinksGOV": 0,
          "RefDomainsEDU_Exact": 1,
          "ExtBackLinksEDU_Exact": 1,
          "RefDomainsGOV_Exact": 0,
          "ExtBackLinksGOV_Exact": 0,
          "CrawledFlag": "True",
          "LastCrawlDate": "2017-10-14",
          "LastCrawlResult": "HTTP_301_PermanentRedirect",
          "RedirectFlag": "True",
          "FinalRedirectResult": "DownloadedSuccessfully",
          "OutDomainsExternal": "0",
          "OutLinksExternal": "0",
          "OutLinksInternal": "1",
          "OutLinksPages": "1",
          "LastSeen": "",
          "Title": "Majestic®: Marketing Search Engine and SEO Backlink Checker",
          "RedirectTo": "https://majestic.com/",
          "Language": "",
          "LanguageDesc": "",
          "LanguageConfidence": "",
          "LanguagePageRatios": "",
          "LanguageTotalPages": 0,
          "RefLanguage": "",
          "RefLanguageDesc": "",
          "RefLanguageConfidence": "",
          "RefLanguagePageRatios": "",
          "RefLanguageTotalPages": 0,
          "CrawledURLs": 1,
          "RootDomainIPAddress": "",
          "TotalNonUniqueLinks": "390448",
          "NonUniqueLinkTypeHomepages": "24",
          "NonUniqueLinkTypeIndirect": "0",
          "NonUniqueLinkTypeDeleted": "2421",
          "NonUniqueLinkTypeNoFollow": "388515",
          "NonUniqueLinkTypeProtocolHTTPS": "68837",
          "NonUniqueLinkTypeFrame": "0",
          "NonUniqueLinkTypeImageLink": "388424",
          "NonUniqueLinkTypeRedirect": "7",
          "NonUniqueLinkTypeTextLink": "2017",
          "RefDomainTypeLive": "662",
          "RefDomainTypeFollow": "595",
          "RefDomainTypeHomepageLink": "19",
          "RefDomainTypeDirect": "681",
          "RefDomainTypeProtocolHTTPS": "0",
          "CitationFlow": 43,
          "TrustFlow": 32,
          "TrustMetric": 32,
          "TopicalTrustFlow_Topic_0": "Computers/Internet/Web Design and Development",
          "TopicalTrustFlow_Value_0": 29,
          "TopicalTrustFlow_Topic_1": "Computers/Internet",
          "TopicalTrustFlow_Value_1": 28,
          "TopicalTrustFlow_Topic_2": "Business/E-Commerce",
          "TopicalTrustFlow_Value_2": 25
        }
      ]
    }
  }
}
		

Returned values

Returned value Description
Global variables
Code Code indicating whether this command succeeded.
ErrorMessage A message explaining the error. This will be blank if the code is "OK".
FullError Verbose explanation of error.
FirstBackLinkDate Date where the first backlink to this page was found.
IndexType Boolean indicating if the index queried was Historical (0) or Fresh (1).
MostRecentBackLinkDate Date of the most recent backlink to this page in the current index.
QueriedRootDomains Number of root domains queried.
QueriedSubDomains Number of subdomains queried.
QueriedURLs Number of URLs queried.
QueriedURLsMayExist Boolean indicating if the URL(s) queried may have been lost.
ServerBuild Date/time of the server build when this command was executed.
ServerName Name of the server queried when this command was executed.
ServerVersion Version of the server queried.
UniqueIndexID Unique identifier for the index queried when this command was executed.
Results Headers
MaxTopicsRootDomain Number of maximum topics in the root domain.
MaxTopicsSubDomain Number of maximum topics in the sub domain.
MaxTopicsURL Number of maximum topics for this given URL.
TopicsCount Number of topics returned.
Data
ItemNum Position of this item in the parameter list.
Item URL to be checked.
ResultCode Code indicating the status of the query for this item.
Status Status of the command for this item.
ExtBackLinks Number of external backlinks for this item.
RefDomains Number of domains that reference this item.
AnalysisResUnitsCost Cost to analyse this object in AnalysisResUnits.
ACRank ACRank of this item's URL.
ItemType Type of the item:
  1. root domain
  2. sub domain
  3. URL
IndexedURLs Number of URLs found in the index.
GetTopBackLinksAnalysisResUnitsCost Amount of analysis resource units that will be required to analyse this item using GetBackLinkData command. The information above is provided a guidance only - please call this command to get exact values for any specific index items or call GetSubscriptionInfo to get current minimum and maximums.
DownloadBacklinksAnalysisResUnitsCost Amount of analysis resource units that will be required to analyse this item using DownloadBackLinks command.
DownloadRefDomainBacklinksAnalysisResUnitsCost Cost in Analysis Resource Units to download the reference domain backlinks for this item.
RefIPs Number of IPs that refer to this item.
RefSubNets Number of subnets that refer to this item.
RefDomainsEDU Number of educational domains that refer to this item.
ExtBackLinksEDU Number of external backlinks to this item from education
RefDomainsGOV Number of government domains that refer to this item.
ExtBackLinksGOV Number of government external backlinks that link to this item.
RefDomainsEDU_Exact The exact number of educational domains that refer to this item.
ExtBackLinksEDU_Exact The number of educational external backlinks that link to this item.
RefDomainsGOV_Exact The exact number of government domains that refer to this item.
ExtBackLinksGOV_Exact The exact number of government links that refer to this item.
CrawledFlag Boolean indicating whether this page has been crawled.
LastCrawlDate Date indicating the last time the page was crawled.
LastCrawlResult String indicating the HTTP response last time this page was crawled.
RedirectFlag Boolean indicating if this domain redirects elsewhere.
FinalRedirectResult Textual explanation of the result of the last redirect.
OutDomainsExternal For URLs, this is the number of outgoing links to unique domains for that page. For subdomains and root domains, average numbers are shown.
OutLinksExternal The number of outgoing links for this domain.
OutLinksInternal For URLs, this is the number of internal links for that page. For subdomains and root domains, average numbers are shown.
OutLinksPages For URLs, this is the number of pages that had non-zero outgoing link information for this URL. For subdomains and root domains, average numbers are shown.
LastSeen If this item has been lost from the index, the date at which it was last seen.
Title Title of the item.
RedirectTo URL that this item redirects to.
Language For URLs, this is the language code for the source page. For subdomains and root domains, this is the detected languages for each page on that domain. This may be a comma delimited string to support multiple languages (i.e. en,de).
LanguageDesc This is the English name of the language codes. This may be a comma delimited string to support multiple languages (i.e. English,German).
LanguageConfidence Percentages indicating the confidence of the language. This may be a comma delimited string to support multiple languages (i.e. 90,80).
LanguagePageRatios Percentages indicating how much of the page is in a certain language. This may be a comma delimited string to support multiple languages (i.e. 77.9,10.3).
LanguageTotalPages This is the total number of language detected pages that were taken into account. The language page ratios are calculated against this number.
RefLanguage This is the detected languages of incoming anchor text. This may be a comma delimited string to support multiple languages (i.e. en,de).
RefLanguageDesc This is the English name of the referring language codes. This may be a comma delimited string to support multiple languages (i.e. English,German).
RefLanguageConfidence Percentages indicating the confidence of the referring languages. This may be a comma delimited string to support multiple languages (i.e. 90,80).
RefLanguagePageRatios Percentages indicating how much of the referring anchor text is in a certain language. This may be a comma delimited string to support multiple languages (i.e. 77.9,10.3).
RefLanguageTotalPages This is the total number of referring anchor text that were taken into account to determine referring languages. The referring language page ratios are calculated against this number.
CrawledURLs Number of URLs crawled in this query.
RootDomainIPAddress The IP address of the root domain where available.
TotalNonUniqueLinks The total number of non-unique links. This number is calculated by summing up the following columns: NonUniqueLinkTypeFrame NonUniqueLinkTypeImageLink NonUniqueLinkTypeRedirect NonUniqueLinkTypeTextLink This number can be used for percentage comparisons for the following columns: NonUniqueLinkTypeHomepages NonUniqueLinkTypeIndirect NonUniqueLinkTypeDeleted NonUniqueLinkTypeNoFollow NonUniqueLinkTypeProtocolHTTPS
NonUniqueLinkTypeHomepages Number of non-unique link types that are found on the homepage of a domain.
NonUniqueLinkTypeIndirect Number of non-unique indirect links to this item.
NonUniqueLinkTypeDeleted Number of non-unique deleted links to this item.
NonUniqueLinkTypeNoFollow Number of non-unique links with NoFollow set to true.
NonUniqueLinkTypeProtocolHTTPS Number of non-unique links which use HTTPS as a protocol.
NonUniqueLinkTypeFrame Number of non-unique links which are in an i-frame.
NonUniqueLinkTypeImageLink Number of non-unique links which are in an image.
NonUniqueLinkTypeRedirect Number of non-unique links which are redirects.
NonUniqueLinkTypeTextLink Number of non-unique text links.
RefDomainTypeLive The number of referring domains with at least 1 live link (as in not marked as deleted).
RefDomainTypeFollow The number of referring domains with at least 1 follow link.
RefDomainTypeHomepageLink The number of referring domains with at least one link from a homepage (includes any hostname on them).
RefDomainTypeDirect The number of referring domains with at least 1 direct link.
RefDomainTypeProtocolHTTPS The number of referring domains with at least 1 HTTPS protocol URL pointing to the target.
CitationFlow CitationFlow value for this item
TrustFlow TrustFlow value for this item.
TrustMetric TrustMetric value for this item.
TopicalTrustFlow_Topic_x TopicalTrustFlow topic for this item.
TopicalTrustFlow_Value_x Value for the given TopicalTrustFlow topic.

Common Problems

Problem Solution
Calling this command in a loop to look up backlink counts for each of the many URLs separately is slow. Batch multiple URLs or domains into a single request to limit overhead and provide a very substantial increase in performance.
Certain URLs return backlink counts that are inconsistent with the results obtained on the webpage. Check that Status is not set to "MayExist" as this means that backlink counts are less than specified backlink values.
Attempts to obtain backlink counts for a specific domain return the counts for the homepage. Avoid adding protocols (http://) or any other characters that are not part of valid domain name as this will result in the system returning data for that URL.
Counts returned by this command are inconsistent with AnalyseIndexItem/DownloadBackLinks. Please check that your filtering options aren't too narrow.