-
SEO Learning Center
Broaden your SEO knowledge with resources for all skill levels.
-
The Beginner's Guide to SEO
If you're brand new to SEO, start here.
-
SEO Q&A
Get answers from the Moz Community.
-
Free Downloads and More
Quick access to whitepapers, reports, guides, webinars, and case studies.
-
Help Hub
Learn how to use Moz products.
-
Community & Events
Connect with over 600k online marketers.
-
SEO Training
Instructor-led classes and seminars
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": "b2d341fb-1292-4748-8f0f-63eda90c95a6", "method": "quota.lookup", "params": { "data": { "path": "api.limits.data.rows" } } }'