Majestic Developer | GetLinkProfile - Majestic Developer

GetLinkProfile

Status

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

Purpose

This command returns the data used to generate link profile graphs.

Resources consumed

Resource Description

AnalysisResUnits

500

RetrievalResUnits

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

Parameters

Parameter Description

cmd

Required: must be set to: GetLinkProfile

datasource

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

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.

datatype0, datatype1 ... datatypeN

Referring to each respective item (item0, item1 ... itemN) request either link level or domain level flow metric to be returned

0 - default: link level profile
1 - referring domains

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 command will check if real time querying of given item is possible, if that's not the case then RealTimePrefixQueryNotPossible error code will be returned.

Sample queries and response

The following responses have been reduced to improve readability. Please note that the actual responses will have significantly more elements in data, but have the same return values.

XML response

<?xml version="1.0" encoding="UTF-8"?><Result Code="OK" ErrorMessage="" FullError="">
<GlobalVars IndexBuildDate="2017-09-04 13:42:54" IndexType="0" ServerBuild="2017-10-13 13:57:22" ServerName="SHADOJAGUAR" ServerVersion="1.0.6495.23321" UniqueIndexID="20170904134254-HISTORICAL" />
<DataTables Count="2">
<DataTable Name="Items" RowsCount="1" Headers="OrigItem|Item|Status|ItemType|DataType|MatrixTableName">
<Row>majestic.com|majestic.com|OK|RootDomain|Links|RankingMatrix_0</Row>
</DataTable>
<DataTable Name="RankingMatrix_0" RowsCount="1481" Headers="CitationFlow|TrustFlow|Value" MaxValue="27260561" TotalValues="28509539">
<Row>0|0|27260561</Row>
<Row>0|1|32</Row>
<Row>0|2|61</Row>
<Row>0|3|6</Row>
<Row>0|4|19</Row>
<Row>0|6|2</Row>
<Row>0|8|3</Row>
<Row>0|10|1</Row>
</DataTable>
</DataTables>
</Result>

JSON response

{
"Code": "OK",
"ErrorMessage": "",
"FullError": "",
"IndexBuildDate": "2017-09-04 13:42:54",
"IndexType": 0,
"ServerBuild": "2017-10-13 13:57:22",
"ServerName": "SHADOJAGUAR",
"ServerVersion": "1.0.6495.23321",
"UniqueIndexID": "20170904134254-HISTORICAL",
"DataTables": {
  "Items": {
    "Headers": {},
    "Data": [
      {
        "OrigItem": "majestic.com",
        "Item": "majestic.com",
        "Status": "OK",
        "ItemType": "RootDomain",
        "DataType": "Links",
        "MatrixTableName": "RankingMatrix_0"
      }
    ]
  },
  "RankingMatrix_0": {
    "Headers": {
      "MaxValue": 27260561,
      "TotalValues": 28509539
    },
    "Data": [
		{
			"CitationFlow": 0,
			"TrustFlow": 0,
			"Value": 27260561
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 1,
			"Value": 32
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 2,
			"Value": 61
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 3,
			"Value": 6
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 4,
			"Value": 19
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 6,
			"Value": 2
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 8,
			"Value": 3
		},
		{
			"CitationFlow": 0,
			"TrustFlow": 10,
			"Value": 1
		},
    ]
  }
}
}

Returned values

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.
IndexBuildDate Date/time the index that was queried was last updated.
IndexType Indicates if the index was Historic (0) or Fresh (1).
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.
Items Data
OrigItem Item passed through as a parameter.
Item Item which is used to complete this command.
Status Textual description of command status.
ItemType Item type (URL/root domain/subdomain)
DataType Type of data analysed by the command.
MatrixTableName Name of the table containing data for this item.
RankingMatrix Headers
MaxValue Largest link value.
TotalValues Sum of all link values.
RankingMatrix Data
CitationFlow CitationFlow value for this link.
TrustFlow TrustFlow value for this link.
Value Value of this link.

Related commands

For another command related to checking real time querying, please see the documentation regarding GetPrefixQueryEstimate.