How to Search for Keywords on a Website: 5 Methods, From Page Source to Search Console
Searching for keywords on a website can mean three different jobs: reading what a page targets, seeing what a site ranks for, or finding what your own pages never mention. Here is how to do each one.

On this page
"Search for keywords on a website" is three different jobs wearing one phrase. You might want to see which keywords a page targets, which queries a site actually ranks for, or which keywords your own pages never mention. Each job has a different tool, and using the wrong one is why most advice on this topic feels vague.
This guide gives one method per job, with commands you can run in a terminal. If you are new to the underlying idea, how SEO keywords work explains why a page is matched to a query.
Which kind of keyword search do you need?
| You want to know | Use | Needs access to the site? |
|---|---|---|
| What a page is targeting | Page source: title, headings, meta description | No |
| How often a term appears on a page | Find in page, or a word count from the HTML | No |
| What a site ranks for | Search Console (your site) or a rankings database (anyone's site) | Search Console: yes |
| What searchers type before they reach you | Google autocomplete and the results page | No |
| Where your own pages miss a term | Search your repo and compare with your query list | Yes, your repo |
Method 1: Read the on-page signals
A page tells search engines what it is about in a handful of places. Open the page, view the source (in most browsers, Ctrl+U or Cmd+Option+U), and look at these in order:
- The
<title>tag. - The
<meta name="description">tag. - The
<h1>, then the<h2>and<h3>headings. - The URL slug.
- Image
alttext and the anchor text of internal links.
From a terminal, you can pull the same elements without scrolling through source:
curl -s https://example.com/some-page > page.html
grep -oiE '<title>[^<]*' page.html
grep -oiE '<meta name="description" content="[^"]*' page.html
grep -oiE '<h[1-3][^>]*>[^<]*' page.html
The meta description pattern assumes name comes before content in the tag, which is common but not guaranteed. If a grep comes back empty, open the source and check the attribute order. Headings split across several tags or rendered by JavaScript will also be missed: curl only sees the HTML the server sends, so a client-rendered page needs the browser's developer tools instead.
The keyword a page targets is usually the phrase the title, the H1 and the slug have in common. When those three disagree, the page has no clear target, which is worth fixing on your own site.
Method 2: Count a term on one page
To check whether a word appears on a page, use your browser's find command (Ctrl+F or Cmd+F). It shows a count and highlights each use, so you can see whether the term sits in headings and the first paragraph or only in a footer.
For a rough frequency list of the words on a page:
curl -s https://example.com/some-page \
| sed 's/<[^>]*>/ /g' \
| tr 'A-Z' 'a-z' \
| tr -cs 'a-z' '\n' \
| sort | uniq -c | sort -rn | head -20
This strips tags, lowercases the text and counts words. It also counts words inside inline scripts and styles, and the top of the list will be filled with "the" and "and", so read it as a prompt, not a measurement. Frequency is a weak signal anyway: search engines match on meaning and intent, not on how many times a phrase repeats, and stuffing a term in does not help the page.
Method 3: See what a site ranks for
Reading a page shows what its author intended. It does not show what Google rewards. For that you need ranking data, and where it comes from depends on whose site it is.
Your own site: Search Console. Open the Performance report, switch to the Queries tab, then add a Page filter for the URL you care about. You get the queries that produced impressions and clicks, with average position. Google notes that anonymized queries and row limits mean the report is not complete, so a missing query is a reason to check, not proof that you do not rank for it. Search Console only reports on properties you have verified.
Someone else's site: a rankings database. You cannot see a competitor's Search Console, so tools such as Semrush, Ahrefs and Similarweb estimate it from their own crawl and clickstream data. Enter a domain or a URL and they list the keywords it appears for, with volume and difficulty estimates. These are provider estimates and the tools disagree with each other, so use them to compare sites and spot patterns, not as exact traffic figures. Our guide to competitor keyword research covers how to turn that list into pages you should write.
A quick check with no tool. Search Google for site:example.com "your phrase". The site: operator limits results to one domain, so you see which of its pages Google associates with that phrase. It is a coarse test, but it needs no account.
Method 4: Let search suggest the keywords
Autocomplete shows what people actually type. Start a query related to your page and note the suggestions, then read the "People also ask" box and the related searches at the bottom of the results page. Each is a candidate keyword with a visible intent.
Open the top results for a candidate and check what kind of page ranks. If all of them are tools, a guide will struggle; if they are all guides, a product page will. Your keyword strategy should record that intent next to each keyword, so you assign one URL per search and your own pages never compete.
Method 5: Search your own repo for missing keywords
The first four methods look outward. The most useful check for a site you own runs the other way: take the queries you want to rank for and search your content for them.
If your content lives in a repository, that is a one-line search:
grep -rli "search for keywords" content/ src/app/
Run it for each target keyword and sort the results into three cases:
- No file matches. You have no page for the keyword. This is a content gap.
- Several files match. Pages may compete. Decide which one is the target and point the others at it with an internal link.
- A file matches but the term is missing from the title and H1. The page mentions the topic without targeting it. Update the title, heading and opening paragraph.
This is the step SEOAgent automates, and the difference is where the work ends. SEOAgent installs as a GitHub App, reads your repo and your Search Console data, and compares the two. When it finds a keyword with no page, it writes the article and opens a pull request on your repo. You review the diff and merge it. It changes the files rather than handing you a report to act on. The limits: your site's code must live in a GitHub repo, and nothing ships until you approve the pull request.

You can also look up a single keyword without an account: seoagent keywords --peek "<keyword>" returns its volume, difficulty and intent on a daily quota. The full keyword research feature adds Search Console positions and cluster assignments.
A worked example
Say you maintain a docs site and want to know whether it covers "rate limiting".
- Run the
grep -rlisearch across your content. Two files match: a changelog entry and an API reference page. - Check each file's title and H1. Neither mentions rate limiting, so the topic is covered in passing but not targeted.
- Look at Search Console, filtered to the API reference page. It shows a few impressions for "api rate limit headers" at a low position.
- Search Google for the phrase and open the top results. They are dedicated how-to pages, not reference tables.
- Decision: write one page targeting the phrase, link it from the API reference and the changelog entry, and leave the existing pages as they are.
Five checks, one decision, and no paid tool needed.
Common mistakes
- Treating page source as ranking data. A page's title shows what it targets, not what it earns. Confirm with Search Console.
- Trusting one tool's volume. Keyword volumes are estimates, and tools disagree. Compare keywords within one tool.
- Chasing frequency. A phrase repeated more often does not rank better. Put it where a reader expects it: title, H1, opening, and a heading.
- Skipping intent. A keyword you can find is not always one you should write for. Read what ranks first.
Summary
To search for keywords on a website, first decide the job. Read the title, headings and meta description to see what a page targets. Use Search Console for the queries your own site ranks for, and a rankings database for anyone else's. Use autocomplete to see what searchers type. Then search your own repo for each target keyword to find the pages you are missing.
References
- Performance report: search results dimensions and groupings (Search Console Help)
- SEO Starter Guide: The Basics (Google Search Central)
- Control your title links in search results (Google Search Central)
Related articles
- SEO Discovery: How to Find What Your Site Should Rank ForSEO discovery is the phase where you find out which queries, gaps and technical issues deserve work. Here is a repeatable process, and how to run it from your repo.Read article
- How Do SEO Keywords Work? A Developer's Guide to Search Terms, Intent and PagesKeywords are the link between what a person types and the page that answers it. Here is how search engines use them, where they belong in your files, and how to verify the result.Read article
- Bulk Keyword Rank Checker: Check Hundreds of Rankings Without a Per-Keyword BillA bulk keyword rank checker can mean two different things: reading positions Google already measured, or scraping results for a keyword list. Here is when to use each.Read article
SEOAgent for GitHub
Your first SEO pull request in about 5 minutes.
Connect the repo your site lives in. SEOAgent finds what holds the site back in search and fixes it in pull requests. You review and merge every change.
- ✓14 days free
- ✓No card
- ✓$79/site/month after
- ✓What SEOAgent found, and the plan for your site
- ✓Meta descriptions for 14 pages
- ✓Sitemap and robots.txt
- ✓Organization schema
- 370+sites
- 1,100+articles written
- 3,500+SEO changes made