GetTopics

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

This function is designed to return Topical Trust Flow data.

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

Resource Description

AnalysisResUnits

1000

RetrievalResUnits

RetrievalResUnits will be reduced by actual number of returned rows of data.

This function accepts the following parameters:

Parameter Description

cmd

Required: must be set to: GetTopics

datasource

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

Item

Required: query string that one of the following:

  1. Root domain such as: example.com
  2. Sub domain such as: www.example.com
  3. URL such as: http://www.example.com - in this case only this specific URL will be checked

Count

Optional: maximum number of rows to be returned.

Default: 100
Max: All topics (actual number may change check TotalResults)

From

Optional: row number to start returning data from for pagnation.

Default: 1
Max: TotalResults

SortBy

Optional:

  • trustflow&links - (default) by Topical Trust Flow descending and then by links descending. The '&' will need encoding
  • topic - by topic (text)
  • links - by links
  • pages - by pages
  • refdomains - by refdomains
  • linksfromrefdomains - by links from ref domains

SortOrder

Optional:

  • asc - ascending
  • desc - (default) descending

UsePrefixScan

This parameter indicates that you would like links to any page under the specified prefix

eg setting
item=http://www.site.com/folder/
and
UsePrefixScan=1
will return any links to any page on www.site.com under /folder/

Default: 0

Example:
https://api.majestic.com/api/xml?app_api_key=API_KEY&cmd=GetTopics&item=majestic.com&datasource=fresh&count=10

This query in the Fresh Index produces the following XML:



https://api.majestic.com/api/json?app_api_key=APP_KEY&cmd=GetTopics&item=majestic.com&datasource=fresh&count=10

This query in the Fresh Index produces the following JSON:

Topics data table will have the following variables:

  1. Count: Number of rows requested
  2. From: Starting row requested
  3. SortBy: Requested Sort By Field
  4. SortOrder: Sort Order Requested
  5. TotalResults: Total number of results found in the index for this domain

Data is returned back in tabled named Topics with columns as follows:

  1. Topic - The Topic for which the following links have been found
  2. Links - Number of links which directly pass trust flow of this topic
  3. TopicalTrustFlow - A value indicating the amount of trust flow passed by these links
  4. LinksFromRefDomains - Links which come from a domain which has this topic associated with it
  5. RefDomains - A count of the topical domains that point to the site/domain/URL
  6. Pages - Number of pages on the target site/domain/URL which have this topic associated with them

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