Connect Ahrefs to Python
Bring your Ahrefs data into Python with Windsor.ai, so your scripts read live SEO data.
Pick the Ahrefs fields you need, and Windsor.ai keeps them flowing without a CSV export in between.
Forget CSVs. Stop copy/paste. Connect in minutes. No code required.
Get your Ahrefs data into Python
Ahrefs is connected once in Windsor.ai, and these are the use cases the fields support:
Find keywords close to page one
Best Position, Search Volume and Keyword Difficulty come per Keyword, so you can list the keywords ranking 11 to 20 that have enough searches to work on.
See which pages bring traffic
Page Traffic, Page Keywords and Top Keyword per Top Page URL show which pages get the most organic visits and the keyword behind each.
Follow new and lost links
New Links, Lost Links and Referring Domain Rating per Referring Domain show which sites added or removed links to you in the period you choose.
Using Windsor.ai to connect data from Ahrefs to Python
Windsor.ai moves your Ahrefs fields into Python on a connection you set up once, so the scripts stay on live records rather than a CSV someone exported last week.
Pick the fields you need and Windsor.ai handles the rest.
How to connect Ahrefs to Python with Windsor.ai
Explore a step-by-step guide to integrate your Ahrefs data into Python with the Windsor.ai connector.
Connect a data source
In your Windsor.ai dashboard, connect Ahrefs: enter your Ahrefs API key and the domain or URL to report on. Select the account(s) you want to pull data from and click Next.
Set Python as a data destination
Scroll down and choose Python from the data destination list. Copy the API Key URL provided in the instructions below.
Integrate the API Key URL into your Python code to stream data
Use Python’s requests or a similar library to retrieve data from Windsor.ai by making an API call with your obtained API Key URL.
FAQs
What Ahrefs data can I load into Python?
Windsor.ai gives access to 102 Ahrefs fields. These are the groups; the Ahrefs field reference lists all of them:
- Site overview: Domain Rating, Ahrefs Rank, Organic Traffic, Organic Keywords, Organic Keywords Top 3, Organic Cost, Paid Traffic, Paid Keywords.
- Backlinks: Backlinks, Referring Domains, Historical Backlinks, Historical Referring Domains, and per Referring Domain: Referring Domain Rating, Dofollow Links, New Links, Lost Links, First Seen, Last Seen, Is Spam.
- Organic keywords: Keyword, Best Position, Best Position URL, Search Volume, Keyword Difficulty, CPC, Keyword Traffic, SERP Features Count, and search intent flags such as Is Informational and Is Commercial.
- Top pages: Top Page URL, Page Traffic, Page Keywords, Top Keyword, URL Rating, and AI Responses for ChatGPT, Gemini, Perplexity, Copilot, Grok, Google AI Overviews and Google AI Mode.
- Time and location: Date, Country, Keyword country.
How does Windsor.ai load Ahrefs data into Python?
Windsor.ai gives you an API URL for your selected Ahrefs fields. Call it from Python with requests or a similar library and load the response into pandas or your own code.
Can I combine Ahrefs data with other sources in my scripts?
Yes. Windsor.ai supports 350+ data sources, so Ahrefs data can sit next to other connected sources in the same scripts. For example, put Ahrefs Best Position and Keyword Traffic next to Google Search Console clicks and impressions for the same keywords, so estimated and measured search traffic sit in one table.
Do I need to code to connect Ahrefs to Python?
No. You connect Ahrefs in the Windsor.ai dashboard, pick the fields you want, and Windsor.ai handles the transfer.
How much does it cost to integrate Ahrefs with Python using Windsor.ai?
The free forever plan covers 1 data source, so connecting Ahrefs on its own costs nothing and needs no credit card. Combining Ahrefs with other sources needs a paid plan: $19/month for 3 sources or $99/month for 7. See the pricing page.
Do you have helpful links to get started with Ahrefs and Python?
Yes. These are the resources to start with for the Ahrefs to Python integration:
Tired of manual Ahrefs data exports? Try Windsor.ai today to work on live data

