Keyword Auto-Optimizer (GSC)
Semantically optimize pages for keywords using N-grams and AI!
Title Title Title Title Title Title Title Title Title Title Title
This tool addresses the challenge of identifying how well keywords from Google Search Console are being used within your webpage. It compares the queries driving impressions and clicks with the content present on your page, highlighting underused keywords and suggesting improvements. By analyzing both the GSC data and the page content, the app helps ensure you’re making the most of your organic search opportunities.
Building the "Keyword Auto-Optimizer (GSC)" App
Setting Up the Inputs
The app begins by accepting two key inputs: a URL for the target page and the name of the Google Search Console (GSC) property. These inputs allow the app to connect directly to your GSC data and accurately scrape the webpage for analysis.
Step 1: Gathering Data from Google Search Console and the Webpage
The first step involves fetching keyword data from GSC using the site property. The app is configured to filter queries associated with the provided URL, capturing details about the most impactful search terms—specifically those with clicks. In parallel, it scrapes the webpage to extract the body text, ensuring that the textual content is ready for further processing. This dual data extraction provides a clear picture of both the keywords bringing traffic and the content that might benefit from enhancement.
Step 2: Processing Keywords and N-grams with Python
A Python function takes over to process and analyze the harvested data. It tokenizes the text from your webpage, generating n-grams ranging from bigrams to 6-grams. Using a Sentence Transformer model, the function calculates relevance scores by comparing these n-grams against the list of top queries (and their plural forms) from GSC. The function then produces a table that details:
The number of words in each n-gram.
The specific phrase.
The occurrence count of that phrase in the page content.
The computed relevance score for each phrase.
Notably, if certain key phrases from GSC have zero occurrences on the page, the groundwork is set for recommending new placements. For phrases with minimal usage (between one and four occurrences), similar suggestions are generated to enhance content relevance.
Step 3: Generating Optimized Suggestions Using Chat Models
Next, a Chat Model is employed to review the generated n-gram table and the keyword list from GSC. With detailed instructions, the model identifies n-grams with zero occurrences and those that appear infrequently. For each identified phrase, it suggests where in the document text a new placement may enhance the keyword strategy. The suggestions include a review of the current sentence and a modified version where the missing or underused keyword is emphasized. A second Chat Model then reviews these recommendations, ensuring that duplicate suggestions are eliminated and that the proposed changes read naturally. The final output presents clear, actionable recommendations in markdown format.
Customizing the App for Your Needs
Adjust the N-gram Analysis: You can modify the range of n-grams generated by changing the sizes (e.g., adjusting from bigrams to longer phrases) to better capture different expressions or keyword variations.
Refine the Relevance Threshold: Tweak the relevance score threshold to be either more inclusive or more selective, depending on how strict you want the optimization criteria to be.
Tailor Chat Model Instructions: Customize the instructions given to the Chat Models to suit the tone and voice of your brand or to emphasize certain stylistic elements in the modified content.
Integrate Additional Datasets: Consider combining competitor keyword data or historical performance metrics to further fine-tune the recommendations.
Running the App at Scale with Bulk Runs
Navigate to the Bulk Runs section on Moonlit Platform and create a new job.
Upload a CSV file that includes the URL and GSC Property Name for each page you wish to analyze.
Map the CSV columns appropriately, ensuring that each field is correctly associated with the corresponding input for the app.
Execute the job, which will iterate over each record, process the data, and generate optimized keyword suggestions for every page.
Build and Explore More AI SEO Tools
Moonlit Platform equips you with the flexibility to not only optimize content for individual pages but also to scale optimization across an entire website. Sign up today to start building custom apps and leverage our platform's extensive capabilities to improve your organic search performance.
Customize this Tool to your Needs
Learn how copy this tool and customize it to your specific use cases.
Run this Tool at Scale
Learn how to run this tool and many others for 1000s of inputs at once.