Skip to content

Instantly share code, notes, and snippets.

@meysam81
Last active December 31, 2025 11:45
Show Gist options
  • Select an option

  • Save meysam81/66275a11f532e65da60ddf8b92e73e5e to your computer and use it in GitHub Desktop.

Select an option

Save meysam81/66275a11f532e65da60ddf8b92e73e5e to your computer and use it in GitHub Desktop.

Google Search Syntax Reference

Basic Operators

Operator Example Effect
"exact phrase" "kubernetes pod scheduling" Matches exact phrase only
-term python tutorial -video Excludes results containing term
OR docker OR podman Either term (must be uppercase)
| docker|podman Same as OR
* "how to * kubernetes" Wildcard for unknown words
() (docker OR podman) tutorial Groups terms

Site & URL Operators

Operator Example Effect
site: site:github.com oauth2 Search within specific domain
site: site:*.edu research Wildcard subdomain matching
-site: go tutorial -site:medium.com Exclude specific domain
inurl: inurl:api documentation Term must appear in URL
allinurl: allinurl:api docs v2 All terms must appear in URL
intitle: intitle:kubernetes Term must appear in page title
allintitle: allintitle:golang error handling All terms in title
intext: intext:configuration Term must appear in body text

File Type Searches

Operator Example Effect
filetype: filetype:pdf kubernetes security Specific file extension
ext: ext:yaml helm chart Same as filetype

Common types: pdf, doc, docx, xls, xlsx, ppt, csv, txt, yaml, json, xml, md

Numeric & Date Operators

Operator Example Effect
.. laptop $500..$1000 Number range
before: kubernetes before:2023-01-01 Results before date
after: kubernetes after:2024-01-01 Results after date

Date format: YYYY-MM-DD

Special Operators

Operator Example Effect
cache: cache:example.com Google's cached version
related: related:github.com Similar websites
define: define:idempotent Dictionary definition
source: nvidia source:reuters News from specific outlet

Practical Combinations

# Find PDF documentation on a specific site
site:kubernetes.io filetype:pdf security

# Search GitHub for Go error handling, exclude forks
site:github.com "error handling" language:go -fork

# Find recent tutorials excluding certain sites
kubernetes tutorial after:2024-01-01 -site:medium.com -site:dev.to

# Search for exact config examples
"apiVersion: v1" "kind: ConfigMap" site:github.com

# Find alternatives to a tool
"alternative to" prometheus monitoring

# Search within URL path patterns
site:docs.aws.com inurl:/cli/ s3

# Exclude multiple terms
docker compose tutorial -video -youtube -"for beginners"

Rules & Gotchas

  1. Case insensitivity: Kubernetes = kubernetes (operators like OR must be uppercase)
  2. Punctuation ignored: Most punctuation is stripped; use quotes to preserve
  3. 32-word limit: Queries beyond ~32 words get truncated
  4. Stop words: Common words (the, a, is) ignored unless quoted
  5. No nested parentheses: ((a OR b) AND c) won't work as expected
  6. Operator spacing: No space after colon (site:github.com not site: github.com)
  7. Combining exclusions: Each exclusion needs its own minus (-youtube -video)
  8. Quotes are literal: "go lang" won't match golang

Deprecated/Non-functional

These no longer work or have limited effect:

  • +term (forcing inclusion) — use quotes instead
  • ~synonym — removed
  • info: — mostly deprecated
  • link: — discontinued
  • inanchor: / allinanchor: — unreliable

Quick Reference Card

"exact"          Exact phrase match
-exclude         Remove term from results
site:domain      Limit to domain
filetype:ext     Specific file type
intitle:term     Term in page title
inurl:term       Term in URL
before:YYYY-MM-DD  Date limit (before)
after:YYYY-MM-DD   Date limit (after)
num..num         Number range
OR / |           Either term
*                Wildcard word

Let's get straight to the syntax. Google Search operators function as command-line inputs for the search engine.

Here is the direct, concise breakdown of the syntax rules and operators you can use to filter results.

Google Search Syntax Guide

1. Boolean & Basic Operators

These control the logic of the query.

Operator Function Example
" " Exact Match. Forces Google to find the exact phrase. "search engine optimization"
- Exclusion. Removes pages containing a specific term. jaguar speed -car
OR / **|** Alternatives. Finds pages with at least one of the terms. vacation OR holiday
* Wildcard. Acts as a placeholder for any unknown term(s). "standard model of * physics"
() Grouping. Groups terms to control operator precedence. (ipad OR iphone) apple

2. Advanced Field Operators

These limit the search to specific parts of a webpage or domain. Note: Do not put a space after the colon.

  • site:

  • Action: Limits results to a specific domain or TLD.

  • Example: site:edu "machine learning" or site:nytimes.com

  • filetype: (or ext:)

  • Action: Limits results to a specific file extension (PDF, DOCX, PPT, CSV, etc.).

  • Example: financial report filetype:pdf

  • intitle:

  • Action: Finds pages with a specific term in the HTML <title> tag.

  • Example: intitle:"index of"

  • allintitle:

  • Action: Finds pages where all following terms appear in the title.

  • Example: allintitle: login password admin

  • inurl:

  • Action: Finds pages with a specific term in the URL slug.

  • Example: inurl:view/index.shtml

  • intext:

  • Action: Forces Google to find the term in the body text (ignoring title/URL).

  • Example: intext:"bioluminescence"

3. Numerical Ranges

  • ..
  • Action: Searches for a range of numbers (dates, prices, measurements).
  • Example: camera $50..$100 or WWII 1939..1945

4. Logical Combinations (The "Stack")

The real power comes from combining these to create specific filters.

  • Finding Research Papers: site:edu OR site:gov filetype:pdf "climate change"
  • Finding Competitor Pricing: site:competitor.com "price" range $50..$200
  • Technical Troubleshooting: "error 404" -site:stackoverflow.com intitle:solved

To ensure you can apply this effectively, which area would you like to practice first?

  1. Complex Chaining: We can build a "stack" of 3+ operators to find a very hard-to-locate document (e.g., a specific PDF on a government site).
  2. Security & Dorking: We can look at how intitle: and filetype: are used in "Google Dorking" to find exposed sensitive information.
  3. Troubleshooting: We can discuss why Google sometimes ignores these operators and how to force "Verbatim" search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment