Sr Technical Writer
Artificial Intelligence (AI) is rapidly transforming how SEO tasks are performed, and how people search online. This is making automation and data-driven decisions more accessible than ever. In this tutorial, you’ll discover how to connect the robust DataForSEO API directly with ChatGPT, turning ChatGPT into your own personalized SEO assistant.
This no-code approach empowers you to automate essential SEO workflows—such as health checks, keyword research, SERP and backlink analysis without writing a single line of code. Integrating DataForSEO with a custom GPT allows you to streamline your SEO workflows and may eliminate the need for several paid SEO tools.
Plus, towards the end of this tutorial, you’ll find a set of bonus ChatGPT prompts designed to help you optimize your content for LLM SEO and AI search optimization, along with details on a custom AIO/GEO Content Optimizer GPT built specifically to help you optimize your content for LLM SEO and AI search optimization.
By following this tutorial, you have learned how to:
With these skills, you can now create a powerful, flexible, and cost-effective SEO assistant tailored to your requirements, while still integrating other tools as needed for a comprehensive SEO strategy.
Many popular SEO tools can be costly, which may make them less accessible for freelancers, small businesses, or those with limited budgets. In addition to pricing, some platforms offer advanced features in higher-tier plans, have a learning curve, or may not easily fit into existing workflows and automation tools.
This tutorial offers a smarter alternative: by connecting DataForSEO’s robust APIs directly to ChatGPT, you can access real-time SEO data on demand—without expensive subscriptions or complex interfaces. This approach empowers you to automate keyword research, SERP analysis, backlink checks, and more, all within a familiar chat environment.
The result: you reduce costs, simplify your SEO workflow, and gain the freedom to tailor your toolkit precisely to your needs.
DataForSEO is a comprehensive platform that provides real-time SEO data and analytics through a suite of powerful APIs. Designed for digital marketers, SEO professionals, content writers and developers, DataForSEO enables you to access a vast array of actionable insights without the need for manual data collection or expensive SEO software subscriptions.
With DataForSEO, you can programmatically retrieve up-to-date information on keywords, search volumes, SERP (Search Engine Results Page) rankings, backlinks, competitor analysis, site audits, and more. The platform supports a variety of use cases, including keyword research, rank tracking, technical SEO audits, and backlink monitoring. Its APIs are highly flexible, allowing you to integrate SEO data directly into your own tools, dashboards, or workflows.
Key features of DataForSEO include:
By leveraging DataForSEO’s APIs, you can automate and scale your SEO processes, ensuring you always have the latest data to inform your strategies and decision-making.
To complete this tutorial, you will need:
Log in to your ChatGPT account and click on the GPTs button in the top left corner.
Next, click on the + Create button to create a new GPT.
This will open a GPT builder to build your custom GPT.
Now feel free to name your GPT,add a description and Instructions for this GPT.
You can use these custom instructions I used to build my GPT:
a) What the GPT Does ?
Turns ChatGPT into a one‑stop SEO dashboard.
Pulls live keyword, rank, backlink, and competitor data from the user’s DataForSEO account.
Presents clear insights (plain‑English summary first, quick table or list next) so the user can ditch separate SEO tools.
Maps any SEO‑related request to the right DataForSEO data type (rank check, keyword ideas, backlinks, gaps).
Waits for data to be ready, then replies fast, crisp, and actionable—no fluff.
Uses the user’s locale for numbers and currency.
On follow‑up questions, reuses earlier data when still relevant to save credits.
b) What It Must Avoid?
No raw JSON dumps unless the user explicitly asks.
No sharing or logging the user’s credentials anywhere visible.
No speculation beyond the DataForSEO data returned—stick to facts.
If DataForSEO returns an error (bad creds, zero balance, rate‑limit), explain the issue plainly; don’t invent fixes.
Don’t recommend external paid SEO tools—the goal is to replace them.
Scroll down to the Actions section in your Custom GP builder and click on the Create New Action button.
This will open a new window to create a new action.
Now, select the Authentication method as API Key from the list of authentication types.
Select Auth Type as Basic and add your DataForSEO API Key and API Secret.
Now, you need to add and generate your Encoded DataForSEO API Key.
To generate the encoded DataForSEO API Key, you need to use the following formula:
Encoded API Key = base64(API Key:API Secret)
For a secure connection, it is necessary to encode your DataForSEO API login and password into Base64. To do this:
Log into your DataForSEO account dashboard and navigate to the API section.
Click on the API Access button to view your API credentials.
Now you will need to copy the Base64 Format encoded API Key and API Secret.
Copy and paste the Base64 Format encoded API Key and API Secret into the API Key field in your ChatGPT Custom GPT and click Save.
Now, you will need to add the DataForSEO API Schema to your custom GPT.
Let’s add the DataForSEO API Schema to your custom GPT.
The significane of this stpe is that it will help the GPT to understand what kind of actions it can perform.
Visit the official DataForSEO Github repository and head over to the open-ai-actions folder.
Inside this folder copy the content of the file dataforseo_researcher_toolkit.json
and paste it into the Schema field in your ChatGPT Custom GPT.
You will now see a list of actions that the GPT can perform from the DataForSEO API schema.
Let’s test the Available actions. ChatGPT will ask for permissions to call the DataForSEO APIs.
Once a successful response is received, you can now use the available actions in your custom GPT. It means everything is working fine.
Now that everything is working fine, let’s create this custom GPT and test it.
Click on the Create button on your top right corner and select the access level. I will be using Only me access for this tutorial. But you can select Anyone with the link for your team members etc.
And just like that your custom GPT goes live.
Now, you can use your custom GPT to perform SEO tasks.
You can ask about keywords, rankings, backlinks or competitors and get fresh SEO data straight from DataForSEO APIs without leaving ChatGPT.
Let me show you how it works.
You can ask questions like:
List rising keyword for the topic <topic>
Give me fresh keyword ideas for the topic <topic>
Audit my website for SEO issues
Give me a list of backlinks for the domain <domain>
Here is a SEO health check I ran for our DigitalOcean tutorials page.
In the backend, the GPT will talk with the DataForSEO API to get the data and then return the results to the user.
Now let’s ask for the top 10 keywords this page ranks for:
Pretty cool right?
The best part is that DataForSEO APIs are pay per use.
They offer a free trial and a pay-as-you-go pricing model. You can sign up for a free trial and receive a $1 account balance to test the APIs, which is enough to make a limited number of API calls. After the trial, you pay based on your usage.
Here are some LLM SEO and AIO(AI Search Optimization) Prompts You can use with this GPT:
Prompt:
Suggest [NUMBER] compelling title ideas using the primary long-tail keyword [LONG-TAIL KEYWORD], considering search intent and the users’ pain points. Analyze the search intent for the keyword and the titles.
Please give the output as a table where, for each title, I want you to provide me with the search intent for the user while entering that query on Google or LLMs like ChatGPT, Claude, or Perplexity, such that this topic gets cited by LLMs and in the Google AI overview. I want you to categorize them in the search intents below. For example:
“What is schema markup?” = Informational
“Schema markup vs meta tags” = Consideration
“How to add schema in Shopify” = Instructional
“Best plugin for schema markup” = Purchase-ready”
Prompt:
You are a top AI search optimization consultant & LLM SEO content strategist. Write [NUMBER] compelling, LLM-friendly subheadings and an outline for a [CONTENT TYPE] titled [PICK SEARCH-INTENT BASED TITLE]. Make sure that the subheadings are optimized for direct quotation by AI and LLMs, ensuring they can be cited without editing the content.
For example, here is how I want you to do it - Instead of a vague subheading like "Improve Your Email Strategy", use a direct, question-based subheading such as "How Do I Increase My Email Open Rate in Outlook?" and provide a clear, concise answer immediately.”
Prompt:
You are an expert LLM SEO strategist and AI content optimization consultant. Create a detailed LLM SEO content brief for a [CONTENT TYPE] on the topic “[PICK SEARCH-INTENT-BASED TITLE] with [LONG-TAIL PRIMARY KEYWORD]. The SEO brief should include:
1.Content Overview — 2–3 sentences on topic and search intent.
2. Primary & Secondary Keywords — main 5–10 related keywords.
3. LLM-Friendly Subheadings — write [NUMBER] question-based, quotable subheadings with 1–2 sentence answers below each.
4. Outline Structure — organize subheadings logically (Intro, Body, Conclusion, FAQs).
5. Featured Snippets — suggest 2–3 key answers optimized for AI snippets.
6. Citations/Sources — list reliable references for accuracy.
7. Competitor Link— Link to top competitor articles on this topic.
Make sure your brief aligns with best practices for Generative Engine Optimization (GEO) and Answer Engine Optimization (AEO), enabling AI models to accurately cite and surface the content.
Prompt:
Generate [NUMBER] frequently asked questions and detailed answers about [TOPIC] that incorporate the keywords [LIST PRIMARY KEYWORDS]. Format each Q&A pair with the question as an H3 heading and structure answers in 2-3 paragraphs of 50-75 words each. Ensure answers are informative and optimized for featured snippets.
Please aim for ultra-specific and high-intent queries
Ensure the questions are phrased how users might search for this information on ChatGPT/Perplexity and other LLMs. Make sure the answers provide substantial, unique value to stand out and get cited by these LLMs & in AI Overviews.
Prompt:
Create a detailed outline for a [2,000-word] SEO article about [TOPIC] targeting the keyword [PRIMARY KEYWORD]. Include a suggested title, introduction, 5-7 main H2 sections with 2-3 H3 subsections each, modular blocks(tables, FAQs, lists etc) and recommend high authority internal/external links. Use an answer-first, explain later approach. Deliver the gist in the first 120 words and then deep dive in each section.
Write bite-size, citation-ready answers so AI can lift and link your text verbatim. Use clear H2 questions, a one-line answer, then proof. For each section, provide a brief description of what should be covered and which keywords to incorporate.
Prompt:
Based on the following article excerpt about [TOPIC], suggest five natural places to add internal links to other content on my site. For each suggestion, provide the anchor text that should be linked, the type of page it should link to (e.g., product page, blog post), and explain why this link would be valuable for both SEO and user experience. Article excerpt: [PASTE EXCERPT]
Make sure the links that you suggest are credible and high-authority links.
Prompt:
Create a 50-60 word paragraph that directly answers the question [SPECIFIC QUESTION] in a way that's optimized for Google's featured snippet. Include the question terms in the answer, be concise but comprehensive, and format it as a direct response beginning with a clear statement.
The answer should incorporate the keyword [PRIMARY KEYWORD].
Prompt:
Create a topic cluster plan for the pillar topic [NICHE/MAIN TOPIC]. Suggest one comprehensive pillar page (2,000+ words) and [8] cluster content ideas (800-1,200 words each) that support the main topic.
For each piece, provide a suggested title, primary keyword, 3-5 secondary keywords, target search intent, and a brief content description in a table. Also suggest how each cluster piece should link to the pillar content.
Prompt:
You are an expert in LLM SEO and AI search optimization. Analyze the following content currently ranking #5 for the keyword [TARGET KEYWORD]. Identify gaps, outdated information, and opportunities to improve it for both traditional SEO and Generative Engine Optimization (GEO). Provide Gap Analysis, Outdated Information, LLM-Friendly Enhancements ,Additional Sections, Formatting Improvements & Citations/Sources. Original content: [PASTE CONTENT HERE].
Please Ensure all recommendations align with best practices for Answer Engine Optimization (AEO) and enable easy lifting and quoting by large language models (LLMs)
You can use these prompts to optimize your content for LLM SEO and AI search optimization while using this GPT and the DataForSEO APIs with real SEO data.
I have also created a another GPT which will help you optimize your content for LLM SEO and AI search optimization.
Head over to Go to ChatGPT -> GPTs -> Search for “AIO/GEO Content Optimizer” by Anish Singh Walia.
You can access this AIO/GEO Content Optimizer for free and use it to optimize your content for LLM SEO and AI search optimization.
LLM SEO (Large Language Model Search Engine Optimization) and AI Search Optimization(AIO) represent the next evolution in search engine optimization, designed specifically for the era of AI-powered search engines and conversational agents like ChatGPT, Google SGE, Bing Copilot, and Perplexity.
Traditional SEO focuses on optimizing content for classic search engines by targeting keywords, backlinks, and technical site structure. In contrast, LLM SEO and AI Search Optimization are about making your content easily discoverable, understandable, and useful for large language models and AI-driven search platforms. This involves structuring your content so that AI systems can accurately interpret, summarize, and recommend it in response to user queries.
Key aspects of LLM SEO and AI Search Optimization include:
By focusing on LLM SEO and AI Search Optimization, you position your content to be surfaced not just in traditional search results, but also in AI-generated answers, summaries, and recommendations—maximizing your visibility in the rapidly changing landscape of search and information discovery.
DataForSEO is a platform that provides real-time SEO data and analytics through APIs, allowing you to access keyword, SERP, backlink, and site audit data programmatically. Unlike traditional SEO tools with fixed dashboards and high subscription fees, DataForSEO offers flexible, pay-as-you-go access to raw data, making it ideal for custom workflows and automation.
Yes! This tutorial shows you how to connect DataForSEO APIs to ChatGPT using the custom GPT builder, so you can automate SEO tasks and access data without writing any code.
You can access keyword research data, SERP rankings, backlink profiles, competitor analysis, and site audit information—all directly within ChatGPT.
DataForSEO operates on a pay-as-you-go pricing model, so you only pay for the data you use. This can be significantly more affordable than monthly subscriptions to traditional SEO tools, especially for freelancers and small businesses.
While DataForSEO covers most core SEO data needs, some advanced features from specialized tools may not be available. However, for most keyword research, SERP analysis, and backlink monitoring tasks, this setup can replace many paid tools.
By following this tutorial, you’ve discovered how to connect DataForSEO APIs directly to ChatGPT, empowering you to automate essential SEO workflows and potentially replace some costly SEO tool subscriptions with real-time, on-demand data.
With your new custom GPT, you can streamline keyword research, SERP analysis, backlink checks, and site audits, all tailored to your unique needs. Plus, you can leverage our bonus LLM SEO and AI Search Optimization prompts to further enhance your content for AI-driven search and improve your AI Visibility.
Ready to take your skills further? Explore more in-depth guides and resources:
Keep experimenting, and don’t forget to check out our other DigitalOcean Community tutorials for more ways to optimize your workflow!
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.