Entity-Based Internal Link Opportunities with Google Cloud NLP (Notebook and Demo Data)
This Google Colab notebook finds internal linking opportunities from the entities your pages share. It runs entity sentiment analysis from the Google Cloud Natural Language API over the titles and body content of a crawl export, then turns shared entities into link suggestions between pages.
What it helps you do
- Extract entities, with their salience and sentiment, from every page’s title and content
- Create one-to-one link matches: pairs of pages that share a top-five entity, scored by how prominent the shared entity is
- Create one-to-many clusters: for each page’s top three entities, every other page that features the same entity, ready to review as link targets
Where it’s used
It is the entity half of the lesson “Practical: Entity Analysis in Web Content Audits for Automated Internal Link Opportunity Identification” in Introduction to Machine Learning for SEO. The same lesson uses the LinkBERT notebook for the language-model half, and both come with demo crawl data and example results, so you can see the expected output before you run it on your own site.
Good to know
You need a Google Cloud API key with the Natural Language API enabled, billed per request on your Google Cloud account. Treat the output as candidates: shared entities tell you two pages are related, and you still decide where the link sits and what the anchor says.
The notebook, the demo data and the guided walkthrough come with the course. See what the course covers.
What’s included
- Entity and entity sentiment analysis of page titles and content with the Google Cloud Natural Language API
- One-to-one link matches between pages that share a top entity, with a prominence score
- One-to-many clusters: every page that shares a page's top three entities
- Works from a Screaming Frog crawl export (Address, Title, Content)
- Demo crawl data and example results included
Where this resource is used on MLforSEO
Used in the course
More internal linking resources
- Coding Script or NotebookTopic Modelling with LDA in Python: Tuned, Visualised and Linked (Notebook)
- No-Code TemplateInternal Link Opportunities Quick Find (Google Sheets Template)
- Coding Script or NotebookML-Powered Internal Linking Opportunity Discovery with LinkBERT
- Coding Script or NotebookLink Blocks for WordPress: Related Posts, Topic Cards, Siblings and Mentions
- Coding Script or NotebookLink Menu to Linking Rules: Python Script for Auto-linking Plugins
- ChecklistBefore You Build: A Checklist for Internal Linking Tools
See all 26 internal linking resources →See all 29 entity SEO resources →See all 73 coding script or notebook resources →