V1 Example API Call
Example of a Moz API V1 Call
Moz API V1 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 API endpoints. The Moz API V2 endpoints are available here.
<p><code>https://lsapi.seomoz.com/linkscape/url-metrics/moz.com?Cols=4&Limit=10&AccessID=NKzHzYz2BI4SXf&Expires=1363389027&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&Limit=10&AccessID=NKzHzYz2BI4SXf&Expires=1363389027&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&Limit=10&AccessID=NKzHzYz2BI4SXf&Expires=1363389027&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&Limit=10&AccessID=NKzHzYz2BI4SXf&Expires=1363389027&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&Limit=10</strong>&AccessID=NKzHzYz2BI4SXf&Expires=1363389027&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&Limit=10&<em><strong>AccessID=NKzHzYz2BI4SXf&Expires=1363389027&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&TargetCols=4&Scope=page<em>to</em>page&Sort=page_authority&Limit=1&AccessID=NKzHzYz2BI4SXf& Expires=1363389027&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
Was this article helpful?
Yes! Amazing! Yes! It was what I needed. Meh. It wasn’t really what I was looking for. No, it wasn’t helpful at all.
Thanks for the feedback.