{"id":8666,"date":"2023-03-17T14:50:51","date_gmt":"2023-03-17T14:50:51","guid":{"rendered":"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/"},"modified":"2023-03-17T14:50:51","modified_gmt":"2023-03-17T14:50:51","slug":"your-seo-guide-to-the-chatgpt-api","status":"publish","type":"post","link":"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/","title":{"rendered":"Your SEO guide to the ChatGPT API"},"content":{"rendered":"<p>ChatGPT <a href=\"https:\/\/openai.com\/blog\/introducing-chatgpt-and-whisper-apis\" target=\"_blank\" rel=\"noopener noreferrer\">announced<\/a> the rollout of its API (GPT 3.5 Turbo) on March 1.\u00a0<\/p>\n<p>I\u2019m bullish on <a href=\"https:\/\/searchengineland.com\/what-is-chatgpt-and-why-seos-should-care-392165\" target=\"_blank\" rel=\"noopener\">ChatGPT\u2019s utility for several<\/a> different SEO-related functions like <a href=\"https:\/\/searchengineland.com\/keyword-research-chatgpt-prompts-393741\" target=\"_blank\" rel=\"noopener\">keyword research<\/a>, <a href=\"https:\/\/searchengineland.com\/chatgpt-local-seo-394047\" target=\"_blank\" rel=\"noopener\">local SEO<\/a>, <a href=\"https:\/\/searchengineland.com\/chatgpt-create-content-seo-392930\" target=\"_blank\" rel=\"noopener\">content<\/a>, and <a href=\"https:\/\/searchengineland.com\/chatgpt-for-link-building-a-primer-393697\" target=\"_blank\" rel=\"noopener\">link building<\/a>. Having spent much time using ChatGPT, I\u2019m also painfully aware of its limitations. <\/p>\n<p>While the API won\u2019t be a panacea (and the web interface is actually much better for some tasks), it can help address some of the shortcomings of the web interface.<\/p>\n<p>This article will show you how to maximize ChatGPT\u2019s API with specific SEO use cases.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#How_to_use_the_ChatGPT_API\" >How to use the ChatGPT API<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Getting_your_ChatGPT_API_key\" >Getting your ChatGPT API key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Connecting_the_ChatGPT_API_to_Google_Sheets\" >Connecting the ChatGPT API to Google Sheets<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#ChatGPT_API_pricing\" >ChatGPT API pricing<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#ChatGPT_API_tokens\" >ChatGPT API tokens<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Specific_API_use_cases_for_SEO\" >Specific API use cases for SEO<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#ChatGPT_API_vs_web_interface\" >ChatGPT API vs. web interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Example_ChatGPT_API_prompts\" >Example ChatGPT API prompts<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Title_tags_and_meta_descriptions\" >Title tags and meta descriptions<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Longer_content_and_post_outlines\" >Longer content and post outlines<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#FAQs\" >FAQs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Schema\" >Schema<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Convert_content_to_HTML\" >Convert content to HTML<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Add_internal_links\" >Add internal links<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Outreach_templates\" >Outreach templates<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Using_the_web_interface_and_the_API_in_tandem_aka_bring_your_prompts\" >Using the web interface and the API in tandem (a.k.a., bring your prompts)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/craighordlow.com\/index.php\/2023\/03\/17\/your-seo-guide-to-the-chatgpt-api\/#Get_creative_and_look_for_solutions\" >Get creative and look for solutions<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_to_use_the_ChatGPT_API\"><\/span>How to use the ChatGPT API<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To leverage the ChatGPT API, you need to be able to access the API in the first place. ChatGPT\u2019s parent company OpenAI has extensive <a href=\"https:\/\/platform.openai.com\/docs\/guides\/chat\" target=\"_blank\" rel=\"noopener noreferrer\">documentation<\/a> for using the API.<\/p>\n<p>If you\u2019re looking to learn more about building a tool or interacting directly with the API there\u2019s also a good walk-through <a href=\"https:\/\/pub.towardsai.net\/chatgpt-api-101-a-beginners-guide-95e6d41c716f\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<p>You can also use AppsScript to query the ChatGPT API in Google Sheets, which we\u2019ll walk through here step by step.<\/p>\n<p>Regardless of your approach, you\u2019ll need to start by getting an API key.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Getting_your_ChatGPT_API_key\"><\/span>Getting your ChatGPT API key<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once you have an OpenAI account, you can generate your API key either by <a href=\"https:\/\/platform.openai.com\/account\/api-keys\" target=\"_blank\" rel=\"noopener noreferrer\">following this link<\/a> while logged in or clicking <em>View API keys<\/em> in the profile dropdown:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Then click <em>Create new secret key.<\/em><\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Copy the API key you generated.<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Connecting_the_ChatGPT_API_to_Google_Sheets\"><\/span>Connecting the ChatGPT API to Google Sheets<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There\u2019s a straightforward way to connect ChatGPT to Google Sheets (h\/t <a href=\"https:\/\/mintedempire.com\/how-to-add-chatgpt-api-gpt-3-5-turbo-into-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">Keith Mint<\/a>).<\/p>\n<p>First, create a new Google Sheet, then click on <em>Extensions<\/em> and choose Apps Script:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>You then paste the following code (with your API key in place of <em>YOUR API KEY<\/em>):<\/p>\n<p>const SECRET_KEY = &#8220;<em>YOUR API KEY<\/em>&#8220;;<br \/>\nconst MAX_TOKENS = 800;<br \/>\nconst TEMPERATURE = 0.9;<\/p>\n<p>function AI_ChatGPT(prompt, temperature = 0.4, model = &#8220;gpt-3.5-turbo&#8221;) {<br \/>\n  const url = &#8220;https:\/\/api.openai.com\/v1\/chat\/completions&#8221;;<br \/>\n  const payload = {<br \/>\n    model: model,<br \/>\n    messages: [<br \/>\n      { role: &#8220;system&#8221;, content: &#8220;You are a helpful assistant.&#8221; },<br \/>\n      { role: &#8220;user&#8221;, content: prompt },<br \/>\n    ],<br \/>\n    temperature: TEMPERATURE,<br \/>\n    max_tokens: MAX_TOKENS,<br \/>\n  };<br \/>\n  const options = {<br \/>\n    contentType: &#8220;application\/json&#8221;,<br \/>\n    headers: { Authorization: &#8220;Bearer &#8221; + SECRET_KEY },<br \/>\n    payload: JSON.stringify(payload),<br \/>\n  };<br \/>\n  const res = JSON.parse(UrlFetchApp.fetch(url, options).getContentText());<br \/>\n  return res.choices[0].message.content.trim();<br \/>\n}<\/p>\n<p>Click save within Apps Script:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Then you can use the following function format to apply a prompt to a cell:<\/p>\n<p>=AI_ChatGPT(&#8220;<em>YOUR PROMPT HERE<\/em>&#8220;)<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>As Mint points out in his article, you can also reference a cell if you want to have multiple cells use prompts that refer back to one cell (like the title or topic of a blog post):<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>In the example above, I used simple prompts like the one pictured, then created a second paragraph for this topic. (We\u2019ll walk through more specific applications for the API shortly.)\u00a0<\/p>\n<h2><span class=\"ez-toc-section\" id=\"ChatGPT_API_pricing\"><\/span>ChatGPT API pricing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before you start leveraging the ChatGPT API for SEO tasks, it\u2019s essential to understand the pricing.<\/p>\n<p>The price for the gpt-3.5-turbo API (the ChatGPT API) is $0.002 per 1,000 tokens, which is 10x cheaper than the existing GPT-3.5 API. <\/p>\n<p>To better understand what the pricing actually winds up looking like, you need to understand how tokens work.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"ChatGPT_API_tokens\"><\/span>ChatGPT API tokens<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>OpenAI has a <a href=\"https:\/\/help.openai.com\/en\/articles\/4936856-what-are-tokens-and-how-to-count-them\" target=\"_blank\" rel=\"noopener noreferrer\">good breakdown<\/a> and a helpful free <a href=\"https:\/\/platform.openai.com\/tokenizer\" target=\"_blank\" rel=\"noopener noreferrer\">tokenizer tool<\/a> to help you determine how many tokens a specific text will be and how the text is broken down (in case you need to reduce the number of tokens for a prompt or response).<\/p>\n<p>A few key things to keep in mind:<\/p>\n<p>By default, the API can return <strong>a maximum of 4,096 tokens<\/strong>.<\/p>\n<p>Tokens are a representation of how much text your <strong>prompt and response are<\/strong>. This is a key factor, as longer prompts can shorten your response output.<\/p>\n<p>Text is translated into tokens and roughly breaks down to around 4 characters in English.<\/p>\n<p>OpenAI also provided this helpful breakdown of how tokens are calculated from text:<\/p>\n<p>1 token ~= 4 chars in English<\/p>\n<p>1 token ~= \u00be words<\/p>\n<p>100 tokens ~= 75 words<\/p>\n<p>Or<\/p>\n<p>1-2 sentence ~= 30 tokens<\/p>\n<p>1 paragraph ~= 100 tokens<\/p>\n<p>1,500 words ~= 2048 tokens<\/p>\n<p>To get additional context on how tokens stack up, consider this:<\/p>\n<p>Wayne Gretzky\u2019s quote, \u201cYou miss 100% of the shots you don\u2019t take,\u201d contains 11 tokens.<\/p>\n<p>OpenAI\u2019s <a href=\"https:\/\/openai.com\/charter\/\" target=\"_blank\" rel=\"noopener noreferrer\">charter<\/a> contains 476 tokens.<\/p>\n<p>The transcript of the U.S. Declaration of Independence contains 1,695 tokens.<\/p>\n<p>So if you used a short prompt to generate a 1,500-word article, it would be less than half a cent.<\/p>\n<p><!-- START INLINE FORM --><\/p>\n<div class=\"nl-inline-form border py-2 px-1 my-2\">\n<div class=\"row align-items-center\">\n<div class=\"col-12 col-lg-3 col-xl-4 pe-md-0 pb-2 pb-lg-0\">\n<p class=\"inline-form-text text-center mb-0\">Get the daily newsletter search marketers rely on.<\/p>\n<\/div>\n<div class=\"col-12 col-lg-7 col-xl-6  pe-lg-0\">\n<div class=\"form-nl-inline\">\n<div class=\"row g-0\">\n<div class=\"form-group col-12 col-lg-8 mb-0\"><\/div>\n<div class=\"col-12 col-lg-4 col-xl-4 mb-0\">\n<div class=\"d-none\">\n<p>Processing\u2026Please wait.<\/p>\n<\/div>\n<p>\t\t\t\t\t\t\t<button class=\"btn btn-dark inlineButton w-100 rounded-0 font-weight-bold\">SUBSCRIBE<\/button>\n\t\t\t\t\t\t<\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"col-12 col-lg-2 col-xl-2 ps-1\">\n<p class=\"text-center mb-0\"><a class=\"nl-terms\" href=\"https:\/\/searchengineland.com\/termsofuse\" target=\"_blank\" rel=\"noopener noreferrer\">See terms.<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!-- END INLINE FORM --><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Specific_API_use_cases_for_SEO\"><\/span>Specific API use cases for SEO<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The API can help with a lot of the same SEO-related tasks as the ChatGPT web interface, but the two have some significant differences, making some tasks better for one than the other. <\/p>\n<p>Understanding that will help you determine which to use for SEO tasks.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"ChatGPT_API_vs_web_interface\"><\/span>ChatGPT API vs. web interface<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The biggest differences include the following:<\/p>\n<p><strong>Scale and bulk tasks<\/strong><\/p>\n<p>If you want to integrate ChatGPT with an existing application or spreadsheet, you&#8217;ll need to use the API.\u00a0<\/p>\n<p>Additionally, the API will be your friend if you want to perform a specific function applied across multiple instances (e.g., generate meta descriptions for several keywords).<\/p>\n<p><strong>Fine-tuning and relationship between prompts<\/strong><\/p>\n<p>Currently, ChatGPT&#8217;s API does not support fine-tuning. If you create multiple prompts through the API, they won&#8217;t have a relationship.\u00a0<\/p>\n<p>You can create a system message to apply to multiple prompts and responses, but OpenAI has said that these are frequently currently ignored by the gpt-3.5-turbo API.\u00a0<\/p>\n<p>This means if you have a task that requires several prompts and for ChatGPT to keep the context of an entire conversation, you&#8217;ll want to use the web interface.<\/p>\n<p><strong>Character limits<\/strong><\/p>\n<p>The API has a token limit of 4,096 which translates to around 16,384 characters per interaction for each <strong>prompt and response<\/strong>.\u00a0<\/p>\n<p>Character limits for the web interface can vary, but generally, the prompt and response are limited to around 2,048 characters, or 4,096.\u00a0<\/p>\n<p>So for tasks that require more extensive prompts or more significant responses, the API will be a better option.\u00a0<\/p>\n<p>There are also more options for structuring prompts and tasks in a way that gives you a lengthier combined output if you&#8217;re using code rather than something like the Google Sheets integration.<\/p>\n<p><strong>Pricing\u00a0<\/strong><\/p>\n<p>Again, the API is priced by usage (and offers a free trial with $18 worth of tokens), and the web interface currently offers a free version and a $20\/mo. paid version.\u00a0<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_ChatGPT_API_prompts\"><\/span>Example ChatGPT API prompts<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#8217;s look at specific use cases where you&#8217;d want to consider the API over the web interface.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Title_tags_and_meta_descriptions\"><\/span>Title tags and meta descriptions<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>An obvious use case where the API makes sense is having ChatGPT generate title tags or meta descriptions at scale.<\/p>\n<p>You can use similar prompts to those that work in the web interface here, but if you structure them properly and lay out your spreadsheet right, you can take the first prompt and then quickly apply that to several URLs or keywords:\u00a0<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Note that the free plan particularly is rate limited, so you may have errors where the cells time out, in which case you need to delete and re-paste:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>And as always, keep in mind that:<\/p>\n<p>ChatGPT can&#8217;t crawl the web, so it&#8217;s either using prior knowledge of a URL from the training period or an assumption about the URL based on terms in the URL to generate suggestions<\/p>\n<p>ChatGPT&#8217;s output can often be wrong or misleading and needs to be edited.<\/p>\n<p>You can use this same format for title tags. (I&#8217;ll have an article focusing specifically on using ChatGPT to generate and update title tags coming out soon).<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Longer_content_and_post_outlines\"><\/span>Longer content and post outlines<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can use the web interface in ChatGPT to create chunks of content and outlines pretty easily. <\/p>\n<p>If you want to make a longer article or if you&#8217;re going to create a series of outlines on different topics, however, it can be a clunky experience. <\/p>\n<p>The API is smoother for these tasks.<\/p>\n<p>First, you can chunk off a post you wrote into sections. Then line up the sections and pull your prompt down:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Alternatively, you could have ChatGPT generate several outlines that you then have a writer (or writers) fill in:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Then, you could have the API write the content one section at a time:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Again, here you could take these prompts, load them one by one across the outline (changing each prompt for the appropriate section), and then just pull the same formulas across multiple outlines and have a lot of text specific to the subsections of each post generated.<\/p>\n<p>My experience is that this helps you steer clear of token limits, and even pedestrian prompts like the one above combined with having ChatGPT create an outline will generate better content than if you ask the tool to &#8220;write a blog post.&#8221;\u00a0<\/p>\n<p>Beyond that, you can further improve content quality by doing things like:<\/p>\n<p>Ask it to include specific phrases (either because you want them on the page or you want to add internal links for that phrase).<\/p>\n<p>Feed it statistics or quotes to work into specific sections of the post. (This is particularly helpful if you have a topic that requires up-to-date tactics and statistics, given that GPT-3 was not trained on recent data.)<\/p>\n<p>Tweak your prompts to output the tone and formatting you want (more on this shortly).<\/p>\n<p>And, as always, layer on human editing.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"FAQs\"><\/span>FAQs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There are multiple FAQ-related functions the API can help with.<\/p>\n<p>First off, you can generate a list of FAQ questions to be associated with a blog post:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Next, you can have the ChatGPT API answer these (again: proceed with caution when it comes to output quality and accuracy):<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Schema\"><\/span>Schema<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can also have ChatGPT generate schemas for you across multiple pages.\u00a0<\/p>\n<p>In this case, we can apply FAQ schema to the FAQs it created for us:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Convert_content_to_HTML\"><\/span>Convert content to HTML<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Another cool use case for ChatGPT is to convert text to HTML.\u00a0<\/p>\n<p>First, let&#8217;s convert our post from text to HTML:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>A few things to note here:<\/p>\n<p>As you can see, the headers in each section were initially formatted with paragraph tags. I fixed this in the prompt by adding, &#8220;Format the header of the section as an h2, and any other headlines in this section as an h3.&#8221;<\/p>\n<p>I wasn&#8217;t able to combine the entire post (which was around 1100 words) into one cell to be converted to HTML, so I had to chunk it off and gave specific instructions in my prompt for each cell to make sure ChatGPT didn&#8217;t layer in the formatting for an entire HTML document in every cell.<\/p>\n<p>You may also get some wonky formatting, like additional quotes you didn&#8217;t expect in the output.\u00a0<\/p>\n<p>As with all aspects of ChatGPT, keep refining your prompts and always check the output.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Add_internal_links\"><\/span>Add internal links<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now that we have our post in HTML, we can start to do some cool things with internal linking.<\/p>\n<p>We can tell ChatGPT to add internal links from specific phrases to specific pages anywhere in the HTML we just generated:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>If we were creating a cluster of pages, we could create rules specific to each page and apply them to the relevant HTML. <\/p>\n<p>This way, everything we generate is interlinked the way we want, the HTML is ready to go, and the FAQ schema is added appropriately.<\/p>\n<p>I tried to create a rule that was a little more complicated, asking ChatGPT to hyperlink phrases. Here is what I added to my prompt:<\/p>\n<p>&#8220;Any time you see the words making and laugh within 5 words of each other, create a link with those two words and all of the words in between them to standupexperience.com\/make-them-laugh.&#8221;<\/p>\n<p>Here is the link that was added:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>That&#8217;s not what I asked for, and also, it didn&#8217;t link every instance of stand-up as I asked it to.<\/p>\n<p>I&#8217;ll need to refine my prompts and check my outputs.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Outreach_templates\"><\/span>Outreach templates<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you&#8217;re reaching out to multiple places for link outreach or guest post placements, you can use the ChatGPT API to create multiple outreach templates for you:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>If you have different kinds of templates, get creative with applying these prompts across different outreach targets.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Using_the_web_interface_and_the_API_in_tandem_aka_bring_your_prompts\"><\/span>Using the web interface and the API in tandem (a.k.a., bring your prompts)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Two things are true:<\/p>\n<p>The API is better for larger projects and performs many prompts simultaneously.<\/p>\n<p>The web interface is frequently better at getting you to an excellent output since you can go back and forth with ChatGPT to give context, review the output, provide feedback, etc.<\/p>\n<p>One way to get the best of both worlds is to <strong>create your prompt in the web interface<\/strong> and then <strong>apply it to multiple items via the API<\/strong>.<\/p>\n<p>Let&#8217;s look at a specific example from this post. My internal linking prompt didn&#8217;t work via the API. It&#8217;s challenging to troubleshoot via the API because you can&#8217;t give ChatGPT feedback or ask why the prompt failed.<\/p>\n<p>Enter, prompt generation via the web!<\/p>\n<p>My typical ChatGPT process is to:\u00a0<\/p>\n<p>Give it chunks of context.<\/p>\n<p>Check for understanding.\u00a0<\/p>\n<p>Review the output for errors and give it additional feedback to achieve my desired result.<\/p>\n<p>To be able to do this for internal linking rules, let&#8217;s start with the web interface to clean up our ChatGPT prompt.<\/p>\n<p>First, I want to give ChatGPT some context. (Remember: ChatGPT doesn&#8217;t know about its own API!)\u00a0<\/p>\n<p>I want to give it information about the API, share the HTML I&#8217;m starting with, share the prompt I used, and share the output I got and then ask ChatGPT to diagnose the issue and rewrite the prompt for me.<\/p>\n<p>Let&#8217;s see how it goes:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>If you don&#8217;t pre-empt it, ChatGPT will repeatedly interrupt you to fire (frequently irrelevant) answers and suggestions (like an eager student who didn&#8217;t do the reading).<\/p>\n<p>I copied and pasted the text from <a href=\"https:\/\/platform.openai.com\/docs\/guides\/chat\" target=\"_blank\" rel=\"noopener noreferrer\">this page<\/a> in four prompts, the HTML I was trying to add links to, the full Sheets function I&#8217;d used, and the output I&#8217;d gotten.<\/p>\n<p>Next, I finally shared the issue with the output:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>And then ChatGPT fixed the prompt for me.<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Well, it wasn&#8217;t actually fixed.<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>ChatGPT is relentlessly polite even if you&#8217;re getting a bit testy, and when I shared the prompt, it analyzed it for me:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>The suggestions on HTML size are good ones, but I was still getting the error:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>This time, the prompt worked!<\/p>\n<p>To address the max tokens issue, I can go to Apps Script to adjust that number:<\/p>\n<div class=\"wp-block-image\">\n<\/div>\n<p>Or obviously, if I&#8217;m not using Sheets, it&#8217;s not likely to be an issue (until I hit the 4096 tokens).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Get_creative_and_look_for_solutions\"><\/span>Get creative and look for solutions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>SEO applications for the ChatGPT API go well beyond what&#8217;s listed here.\u00a0<\/p>\n<p>If you&#8217;re on the lookout for ways to use the platform and can get creative you&#8217;ll find many more applications like:<\/p>\n<p><strong>Programmatic solutions<\/strong>: You can go beyond Google Sheets to find exciting and scalable uses for the ChatGPT API.<\/p>\n<p><strong>Combining multiple APIs<\/strong>: Think about how you might be able to use the ChatGPT API in unison with APIs like Google Search Console, Ahrefs, Semrush or similar. What problems do you want to solve?\u00a0<\/p>\n<p><strong>More efficient or better workflows<\/strong>: Take stock of the tasks you and your team complete daily. Are there items that ChatGPT&#8217;s API may be able to either allow you to do just as well but more efficiently, or to improve your work product around?<\/p>\n<p>With the recent <a href=\"https:\/\/searchengineland.com\/openai-releases-gpt-4-394269\" target=\"_blank\" rel=\"noopener\">release of GPT-4<\/a>, more opportunities for leveraging the platform will likely continue to crop up.<\/p>\n<p>The post <a href=\"https:\/\/searchengineland.com\/chatgpt-api-seo-guide-394411\" target=\"_blank\" rel=\"noopener\">Your SEO guide to the ChatGPT API<\/a> appeared first on <a href=\"https:\/\/searchengineland.com\/\" target=\"_blank\" rel=\"noopener\">Search Engine Land<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>ChatGPT announced the rollout of its API (GPT 3.5 Turbo) on March 1.\u00a0 I\u2019m bullish on ChatGPT\u2019s utility for several different SEO-related functions like keyword research, local SEO, content, and link building. Having spent much time using ChatGPT, I\u2019m also painfully aware of its limitations. While the API won\u2019t be a panacea (and the web interface is actually much better for some tasks), it can help address some of the shortcomings of the web interface. This article will show you how to maximize ChatGPT\u2019s API with [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"cybocfi_hide_featured_image":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-8666","post","type-post","status-publish","format-standard","hentry","category-best-seo-blogs"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":false,"author_link":"https:\/\/craighordlow.com\/author\/"},"_links":{"self":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/posts\/8666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/comments?post=8666"}],"version-history":[{"count":0,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/posts\/8666\/revisions"}],"wp:attachment":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/media?parent=8666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/categories?post=8666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/tags?post=8666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}