V1 Example API Call

Example of a Moz Links API Call

Moz Links API calls all share a common format and each part of the API call performs a function.

This documentation outlines the endpoints for now archived V1 Mozscape API endpoints. The new Moz Links API endpoints are available here.

          
<p><code>https://lsapi.seomoz.com/linkscape/url-metrics/moz.com?Cols=4&amp;Limit=10&amp;AccessID=NKzHzYz2BI4SXf&amp;Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC% 3D</code></p>
        

1. API host name and resource

Makes an HTTP or HTTPS request to the host name and resource.The host name and resource for all API calls is lsapi.seomoz.com/linkscape.

          
<p><em><strong>https://lsapi.seomoz.com/linkscape</strong></em>/url-metrics/moz.com?Cols=4&amp;Limit=10&amp;AccessID=NKzHzYz2BI4SXf&amp;Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC% 3D</p>
        

2. Endpoint

Indicates which API command to call.

The specific API endpoint for the set of metrics you want to receive. The call url_metrics returns the metrics you specify using the Cols parameter for a URL you specify.

          
<p>https://lsapi.seomoz.com/linkscape<em><strong>/url-metrics/</strong></em>moz.com?Cols=4&amp;Limit=10&amp;AccessID=NKzHzYz2BI4SXf&amp;Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC% 3D</p>
        

3. Target URL

Specifies a target URL to analyze.

The URL for the link you want to analyze is moz.com.

          
<p>https://lsapi.seomoz.com/linkscape/url-metrics/<em><strong>moz.com</strong></em>?Cols=4&amp;Limit=10&amp;AccessID=NKzHzYz2BI4SXf&amp;Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC% 3D</p>
        

4. Parameters and values

Specifies the parameters for the call.

The ampersand & symbol separates parameters. For example: Cols=4&Limit=10. Each API reference lists which query parameters are valid for each Mozscape call.

The first parameter is Cols=4. The table of Cols values for url_metrics indicates that a Cols value of 4 returns the canonical form of the URL. The second parameter, Limit=10 limits the number of results to the first 10.

Unless you specify one of the Cols parameters (Cols, SourceCols, TargetCols), your API call may be valid but return no information.

          
<p>https://lsapi.seomoz.com/linkscape*/url-metrics/moz.com<strong>?Cols=4&amp;Limit=10</strong>&amp;AccessID=NKzHzYz2BI4SXf&amp;Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC% 3D</p>
        

5. Authentication

Signs the request with your user information and authentication.

The signed authentication string is made up of three components your Access ID, Expires (a Unix timestamp for a future time at which the request will no longer be valid), and Signature (a securely encoded hash of your Access ID, Secret Key, and Expires timestamp). An ampersand & separates each parameter.

          
<p>https://lsapi.seomoz.com/linkscape/url-metrics/moz.com?Cols=4&amp;Limit=10&amp;<em><strong>AccessID=NKzHzYz2BI4SXf&amp;Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC%3D</strong></em></p>
        

6. ? and &

The question mark ? indicates where call parameters begin. An ampersand & separates each parameter.

Response Fields

Response fields label data returned by Moz Links calls. For example, in the JSON response to a call, the data labeled with "luuu" is the canonical form of the target URL. Response fields help you incorporate Moz Links data in your own applications.

For example, for this links call:

          
<p>http://lsapi.seomoz.com/linkscape/links/moz.com%2fblog?SourceCols=4&amp;TargetCols=4&amp;Scope=page&lt;em&gt;to&lt;/em&gt;page&amp;Sort=page_authority&amp;Limit=1&amp;AccessID=NKzHzYz2BI4SXf&amp; Expires=1363389027&amp;Signature=LmXYcPqc%2BkapNKzHzYz2BI4SXfC%3D</p>
        

Moz API returns these response fields:

          
<p><code>{"lrid":348262658841,"lsrc":35752512314,"ltgt":35752512692,"luuu":"moz.com/blog","uu":"moz.com/"*}]</code></p>
        

In this response, the response fields are: * lrid: the internal ID of the link * lsrc: the internal ID of the source URL * ltgt: the internal ID of the target URL * luuu: the canonical form of the target URL * uu: the canonical form of the source URL

Related Articles


Woo! 🎉
Thanks for the feedback.

Got it.
Thanks for the feedback.