GetPrefixQueryEstimate

Status

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

Purpose

This command checks if real time querying of a given item is possible.

Resources consumed

Resource Description

AnalysisResUnits

100

RetrievalResUnits

0

Parameters

Parameter Description

cmd

Required: must be set to: GetPrefixQueryEstimate

item

Required: for queried item: http://www.api.majestic.com for URL or www.api.majestic.com for subdomain or api.majestic.com for root domain

type

Optional way to force item to required type

exactmode

Optional, if set to 1 then in cases when estimated links are fairly low exact check will be done,
this should be used in cases when report is about to get created, but NOT for fast checks like in Site Explorer to see if real time query in other command is possible

Sample queries and response

XML response

<?xml version="1.0" encoding="UTF-8"?>
<Result Code="OK" ErrorMessage="" FullError="">
<GlobalVars ActualCountsAvailable="1" ActualExtBackLinks="27" ActualURLs="136" ChargedAnalysisResUnits="100" EstimatedExtBackLinks="27" IndexBuildDate="2017-09-04 13:42:54" IndexType="0" RealTimeQueryAllowed="1" RemainingAnalysisResUnits="97093051" RemainingRetrievalResUnits="19462890" ServerBuild="2017-10-13 13:57:22" ServerName="SHADOJAGUAR" ServerVersion="1.0.6495.23321" UniqueIndexID="20170904134254-HISTORICAL" />
</Result>

JSON response

{
  "Code": "OK",
  "ErrorMessage": "",
  "FullError": "",
  "ActualCountsAvailable": 1,
  "ActualExtBackLinks": 27,
  "ActualURLs": 136,
  "ChargedAnalysisResUnits": 100,
  "EstimatedExtBackLinks": 27,
  "IndexBuildDate": "2017-09-04 13:42:54",
  "IndexType": 0,
  "RealTimeQueryAllowed": 1,
  "RemainingAnalysisResUnits": 97092951,
  "RemainingRetrievalResUnits": 19462890,
  "ServerBuild": "2017-10-13 13:57:22",
  "ServerName": "SHADOJAGUAR",
  "ServerVersion": "1.0.6495.23321",
  "UniqueIndexID": "20170904134254-HISTORICAL"
}

Returned values

Return Value Description
Global variables
Code Code indicating if this command executed successfully.
ErrorMessage A message explaining the error. This will be blank if the code is "OK".
FullError Verbose explanation of error.
ActualCountsAvailable Boolean indicating if precise counts are available for this item.
ActualExtBackLinks Number of external backlinks to this URL.
ActualURLs Number of URLs from this page.
ChargedAnalysisResUnits Number of analysis Res units charged to execute a query.

EstimatedExtBacklinks

Estimate of the number of backlinks to this page.

IndexBuildDate Date/time the index that was queried was last updated.
IndexType Indicates if the index was Historic (0) or Fresh (1).

RealTimeQueryAllowed

If 1 then this prefix query can be used in real-time commands, otherwise only option to get data is to call DownloadBackLinks

RemainingAnalysisResUnits Number of analysis res units the user has remaining.
RemainingRetrievalResUnits Number of retrieval res units the user has remaining.
ServerBuild Date/time the server was built.
ServerName Name of the server queried.
ServerVersion Version of the server queried.
UniqueIndexID Unique identifier for the index consisting of the date and index type.