Skip to main content
RapidDev - Software Development Agency
bubble-integrationsBubble API Connector

Ahrefs

Connect Bubble to Ahrefs using the API Connector with a standard Bearer token in the Authorization header — simpler than SEMrush's text-format API. The key challenge is cost: Ahrefs charges API units per row returned, so building a daily Backend Workflow that caches backlink and Domain Rating data in Bubble's database is the mandatory architecture. Live API calls on every page load can exhaust a monthly unit budget in days.

What you'll learn

  • How to configure Ahrefs Bearer token authentication in Bubble's API Connector with the Private header checkbox
  • How to call the Domain Rating endpoint and display DR scores in a Bubble admin page
  • How to fetch new and lost backlinks and store them in a Bubble data type for efficient dashboard access
  • Why a daily caching Backend Workflow is the mandatory architecture for Ahrefs integrations and how to build it
  • How to handle the domain format requirement (bare domain without protocol or trailing slash) in Bubble inputs
  • How to apply privacy rules to Ahrefs data stored in Bubble's database
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate20 min read45–60 minutesMarketingLast updated July 2026RapidDev Engineering Team
TL;DR

Connect Bubble to Ahrefs using the API Connector with a standard Bearer token in the Authorization header — simpler than SEMrush's text-format API. The key challenge is cost: Ahrefs charges API units per row returned, so building a daily Backend Workflow that caches backlink and Domain Rating data in Bubble's database is the mandatory architecture. Live API calls on every page load can exhaust a monthly unit budget in days.

Quick facts about this guide
FactValue
ToolAhrefs
CategoryMarketing
MethodBubble API Connector
DifficultyIntermediate
Time required45–60 minutes
Last updatedJuly 2026

Why Caching Ahrefs Data in Bubble's Database Is Not Optional

Ahrefs is technically the simplest SEO API to connect to Bubble. It uses standard Bearer token auth, returns clean JSON, and its response fields map directly to Bubble data types without any special parsing. If you've connected an API with an Authorization header before, Ahrefs will feel familiar.

The complexity is economic, not technical. Ahrefs charges API units per row returned — not per API call. If you request 100 backlinks, you spend 100 units. If your Bubble dashboard page loads for 10 different users and each load triggers a 100-backlink API call, you've spent 1,000 units in one day without realizing it. On an Advanced plan with a monthly unit allocation, this kind of unguarded dashboard can exhaust your budget before the month is half over.

The solution is a caching pattern that most professional Bubble + Ahrefs integrations use. A Backend Workflow runs once per day (or once per week for lower-frequency monitoring) and makes the Ahrefs API calls on a schedule. It saves the results to a Bubble data type — let's call it AhrefsSnapshot — with a timestamp field. Your dashboard Repeating Group reads from AhrefsSnapshot, not from the live Ahrefs API. A 'Refresh Now' button in the UI lets admins trigger a manual refresh when needed, consuming units deliberately rather than accidentally.

This pattern also enables historical tracking. Because you're saving a new AhrefsSnapshot record each day rather than overwriting the previous one, you can build a Domain Rating trend chart showing how DR has changed over the past 30 days — something you can't do if you're only reading live data.

A second Ahrefs-specific detail worth knowing upfront: the `target` parameter that almost every endpoint requires must be a bare domain without protocol or trailing slash. Ahrefs rejects `https://example.com/` and returns unexpected data for `www.example.com` in some modes. Strip prefixes from any Bubble user input before passing it to the API — Bubble's `:find & replace` operator handles this cleanly.

Beyond these two constraints, connecting Bubble to Ahrefs is clean, fast, and produces genuinely useful dashboards for SEO monitoring, client reporting, and backlink alerting.

Integration method

Bubble API Connector

Ahrefs API v3 uses standard Bearer token authentication — the token goes in an Authorization header marked Private in Bubble's API Connector. All calls run server-side, CORS is not an issue, and JSON responses map cleanly to Bubble data types.

Prerequisites

  • A Bubble account — the API Connector plugin works on all Bubble plans; a paid plan is required for scheduled Backend Workflows (daily caching pattern)
  • An Ahrefs account on Advanced ($449/mo, verify current pricing) or Enterprise plan — API access is not available on Standard or Lite plans
  • Your Ahrefs API token — generate at Ahrefs account → API → Generate token
  • At least one target domain in bare format (e.g., 'example.com', not 'https://example.com/')
  • The Toolbox plugin (by Zeroqode, free) if you need server-side data processing in Backend Workflows

Step-by-step guide

1

Generate Your Ahrefs API Token and Understand the Unit Cost Model

Before touching Bubble, set up Ahrefs API access and understand the billing model that shapes every decision in this integration. Log in to Ahrefs and navigate to your account settings. Find the API section — this is only accessible on Advanced and Enterprise plans. If the API menu item doesn't appear, your current plan doesn't include API access. Generate a new API token and copy it immediately — the token is shown only once after creation. If you miss it, you'll need to regenerate. The Ahrefs API charges units per row returned from each endpoint call. The exact unit cost per row depends on the endpoint — the backlinks endpoint costs more per row than the domain overview endpoint. Check the Ahrefs API documentation for current unit rates for each endpoint you plan to use. This is not a cost you can ignore: on the Dashboard page of your Bubble app, if the Repeating Group data source is a live Ahrefs API call and 100 users load that page, you've made 100 API calls consuming units proportional to the rows returned in each. The unit consumption pattern guides the architecture you'll build: - Fetch once per day in a Backend Workflow - Store in Bubble database - Read from database on every page load - Use a 'Refresh' button for on-demand updates Also familiarize yourself with the `mode` parameter that most Ahrefs endpoints accept. The most common values are: - `domain`: all pages on the domain and all subdomains - `subdomains`: root domain only, no subdomains - `exact`: one specific URL For most backlink monitoring use cases, `domain` is correct. Wrong mode = data that looks empty or incomplete.

Pro tip: Write down your monthly API unit allocation (shown in your Ahrefs account API page). Divide by 30 to get a rough daily budget. Design your Backend Workflow to stay well under this daily number. The Logs tab in Ahrefs' API dashboard shows unit consumption per call.

Expected result: You have your Ahrefs API token saved securely. You understand which plan you're on and what your monthly unit allocation is. You have a target domain in bare format (e.g., 'mysite.com') ready to test with.

2

Install the API Connector and Configure Ahrefs Authentication

Open your Bubble editor and go to Plugins → Add plugins. Search for 'API Connector' and install the one by Bubble (free). In the API Connector panel, click 'Add another API'. Name it 'Ahrefs'. In the Base URL field, enter: `https://api.ahrefs.com/v3` For authentication, do NOT select 'Username & Password' or 'Private key in header' dropdown options. Instead, use a shared header approach: Click 'Add a shared header'. In the key field, enter: `Authorization`. In the value field, enter: `Bearer YOUR_TOKEN_HERE` — but replace `YOUR_TOKEN_HERE` with your actual Ahrefs API token. Check the 'Private' checkbox on this header row. The 'Private' checkbox is what keeps your token server-side — without it, the Authorization header value would be visible in browser network requests. The full header value (including the word 'Bearer' followed by a space) looks like: `Bearer eyJhbGci...` (your actual token string after the space). Do not put the token alone in the value field — Ahrefs requires the `Bearer ` prefix. A token without the prefix returns a 401 Unauthorized. Click 'Save'. Unlike Campaign Monitor's unusual Basic Auth, Ahrefs uses completely standard Bearer token auth — there are no surprises here beyond making sure the Private checkbox is enabled.

ahrefs-api-connector-config.json
1{
2 "base_url": "https://api.ahrefs.com/v3",
3 "shared_headers": [
4 {
5 "key": "Authorization",
6 "value": "Bearer <private: your_ahrefs_api_token>",
7 "private": true
8 }
9 ],
10 "note": "Include 'Bearer ' prefix (with space) before the token value."
11}

Pro tip: After saving, you can verify the header is Private by looking at the API Connector panel — Private headers show a lock icon and the value is masked. If you see the full token value displayed, the Private checkbox wasn't saved correctly.

Expected result: Ahrefs appears in your API Connector list with the base URL and a Private Authorization Bearer header. The header value is masked in the panel. Ready to add API calls.

3

Create the Domain Rating Call and Initialize It

Add your first Ahrefs API call: the Domain Rating endpoint. This is the fastest and most unit-efficient call to start with. Click 'Add a new call' under the Ahrefs API. Name it 'Get Domain Rating'. Set Method to GET. Set the path to `/site-explorer/domain-rating`. Set 'Use as' to Data. Add URL parameters: - `target`: set to dynamic (`<dynamic: target>`) — this will be the bare domain you pass in - `date`: optional, ISO format date — leave blank for current DR Click 'Initialize call'. In the dynamic fields, enter a real bare domain you want to test with (e.g., `ahrefs.com` or your own domain). Do NOT enter `https://ahrefs.com` or `ahrefs.com/` — just the bare domain. Click Initialize. A successful response looks like: ```json { "domain": "ahrefs.com", "domain_rating": 90 } ``` Bubble detects the `domain` and `domain_rating` fields. After initialization, you can bind these fields in your Bubble UI: a text element with expression `Get Domain Rating's domain_rating` displays the DR score. Also create a second call for Domain Rating history. Name it 'Get DR History'. Path = `/site-explorer/domain-rating-history`. Parameters: - `target`: dynamic - `history_grouping`: `monthly` (returns one data point per month) - `limit`: `12` (last 12 months) Initialize with your test domain. The response is an array of objects with `date` and `domain_rating` fields — perfect for binding to a Bubble Chart element for a visual DR trend.

ahrefs-domain-rating-calls.json
1{
2 "get_domain_rating": {
3 "method": "GET",
4 "path": "/site-explorer/domain-rating",
5 "params": {
6 "target": "<dynamic: target>"
7 },
8 "example_response": {
9 "domain": "example.com",
10 "domain_rating": 67
11 }
12 },
13 "get_dr_history": {
14 "method": "GET",
15 "path": "/site-explorer/domain-rating-history",
16 "params": {
17 "target": "<dynamic: target>",
18 "history_grouping": "monthly",
19 "limit": "12"
20 },
21 "example_response": {
22 "domain_rating": [
23 { "date": "2026-06-01", "domain_rating": 65 },
24 { "date": "2026-07-01", "domain_rating": 67 }
25 ]
26 }
27 }
28}

Pro tip: If the Initialize call returns a 422 or empty result, the domain format is wrong. Strip 'https://', 'http://', 'www.', and trailing slashes before passing the value. Use Bubble's :find & replace operator: Input's value :find & replace 'https://' with '' then :find & replace 'http://' with '' then :find & replace '/' with ''.

Expected result: Both calls initialize successfully. Get Domain Rating returns the domain_rating field for your test domain. Get DR History returns an array of monthly DR values. Bubble detects all fields and they're available for binding in the Design tab.

4

Create Backlink Calls for New and Lost Monitoring

Add the backlink calls that power the monitoring dashboard. These are the most unit-intensive calls — configure them with conservative limits. Add a new call. Name it 'Get New Backlinks'. Method = GET. Path = `/site-explorer/all-backlinks`. Parameters: - `target`: dynamic - `mode`: `domain` - `limit`: `100` - `order_by`: `domain_rating_source:desc` - `where`: `is_new:eq:true` The `where` parameter filters for backlinks discovered in the last data refresh period. This narrows results to genuinely new links rather than your entire backlink profile. Add another call. Name it 'Get Lost Backlinks'. Same path and parameters but change: - `where`: `is_lost:eq:true` Initialize both calls with your test domain. The response for each is an array of backlink objects with fields including: - `url_from` — the page that links to your site - `domain_from` — the root domain of the linking site - `domain_rating_source` — the DR of the linking domain - `anchor` — the anchor text of the link - `url_to` — your page being linked to - `first_seen` — date the link was first detected (for new backlinks) - `lost_date` — date the link was lost (for lost backlinks) Set 'Use as' to Data for both calls. Now create the Bubble data types to store these results. In the Data tab, create: - **AhrefsBacklink** with fields: domain_from (text), url_from (text), domain_rating_source (number), anchor (text), url_to (text), first_seen (date), link_type (text — 'new' or 'lost'), target_domain (text), snapshot_date (date) - **AhrefsSnapshot** with fields: target_domain (text), dr (number), referring_domains (number), snapshot_date (date) These data types are what your dashboard reads from — not the live API.

ahrefs-backlink-calls.json
1{
2 "get_new_backlinks": {
3 "method": "GET",
4 "path": "/site-explorer/all-backlinks",
5 "params": {
6 "target": "<dynamic: target>",
7 "mode": "domain",
8 "limit": "100",
9 "order_by": "domain_rating_source:desc",
10 "where": "is_new:eq:true"
11 }
12 },
13 "get_lost_backlinks": {
14 "method": "GET",
15 "path": "/site-explorer/all-backlinks",
16 "params": {
17 "target": "<dynamic: target>",
18 "mode": "domain",
19 "limit": "100",
20 "order_by": "domain_rating_source:desc",
21 "where": "is_lost:eq:true"
22 }
23 },
24 "example_backlink_object": {
25 "url_from": "https://example.com/blog/post",
26 "domain_from": "example.com",
27 "domain_rating_source": 72,
28 "anchor": "great resource",
29 "url_to": "https://yoursite.com/page",
30 "first_seen": "2026-07-08"
31 }
32}

Pro tip: Keep `limit` at 100 or less during development and testing. Each row returned costs API units. Only increase the limit in production after you've confirmed the caching workflow is in place and unit consumption is under control.

Expected result: Get New Backlinks and Get Lost Backlinks calls both initialize successfully with your test domain. Bubble detects all backlink object fields. The AhrefsBacklink and AhrefsSnapshot data types are created in the Data tab.

5

Build the Daily Caching Backend Workflow

This step is the core of a production-ready Ahrefs integration. The Backend Workflow runs on a schedule, makes the Ahrefs API calls, and saves results to the Bubble database. The dashboard reads from the database — not from live API calls. In Bubble, go to the Backend Workflows tab (visible only on paid plans — this is a paid-plan feature). Click 'Add a new API Workflow'. Name it 'Refresh Ahrefs Data'. Enable 'Schedule this workflow'. In the workflow, add these steps: **Step 1: Get Domain Rating.** Use the 'Ahrefs - Get Domain Rating' action. Pass `target` = the domain you want to monitor (either a static value or a parameter passed into the workflow). **Step 2: Create AhrefsSnapshot.** Create a new AhrefsSnapshot Thing with: - target_domain = the target parameter - dr = Result of Step 1's domain_rating - snapshot_date = Current date/time **Step 3: Get New Backlinks.** Use 'Ahrefs - Get New Backlinks' with the same target. **Step 4: Save New Backlinks.** For each item in Step 3's result list, create an AhrefsBacklink record with link_type = 'new' and snapshot_date = Current date/time. Use Bubble's 'Make changes to a list' or a 'Schedule API workflow on a list' action to iterate through the results. **Step 5: Get Lost Backlinks** and **Step 6: Save Lost Backlinks** — same pattern with link_type = 'lost'. After setting up the workflow steps, go to the Schedule section. Set it to run once per day at a low-traffic time (e.g., 6:00 AM UTC). The workflow URL is shown at the top of the workflow editor — note it for reference. To trigger the workflow on demand from the UI (for a 'Refresh Now' button), add a button to your admin page. Its click workflow: 'Schedule API workflow → Refresh Ahrefs Data → Schedule for Current date/time + 1 second'. RapidDev's team has built SEO monitoring Bubble apps with this exact daily caching pattern — if you need to scale this to multiple domains or add automated alerting when DR drops, a free scoping call is available at rapidevelopers.com/contact.

ahrefs-caching-workflow.json
1{
2 "backend_workflow_name": "Refresh Ahrefs Data",
3 "schedule": "Daily at 06:00 UTC",
4 "parameters": [
5 { "name": "target_domain", "type": "text" }
6 ],
7 "steps": [
8 "Step 1: Call Get Domain Rating with target = target_domain parameter",
9 "Step 2: Create AhrefsSnapshot — dr = Step 1's domain_rating, target_domain = parameter, snapshot_date = now",
10 "Step 3: Call Get New Backlinks with target = target_domain",
11 "Step 4: For each backlink in Step 3 result: Create AhrefsBacklink with link_type = 'new'",
12 "Step 5: Call Get Lost Backlinks with target = target_domain",
13 "Step 6: For each backlink in Step 5 result: Create AhrefsBacklink with link_type = 'lost'"
14 ],
15 "note": "Backend Workflows require a paid Bubble plan."
16}

Pro tip: To avoid accumulating unbounded records in AhrefsBacklink over time, add a cleanup step at the start of the workflow: delete AhrefsBacklink records with snapshot_date older than 30 days. This keeps the database lean without losing the 30-day history you need for trend charts.

Expected result: The daily Backend Workflow is configured and scheduled. A manual 'Refresh Now' button on the admin page triggers it on demand. After the first run, AhrefsSnapshot and AhrefsBacklink records appear in the Bubble database.

6

Build the Dashboard UI and Apply Privacy Rules

With data flowing into the Bubble database, build the dashboard UI and lock down access. **Dashboard UI:** Add a Stats row at the top of the page: - DR Score: bind to 'Search for AhrefsSnapshot where target_domain = [your domain], sorted by snapshot_date descending, first item's dr' - Last Updated: bind to same query's snapshot_date, formatted as 'MM/DD/YYYY HH:mm' Add a Chart element (requires Bubble's built-in Charts element or a chart plugin). Set data source to all AhrefsSnapshot records for the target domain sorted by snapshot_date ascending. X axis = snapshot_date, Y axis = dr. This creates the visual DR trend line. Add two Repeating Groups below the chart: 1. **New Backlinks**: data source = AhrefsBacklink where link_type = 'new' AND snapshot_date >= [today - 1 day], sorted by domain_rating_source descending. Display: domain_from, domain_rating_source, anchor text, url_from. 2. **Lost Backlinks**: same structure with link_type = 'lost'. **Privacy Rules:** Go to Data tab → AhrefsSnapshot → Set privacy rules. Add: 'This thing is visible to' → Current User's role is 'Admin'. Apply the same restriction to AhrefsBacklink. Ahrefs subscription data represents paid competitive intelligence. If you're building a client-facing SEO dashboard (multi-tenant), add a second rule: 'Current User's domain = This AhrefsSnapshot's target_domain' to ensure Client A cannot see Client B's DR data. Without privacy rules, any logged-in Bubble user — or public visitors if your data type is exposed via Bubble's Data API — can read Domain Rating history and backlink data from your database. This is a common oversight on SEO monitoring apps.

Pro tip: Test the dashboard by disabling your admin role in a test user account and trying to access AhrefsSnapshot records via yourapp.bubbleapps.io/api/1.1/obj/ahrefssnapshot. If privacy rules are working, the response returns 0 results for non-admin users.

Expected result: The dashboard displays Domain Rating, referring domain count, a DR trend chart, and New/Lost backlink Repeating Groups — all from the cached Bubble database. Privacy rules restrict data to admin users. The Refresh button manually triggers the Backend Workflow on demand.

Common use cases

Domain Rating and Referring Domain Dashboard

Build a Bubble admin page that shows the current Domain Rating, total referring domain count, and DR trend over the past 30 days for any target domain. A chart element displays the historical DR progression stored in daily AhrefsSnapshot records. Updated once per day via a scheduled Backend Workflow to preserve API units.

Bubble Prompt

On Dashboard page load: bind DR text element to 'Search for AhrefsSnapshot where domain = target_domain, sorted by date descending, first item's dr'. Bind referring domains count similarly. For the chart, bind all AhrefsSnapshot records for the domain sorted by date ascending, X axis = date, Y axis = dr.

Copy this prompt to try it in Bubble

Lost Backlink Monitor with In-App Alerts

A daily Backend Workflow fetches backlinks with the is_lost filter and saves them to a LostBacklink Bubble data type. An in-app notification system (or email via SendGrid) alerts the admin when new lost backlinks are detected since the last run. The dashboard shows a Repeating Group of recently lost links with domain_from, domain_rating_source, anchor text, and the date lost.

Bubble Prompt

In daily Backend Workflow: Call Get Lost Backlinks API. For each result: only create a new LostBacklink record if no existing record matches url_from + url_to combination (deduplication). After creating records: send email via SendGrid if count of new LostBacklink records created this run is > 0.

Copy this prompt to try it in Bubble

Client SEO Reporting Dashboard

An agency builds a Bubble client portal where each client logs in and sees their site's Domain Rating, referring domain count, and top 20 backlinks by domain rating. Ahrefs data is pre-fetched nightly and stored in Bubble — clients see fast, current data without triggering live API calls. Privacy rules ensure each client sees only their own domain's data.

Bubble Prompt

On client's Dashboard page: set data source of DR stat = AhrefsSnapshot filtered by domain = Current User's domain, sorted by snapshot_date descending, first item's dr. Set Backlinks Repeating Group data source = AhrefsBacklink filtered by target_domain = Current User's domain, sorted by domain_rating_source descending, limited to 20.

Copy this prompt to try it in Bubble

Troubleshooting

API calls return 402 Payment Required

Cause: Monthly API unit balance is exhausted. This is a billing state, not a configuration error. Ahrefs units are consumed per row returned — a dashboard calling the backlinks endpoint on every page load without caching can deplete a monthly budget very quickly.

Solution: Implement the caching pattern described in Step 5: move all Ahrefs API calls from page data sources (which run on every page load) into a scheduled Backend Workflow that runs once per day. Drive the dashboard from the Bubble database, not from live API calls. Contact Ahrefs to check remaining unit balance or add more units if needed this month.

Domain Rating endpoint returns empty results or unexpected data

Cause: The `target` parameter contains protocol prefixes ('https://') or trailing slashes ('/'). Ahrefs requires a bare domain format: 'example.com', not 'https://example.com/' or 'www.example.com'. The wrong `mode` parameter can also cause unexpectedly empty results — `exact` mode for a URL that doesn't have backlinks returns 0 results even if the domain has many backlinks.

Solution: Strip all prefixes from the target domain before passing it to Ahrefs. In Bubble, use a calculated field: Input's value :find & replace 'https://' with '' then :find & replace 'http://' with '' then :find & replace trailing slash with ''. For backlink calls, use `mode=domain` as the default unless you specifically need URL-level analysis.

Initialize call fails with no response or a 401 error

Cause: The Authorization header is missing the 'Bearer ' prefix, or the Private checkbox was not saved. An Authorization header value of just the token (without 'Bearer ') causes a 401. A header that is not marked Private may not be sent correctly in some Bubble configurations.

Solution: Check the shared header in your Ahrefs API Connector configuration. The value field must contain 'Bearer ' followed by your token (with a space after 'Bearer'). Verify the Private checkbox is enabled (lock icon visible). If in doubt, delete the header and re-add it, checking Private before saving.

Backend Workflow for scheduled daily refresh is not available in Bubble

Cause: Backend Workflows (API Workflows) require a paid Bubble plan. The daily caching pattern depends entirely on this feature — it is not available on Bubble's free plan.

Solution: Upgrade to a paid Bubble plan to access Backend Workflows. Alternatively, as a temporary measure, use a button-triggered workflow on the admin page to manually run the data refresh on demand. This requires an admin to log in and click 'Refresh' periodically — not automated, but functional for low-frequency monitoring during development.

429 Too Many Requests error from Ahrefs API

Cause: Concurrent API call limit exceeded. Ahrefs enforces a rate limit on simultaneous API calls from the same token. Triggered when the Backend Workflow is trying to process many backlinks in parallel, or when multiple workflow runs overlap.

Solution: Add a 'Pause before next step' (at least 500ms) between sequential Ahrefs API calls in the Backend Workflow. Ensure the scheduled workflow is not running more than once simultaneously — Bubble's scheduler respects this if the workflow duration is shorter than the schedule interval. Avoid triggering manual refreshes while the scheduled workflow is actively running.

Best practices

  • Never use live Ahrefs API calls as Repeating Group or text element data sources — every page load by every user consumes API units. Always read from the Bubble database cache and call Ahrefs only in the scheduled Backend Workflow or a manually triggered refresh.
  • Mark the Authorization Bearer header as Private in Bubble's API Connector — this is the single most important security step. Without it, the Ahrefs API token is visible in browser network requests.
  • Strip domain prefixes (https://, http://, www.) and trailing slashes from all user inputs before passing to Ahrefs API calls. Build this cleanup into the workflow step using Bubble's :find & replace operator, not as a post-processing step.
  • Keep the `limit` parameter at 100 or less for backlink calls to control unit consumption. For most monitoring use cases, 100 recent new/lost backlinks per day is more than sufficient.
  • Apply strict privacy rules to AhrefsSnapshot and AhrefsBacklink data types in Bubble — restrict to admin-only or per-user domain matching for multi-tenant client portals. Ahrefs data represents paid intelligence that should not be publicly readable.
  • Use `history_grouping=monthly` for the DR history endpoint to get 12 months of data in 12 rows rather than daily granularity — this uses far fewer API units for the same visual result in a trend chart.
  • Store a 30-day rolling window of AhrefsBacklink records and delete older ones in the Backend Workflow's cleanup step — keeps the Bubble database lean without losing the historical data needed for trend analysis.
  • For the `mode` parameter, default to `domain` (includes all subdomains) for whole-site backlink analysis. Use `exact` only when you need link data for a single specific URL, and `subdomains` when you want root domain only without subdomains.

Alternatives

Frequently asked questions

Which Ahrefs plan do I need for API access?

Ahrefs API access is only available on the Advanced plan and Enterprise plan. The Standard and Lite plans do not include API access. Advanced is typically $449/month (verify current pricing on ahrefs.com). Beyond the plan subscription, Ahrefs charges API units separately per row returned from each API call — factor both costs into your budget before committing.

Do I need a paid Bubble plan to connect to Ahrefs?

The basic API Connector setup — calling Ahrefs from button click workflows — works on Bubble's free plan. However, the recommended architecture (daily scheduled Backend Workflow for caching) requires a paid Bubble plan, as Backend Workflows are a paid-plan feature. Running Ahrefs calls as live page data sources on the free plan is technically possible but not recommended due to the per-unit API cost on every page load.

What is Domain Rating and how is it different from Domain Authority?

Domain Rating (DR) is Ahrefs' proprietary score (0-100) measuring the strength of a website's backlink profile relative to all other sites in Ahrefs' index. Domain Authority (DA) is Moz's equivalent metric. Both measure link strength, but the underlying formulas and link indexes differ — a site might have DR 65 and DA 55 for the same domain. Ahrefs generally reports a larger backlink index than Moz, which can result in different relative scores. Neither DR nor DA is a Google ranking factor directly.

How often should I refresh Ahrefs data in my Bubble dashboard?

Once per day is the standard for most monitoring dashboards. Ahrefs itself updates its backlink index every 15-30 minutes for premium plans, but calling the API more than once per day for a monitoring dashboard consumes units without meaningful additional value — backlink gains and losses don't change significantly hour to hour. For client-facing dashboards, once-per-day or even once-per-week refreshes are acceptable and preserve API unit budgets.

Can I monitor multiple domains in the same Bubble app?

Yes. Pass the target domain as a parameter to the Backend Workflow and call 'Schedule API Workflow on a list' to iterate through a list of domains stored in a Bubble data type (e.g., MonitoredDomain). Each domain gets its own AhrefsSnapshot and AhrefsBacklink records stored with the target_domain field populated. The dashboard filters by the selected or current user's domain. Note that monitoring N domains consumes roughly N times the API units per run.

Why does my DR history call return the same value for every month?

This typically happens when the `history_grouping` parameter is missing or set incorrectly. Without `history_grouping=monthly`, the endpoint may return granular daily data or a single current snapshot depending on API version behavior. Verify your call includes `history_grouping=monthly` in the URL parameters. Also confirm the `limit` parameter is set to the number of months you want (e.g., 12 for one year of monthly data).

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Bubble integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.