Working with the Google NLP API (Practical)
Please purchase this course, or sign in if you’re already enrolled, to access the course content.
Lesson overview
Knowing what entity extraction is becomes far more useful once you can run it on your own data. This practical lesson shows how to extract entities from keyword lists using Google’s Natural Language API. It walks through what the API returns, how to set up access, and two ways to run the analysis: a no-code Google Sheets template and a Python notebook in Google Colab that needs no coding from you.
What this lesson covers
- A short recap of entity extraction as a supervised machine learning task
- What the Analyze Entities and entity sentiment features return
- How to read entity types, salience, mentions and metadata
- Setting up a Google Cloud project, billing and an API key
- Running the no-code Google Sheets template and its limits
- Running the Colab workflow, managing quotas and handling language errors
The lesson explains each data point the API provides. Entity type classifies each entity as a person, organisation, location and so on. Salience indicates how prominent an entity is within the analysed text. The lesson adds an important caveat here: salience is far more meaningful in long-form content than in a five-word query, where almost any entity will look prominent. Mention counts and mention variations show how one entity can be referenced in different ways, which again matters more for long text. Wikipedia links and other metadata help you judge how well established an entity is in the real world.
The two methods are compared honestly. The Google Sheets template is quick to start with and suits a small batch of keywords, but it is slower and can hit execution time limits on larger lists. The Colab workflow returns the same fields as a downloadable file and handles thousands of keywords much faster. The lesson also covers practical points such as keeping a keyword ID column so results map back cleanly, checking current pricing on Google Cloud, adjusting quotas to avoid rate limits, and knowing that errors on some non-English keywords are skipped without stopping the run.
This lesson completes the core of the optional Introduction to Entities and Entity Extraction knowledge primer. It gives you a repeatable way to gather entity data that later lessons use for entity audits and competitor analysis. It suits SEOs and analysts who want hands-on entity data without writing code themselves.