Skip to content
Coding Script or NotebookGoogle ColabAcademy

Embedding and Link Candidate Scoring Notebook (OpenAI, Gemini or Screaming Frog Embeddings)

ForInternal linkingContent analysis

By Sam Torres· Updated 5 Dec 2026

This Google Colab notebook turns your pages into embeddings and scores how closely every page relates to every other, so you get a ranked list of link candidates that no keyword rule would have found.

What it helps you do

  • Choose your path: create embeddings in the notebook with an OpenAI or Gemini key, or reuse the embeddings Screaming Frog made during your crawl
  • Run on sample data first, and see a cost estimate before any API call
  • Score every page pair with cosine similarity in one step
  • Rank the candidates, tune the threshold, and decide which near-identical pairs are duplicates
  • Export the candidates, and keep the embeddings for the clustering lab

It comes with a written step-by-step walkthrough with a troubleshooting list, and a guide to getting an OpenAI or Gemini API key.

Where it is used

Lesson 3.2, where Sam Torres runs both paths. The outputs feed the topic clustering and anchor text labs that follow.

It comes with the AI-powered Internal Linking Audit and Automation course, led by Sam Torres. If you want to build the whole pipeline from audit to measured links with her, that is the place to start.

What’s included

  • Two paths: embed in the notebook (OpenAI or Gemini) or reuse Screaming Frog embeddings
  • Cost estimate before any API call
  • Cosine similarity for every page pair in one step
  • Ranked link candidates with an adjustable threshold
  • Step-by-step walkthrough and an API key setup guide included