Google search operators that still work, and how to run them through an API
Google documents six search operators on its Search Help page: quotes for an exact match, site:, the minus sign, before:, after: and filetype:. Other operators that SEO practitioners use every day, such as OR, intitle: and inurl:, are not documented on Google’s current help pages; they may work for your query, and they may stop working without notice.
Documented vs undocumented
Checked on 2026-09-17 against Google’s Refine Google searches help page and Google Search Central’s search operators documentation.
| Operator | Status | What it does | Example |
|---|---|---|---|
"..." |
Documented (Search Help) | Exact word or phrase | "zero trust architecture" |
site: |
Documented (Search Help, Search Central) | Results from a domain, URL or URL prefix | site:example.com pricing |
- |
Documented (Search Help) | Leave out a word | python -snake |
before: |
Documented (Search Help) | Results before a year or date | ai regulation before:2026-01-01 |
after: |
Documented (Search Help) | Results after a year or date | ai regulation after:2026-06-01 |
filetype: |
Documented (Search Help, Search Central) | Files of a type, by content-type header or extension | state of devops report filetype:pdf |
imagesize: |
Documented (Search Central), Google Images only | Images of a given size | not usable for web search |
src: |
Documented (Search Central), Google Images only | Pages referencing an image URL | not usable for web search |
OR |
Not documented on these pages | Either term | "headless cms" OR "composable cms" |
intitle: |
Not documented on these pages | Term in the page title | intitle:alternatives crm |
inurl: |
Not documented on these pages | Term in the URL | inurl:pricing site:example.com |
intext: |
Not documented on these pages | Term in the body text | intext:"powered by" checkout |
“Not documented” means the operator is not on these Google pages. It does not mean it fails, and “documented” does not mean the result set is complete. Google can change or remove any operator.
The documented operators
Exact match: quotes
Put a word or phrase in double quotes to require it. Use it for brand names that are also common words, product model numbers, and exact sentences.
"acme analytics"
"error 0x80070005"
"the fastest way to reconcile invoices"
site:
Restricts results to a domain, URL or URL prefix. Google Search Central’s site: page gives examples such as site:example.com and a URL prefix combined with a term. Combine with - to exclude a domain:
site:example.com/blog onboarding
site:docs.example.com "rate limit"
"acme analytics" -site:acmeanalytics.com
Exclude: minus
Put - directly before a word you want to leave out: jaguar -car, "acme" -careers. Google’s page documents it for words; prefixing another operator, as in -site:amazon.com, is common practice but not shown there, so check it on your queries.
before: and after:
Google’s help page shows before: and after: with a year or a date, and combining both for a range. It shows dates written with slashes and with hyphens; the examples below use hyphens.
"acme analytics" after:2026-09-01
kubernetes cost optimization after:2025 before:2026
filetype:
Restricts to a file type. Search Central says it matches by the content-type HTTP header or the file extension.
"market sizing" saas filetype:pdf
site:example.gov budget filetype:xlsx
The spacing rule
Google’s help page says not to put spaces between the operator and your search term: site:example.com works as an operator, site: example.com does not.
Undocumented operators
OR, intitle:, inurl:, intext: and variants like allintitle: are widely used in SEO workflows, but they are not on the Google pages checked for this post. If a workflow depends on one:
- Test it on a handful of queries where you know the right answer.
- Keep the test set and rerun it on a schedule, so you notice when behavior changes.
- Prefer a documented form when one exists, such as
"exact phrase"instead ofintext:, or filter the returnedlinkvalues in your own code instead of relying oninurl:.
Running operators through this API
Operators are part of the query string, so they go in the query field of POST /v1/monitor/google unchanged. The request also needs country (or gl), and takes optional hl, location or uule, device and pages (1 to 10).
curl -X POST https://api.answerline.dev/v1/monitor/google \
-H "Authorization: Bearer $ANSWERLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "\"acme analytics\" -site:acmeanalytics.com after:2026-09-01", "country": "US", "hl": "en", "pages": 2 }'
Inside JSON, escape the inner double quotes (\"). In Python or TypeScript, the JSON encoder does it for you.
Time filters with the url shape
before: and after: cover most date needs. For Google’s relative time filters (past day, week, month, year), send a complete Google search URL in url instead of query. Only q, gl, hl, uule, num, start, tbs and safe are applied from it; num is read as result depth in whole pages of ten; url cannot be combined with query, location, uule or pages.
{ "url": "https://www.google.com/search?q=%22acme+analytics%22&gl=us&hl=en&tbs=qdr:w&num=20" }
Google does not document tbs values. Third-party references such as Bright Data’s Google URL parameter list (dated February 26, 2026) give qdr:h, qdr:d, qdr:w, qdr:m, qdr:y for the past hour, day, week, month and year, and cdr:1,cd_min:MM/DD/YYYY,cd_max:MM/DD/YYYY for a custom range. See Google search parameters for every field.
URLs with tbm (Google verticals such as Images) are rejected, so imagesize: and src: are not usable here.
Use cases
1. Site audits and indexation spot checks
site: shows a sample of what Google returns for a domain or section. Use it to spot pages that should not be there (staging hosts, parameter URLs, thin tag pages) and sections that return nothing.
site:staging.example.com
site:example.com/tag/
site:example.com "lorem ipsum"
Limits you must respect: Google says site: does not necessarily return every indexed URL, a bare site: query without terms returns results in a relatively random order, and the URL Inspection tool in Search Console is the reliable way to check indexing. This API also has no total-results field, and one request returns at most 10 pages, so treat counts as a sample. Search Central also shows using site: with spam terms to find hacked or injected pages on your own site.
2. Competitor content discovery
Find what a competitor has published on a topic, and when:
site:competitor.com "ai overview"
site:competitor.com/blog after:2026-06-01
site:competitor.com filetype:pdf
Collect organicResults[].link, title and date, and diff monthly. For broader competitor tracking, see competitor analysis.
3. PR and brand mentions
Mentions of your brand outside your own properties:
"acme analytics" -site:acmeanalytics.com -site:linkedin.com after:2026-09-01
"acme analytics" "series b"
Google News results have a separate endpoint (POST /v1/monitor/google/news); see Google News API.
4. Content theft and duplication
Search a distinctive sentence from your page, excluding your domain:
"a distinctive sentence copied from your article" -site:example.com
5. Research documents
"benchmark report" "time to first byte" filetype:pdf after:2025
Building an operator query library
Operator queries are most useful as a maintained library that runs on a schedule, not as one-off searches. A workable structure:
| Field | Example | Why |
|---|---|---|
id |
pr-mentions-after-date |
Stable key for results history |
template |
"{brand}" -site:{domain} after:{since} |
Reusable across brands and clients |
operators |
quotes, site:, after: |
Lets you find every query affected if an operator changes |
documented |
true |
Flags queries that depend on undocumented operators |
market |
country: "US", hl: "en" |
Results depend on targeting |
pages |
2 |
Fixes depth and cost per run |
cadence |
weekly |
Drives scheduling and budget |
known_answer |
a URL that must appear | Regression check for operator behavior |
Steps to run it:
- Render templates per brand, domain and date window.
- Submit as async tasks, with an idempotency key made from the query id, market and run date, so a rerun of the same schedule is not charged twice. See idempotency keys.
- Store every organic result with the query id, run date,
position,page,link,titleanddate. - Diff against the previous run: new links are the alert; disappeared links are context.
- Check
known_answerqueries first; if one fails, pause alerts from queries using the same operators until you have looked.
For monitoring what AI assistants say about a brand rather than which pages mention it, see brand mentions in ChatGPT.
A batch example
Many operator queries at once cost less as async tasks: 3 credits each instead of 5, submitted in batches of up to 500. Python with requests:
import os
import time
import requests
API = "https://api.answerline.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['ANSWERLINE_API_KEY']}"}
BRAND, OWN = "acme analytics", "acmeanalytics.com"
queries = [
f'"{BRAND}" -site:{OWN} after:2026-09-01',
f'"{BRAND}" review -site:{OWN}',
f'"{BRAND}" alternative -site:{OWN}',
]
tasks = [{"taskType": "GOOGLE", "payload": {"query": q, "country": "US", "hl": "en", "pages": 2}} for q in queries]
r = requests.post(f"{API}/v1/async/task/batch", json=tasks, headers=HEADERS, timeout=60)
r.raise_for_status()
ids = [x["task"]["id"] for x in r.json()["results"] if x["success"]]
mentions = {}
while ids:
time.sleep(10)
for tid in list(ids):
d = requests.get(f"{API}/v1/async/task/{tid}", headers=HEADERS, timeout=30).json()
if d["task"]["status"] not in ("COMPLETED", "FAILED"):
continue
ids.remove(tid)
if d["task"]["status"] == "COMPLETED":
for o in d["response"]["result"].get("organicResults", []):
mentions.setdefault(o["link"], o)
for link, o in mentions.items():
print(o.get("date", ""), o["title"], link)
For large or scheduled runs, add a webhook to each task instead of polling; see webhooks.
TypeScript with fetch, for a single synchronous query:
const query = `"acme analytics" -site:acmeanalytics.com after:2026-09-01`;
const res = await fetch("https://api.answerline.dev/v1/monitor/google", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.ANSWERLINE_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ query, country: "US", hl: "en" }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const { result } = await res.json();
console.log(result.organicResults?.map((o: { link: string }) => o.link));
Cost
Operators do not change the price. A Google Search async task costs 3 credits, a synchronous call 5, and each page after the first adds 2. The three-query batch above with pages: 2 is 3 x (3 + 2) = 15 credits. The free tier includes 500 credits per month; see /docs/credits.
Pitfalls
- Spaces after the colon.
site: example.comis not an operator. - Unescaped quotes. A raw
"inside a JSON string breaks the body; escape it or let your JSON library encode. - Using
site:as an index count. Google says it is incomplete; use Search Console for indexing questions. - Mixing
queryandurl. They are mutually exclusive; sending both returns 400 with the field named indetails[]. - Relying on undocumented operators without tests. Keep a small regression set of queries with known answers.
- Forgetting market targeting. Operator results still depend on
country,hlandlocation; a mention check for Germany needscountry: "DE". - Excluding by operator only. Filter
organicResults[].linkagainst your own domains in code as well, so a changed operator behavior cannot leak your own pages into a mention report.
Related: what is a SERP, SERP feature change tracking, brand protection and is there an official Google Search API.
Request fields and examples are on the Google Search engine page.
Questions
Which Google search operators does Google officially document?
Google's Refine Google searches help page documents quotes for exact matches, site:, the minus sign to exclude words, before:, after: and filetype:. Google Search Central also documents site: and filetype:, plus imagesize: and src:, which only work on Google Images (checked 2026-09-17).
Do OR, intitle: and inurl: still work?
They are not documented on the Google Search Help or Search Central operator pages checked on 2026-09-17. Treat them as undocumented: test them on your own queries and expect that Google may change or drop them.
Is a site: search a reliable way to count indexed pages?
No. Google's site: documentation says the operator does not necessarily return all indexed URLs under the prefix and recommends the URL Inspection tool in Search Console for checking indexing.
How do I send a search operator through this API?
Put the full query, operators included, in the query field, alongside country and hl, and escape any inner double quotes when you build the JSON by hand. For time filters Google does not express as operators, send a full Google search URL with tbs in the url field.
What does an operator query cost?
The same as any Google Search request: 3 credits as an async task and 5 as a synchronous call, plus 2 credits for each extra page. Operators do not change the price.