How to Connect to Ahrefs

How to Connect to Ahrefs

Info
Connecting Ahrefs to Power My Analytics takes two quick steps: create an API key in Ahrefs, then add Ahrefs as a data source in your Hub. This guide walks you through both, plus how to remove the connection later if you need to. For what you can report on once you are connected, see the Ahrefs Data Connector User Guide.
Notes
Ahrefs is a Beta connector. It is available and supported now; while it is in Beta, some fields and behavior may still change as we continue to improve it.

Requirements

  • A paid Ahrefs subscription that includes API access (Ahrefs API v3). Ahrefs plans without API access cannot connect.
  • Owner or admin access to your Ahrefs workspace. Only workspace owners and admins can create API keys.
Notes
Choose who creates the key. Ahrefs API keys expire after one year, and a key also stops working if the person who created it is removed from your Ahrefs workspace. Create the key with an owner or admin account that will stay with your workspace, and plan to replace the key before it expires.

Connect Ahrefs to Power My Analytics

Step 1: Create an API key in Ahrefs

  1. Sign in to Ahrefs as a workspace owner or admin.
  2. Go to Account settings > API keys, or open app.ahrefs.com/account/api-keys directly.
  3. Create a new API key.
  4. Copy the key so it is ready to paste into Power My Analytics.

Step 2: Add Ahrefs as a data source in your Hub

  1. In your Power My Analytics Hub, select Sources from the menu.
  2. Click + Add new source.
  3. Choose Ahrefs from the connector gallery.
  4. In the Connect Ahrefs window, paste your API key into the API Token field. (Ahrefs calls this credential an API key; the Hub labels the field API Token.)
  5. Enter an Account Name to help you identify this account, such as "Agency Ahrefs."
  6. Click Connect.
Your Ahrefs account is now connected. Because Ahrefs is a live connector, there is no backfill to wait for: your reports request data directly from Ahrefs each time they load. To build your first report, see the Ahrefs Data Connector User Guide.

Troubleshooting Connection Errors

  • "Ahrefs API access denied": Your Ahrefs plan does not include API access. Upgrade to an Ahrefs plan that includes API access, then connect again.
  • "Invalid Ahrefs API token": The API key is incorrect, revoked, or expired. Copy the full key again (without extra spaces), or create a new key in Ahrefs and connect with it.
For other issues, see Basic Troubleshooting.

Remove Your Ahrefs Data Source from Power My Analytics

Removing Ahrefs is a two-part process: first remove the data source from your Hub, then revoke the API key in Ahrefs so access is fully removed.

Step 1: Removing an Ahrefs Data Source from Your Hub

  1. In your Hub, select Sources from the menu.
  2. Locate your Ahrefs data source in the list.
  3. Open the three-dot Action menu and select Remove source, then click Confirm.

Step 2: Revoking the API Key in Ahrefs

Because Power My Analytics connects with an API key you created, revoking that key in Ahrefs fully removes access.
  1. In Ahrefs, go to Account settings > API keys.
  2. Find the key you created for Power My Analytics and revoke it.
Notes
If you plan to reconnect later, you can leave the key in place until it expires. Any Data Studio reports that use your Ahrefs data source will stop returning data once the source is removed.
Still have questions? Submit a ticket and our support team will be glad to help.