Ahrefs + Google Sheets

Connect Ahrefs to Google Sheets and Automate Your SEO Reporting

Sync keyword rankings, backlink data, and site audit results from Ahrefs directly into Google Sheets — no manual exports required.

Why integrate Ahrefs and Google Sheets?

Ahrefs is one of the most powerful SEO platforms available, giving marketers deep visibility into keyword rankings, backlink profiles, organic traffic estimates, and competitor analysis. Google Sheets is where most teams actually do something with that data — organizing it, sharing it, building reports around it. The two tools belong together: Ahrefs surfaces the SEO intelligence, and Google Sheets becomes the reporting layer where stakeholders can act on it.

Automate & integrate Ahrefs & Google Sheets

Use case

Automated Weekly Keyword Ranking Reports

Automatically pull keyword position data from Ahrefs on a weekly schedule and append it to a Google Sheet, creating a rolling rank-tracking log. Each row captures the keyword, current position, previous position, search volume, and URL — giving your team a historical record without any manual effort.

Use case

Backlink Monitoring Dashboard

Sync new and lost backlinks detected by Ahrefs into a dedicated Google Sheet in near real time. Each entry logs the referring domain, anchor text, target URL, domain rating, and discovery date — giving your link-building team a single source of truth for outreach prioritization.

Use case

Competitor SEO Benchmarking Tracker

Pull domain-level metrics for your competitors from Ahrefs — including Domain Rating, organic traffic estimates, and referring domains — and log them into a Google Sheet on a recurring schedule. Over time, you get a competitive benchmarking report that shows shifts in competitor authority you'd otherwise miss.

Use case

Site Audit Issue Logging and Prioritization

After each Ahrefs Site Audit crawl, automatically export identified technical SEO issues into a structured Google Sheet, organized by severity and issue type. Teams can then use Google Sheets' filtering and sorting to prioritize fixes and track remediation progress over time.

Use case

Content Gap Analysis Reporting

Use tray.ai to run scheduled content gap queries in Ahrefs and pipe the results — including missing keywords, competitor ranking URLs, and search volumes — into a Google Sheet. Content teams can then review and prioritize new content opportunities directly inside Sheets.

Use case

Multi-Client SEO Reporting for Agencies

For agencies managing multiple client accounts, tray.ai can loop through a list of client domains stored in Google Sheets, query Ahrefs for each domain's metrics, and write results back to individual client tabs or sheets automatically. No more running and formatting separate reports for every account.

Use case

Organic Traffic Trend Monitoring

Automatically sync Ahrefs organic traffic estimates for your tracked URLs into Google Sheets on a daily or weekly cadence, building a time-series dataset that makes traffic trends immediately visible. Teams can overlay this data with other marketing metrics already in Sheets for richer cross-channel analysis.

Get started with Ahrefs & Google Sheets integration today

Ahrefs & Google Sheets Challenges

What challenges are there when working with Ahrefs & Google Sheets and how will using Tray.ai help?

Challenge

Keeping Ahrefs Data Fresh Without Manual Exports

Ahrefs data changes constantly — keyword rankings shift daily, new backlinks are discovered hourly, and audit results update after every crawl. Teams relying on manual CSV exports quickly find their Google Sheets out of date, and decisions get made on SEO data that's already wrong.

How Tray.ai Can Help:

tray.ai lets you schedule Ahrefs API calls at any frequency — hourly, daily, or weekly — and automatically write the latest data into your Google Sheets. Your spreadsheets stay current without anyone touching them, so all reporting and analysis is always based on the most recent Ahrefs data available.

Challenge

Handling Large Volumes of Keyword and Backlink Data

Enterprise SEO programs often track thousands of keywords or monitor backlink profiles with tens of thousands of links. Pulling, formatting, and writing this volume of data into Google Sheets manually isn't just time-consuming — it frequently breaks due to spreadsheet row limits, formatting errors, or API throttling.

How Tray.ai Can Help:

tray.ai's workflow engine handles pagination and large data sets natively, breaking Ahrefs API responses into manageable chunks and writing them to Google Sheets in batches. Built-in error handling and retry logic mean large jobs complete reliably, even when you're pushing thousands of rows of SEO data.

Challenge

Managing Multi-Client or Multi-Domain Reporting at Scale

Agencies and in-house teams managing multiple brands face an exponential reporting burden. Running Ahrefs exports and updating separate Google Sheets for each client or domain manually doesn't scale — the result is inconsistent report formats and missed deadlines.

How Tray.ai Can Help:

With tray.ai, you can build a single workflow that reads a dynamic client or domain list from Google Sheets, loops through each entry, queries Ahrefs individually, and writes results back to the correct destination — all without duplicating workflows. One automated template can cover an entire agency's reporting needs.

Challenge

Avoiding Data Duplication and Overwriting in Sheets

When workflows run on a schedule, a common problem is duplicate rows being appended or previous data being unintentionally overwritten in Google Sheets. For historical rank tracking or audit logs, that kind of data corruption is hard to catch and harder to fix.

How Tray.ai Can Help:

tray.ai gives you fine-grained control over how data lands in Google Sheets — append new rows, update existing rows matched by a key column, clear specific ranges before rewriting, or write to date-stamped tabs. Your Ahrefs data goes exactly where it's supposed to, every time.

Challenge

Connecting Ahrefs API Responses to Structured Sheet Formats

Ahrefs API responses return nested JSON objects that don't map directly to a flat spreadsheet row. Transforming those responses into the right column structure for Google Sheets requires scripting knowledge that most SEO teams and analysts simply don't have.

How Tray.ai Can Help:

tray.ai's built-in data transformation tools let you map, flatten, and reformat Ahrefs API responses visually, without writing code. You define which fields go into which columns, rename headers, apply filters, and handle missing values — so you get clean, well-structured Sheets output from complex Ahrefs API data.

Start using our pre-built Ahrefs & Google Sheets templates today

Start from scratch or use one of our pre-built Ahrefs & Google Sheets templates to quickly solve your most common use cases.

Ahrefs & Google Sheets Templates

Find pre-built Ahrefs & Google Sheets solutions for common use cases

Browse all templates

Template

Weekly Ahrefs Keyword Rankings to Google Sheets

This template runs every Monday morning, pulls the latest keyword ranking positions for your tracked keywords from Ahrefs, and appends a timestamped row for each keyword into a designated Google Sheet tab — creating an always-current rank tracking log.

Steps:

  • Trigger workflow on a weekly schedule (e.g., every Monday at 7 AM)
  • Query Ahrefs Keywords Explorer or Rank Tracker for current keyword positions
  • Format the response data including keyword, position, volume, and URL
  • Append each keyword row to the designated Google Sheet with a date stamp

Connectors Used: Ahrefs, Google Sheets

Template

New Backlinks Detected in Ahrefs → Log to Google Sheets

Monitors Ahrefs for newly discovered backlinks to your domain and automatically writes each new link — including referring domain, DR, anchor text, and target URL — into a Google Sheet backlink log, keeping your team informed without manual monitoring.

Steps:

  • Trigger workflow on a daily or real-time schedule
  • Fetch newly discovered backlinks from Ahrefs Site Explorer
  • Filter for links above a minimum Domain Rating threshold if desired
  • Append qualifying backlinks as new rows in the Google Sheets backlink tracker

Connectors Used: Ahrefs, Google Sheets

Template

Ahrefs Site Audit Results → Google Sheets Issue Tracker

After each Ahrefs Site Audit completes, this template automatically pulls the full list of crawl issues, categorizes them by severity and type, and writes them into a Google Sheet where your team can assign, track, and resolve each issue.

Steps:

  • Trigger workflow when an Ahrefs Site Audit crawl completes
  • Retrieve all flagged issues via the Ahrefs API, including severity and affected URLs
  • Clear the existing issues tab in Google Sheets to avoid duplication
  • Write the updated issue list to Google Sheets, sorted by severity

Connectors Used: Ahrefs, Google Sheets

Template

Competitor Domain Metrics Tracker — Ahrefs to Google Sheets

On a weekly schedule, this template queries Ahrefs for Domain Rating, organic traffic, and referring domain counts for a predefined list of competitor domains stored in Google Sheets, then writes the results back alongside each competitor for ongoing benchmarking.

Steps:

  • Trigger on a weekly schedule
  • Read the list of competitor domains from the Google Sheet input tab
  • Loop through each domain and query Ahrefs Site Explorer for metrics
  • Write fetched metrics back to the corresponding row in the Google Sheet with a date stamp

Connectors Used: Ahrefs, Google Sheets

Template

Multi-Client Agency SEO Report Builder

Built for SEO agencies, this template reads a master client list from Google Sheets, queries Ahrefs for each client's domain metrics in sequence, and populates individual reporting tabs per client — delivering a fully automated multi-client reporting workflow.

Steps:

  • Trigger on a monthly or weekly schedule
  • Read the client domain list and corresponding sheet tab names from a master Google Sheet
  • For each client, query Ahrefs for organic traffic, DR, backlinks, and top keywords
  • Write results to each client's dedicated tab and update a summary dashboard row

Connectors Used: Ahrefs, Google Sheets

Template

Content Gap Keywords from Ahrefs → Google Sheets Content Calendar

Runs a content gap analysis in Ahrefs comparing your domain against specified competitors, then pushes the top keyword opportunities into a Google Sheet content calendar template — giving your content team a continuously refreshed queue of SEO-driven topics to write about.

Steps:

  • Trigger on a bi-weekly or monthly schedule
  • Run a content gap query in Ahrefs using your domain and competitor domains
  • Filter results by minimum search volume and keyword difficulty thresholds
  • Append qualifying keywords to the content calendar Google Sheet with volume and difficulty columns

Connectors Used: Ahrefs, Google Sheets