Authentication Guide

Sign-up & Token Generation

To access the Moz API, you must first sign up for an API account if you haven’t done so already. If you already have a Moz account, you can sign in and head to the API pricing page to sign up for API access. The Moz API requires a separate subscription from Moz Pro.

A free tier is available for users who wish to test the API before purchasing, offering 50 rows of data per month. To sign up for a free account, a valid, non-expired credit card is required. Your card will not be charged unless you choose to upgrade to a paid tier later on.

After creating and/or logging into your account, navigate to the Moz API dashboard to generate an API token. Each account can have up to 5 API tokens active at any given time. API tokens can be deleted after creation, but please note that once deleted, any code using these tokens for authentication will no longer function properly.

Authenticating Requests

To authenticate requests to the API, simply include a custom x-moz-token header with the value set to one of your API tokens every time you send a POST request to https://api.moz.com/jsonrpc. API tokens can be created and viewed on the Moz API dashboard.

Sample Code

curl -X POST https://api.moz.com/jsonrpc \
-H "x-moz-token: <YOUR_MOZ_TOKEN>" \
-H "Content-Type: application/json" \
-d '
{
  "jsonrpc": "2.0",
  "id": "410939fa-5647-467c-a5f9-5ed3544788bc",
  "method": "quota.lookup",
  "params": {
    "data": {
      "path": "api.limits.data.rows"
    }
  }
}'