q parameter value. They act as surgical filters that tell Google precisely where to look — restricting results to a specific domain, a particular file format, pages whose titles contain a keyword, and more. Unlike the separate API parameters (exactTerms, siteSearch, fileType), search operators live inside the query string itself, which makes them ideal for dynamically constructed queries and power-user search experiences.
How search operators work
You append an operator to your query string in the formatoperator:value — no spaces between the colon and the value. You can mix operators freely with regular keywords and boolean logic in the same q value.
Operator reference
site: — Restrict to a domain or subdomain
Returns only results from the specified domain, subdomain, or URL prefix. This is the most commonly used search operator.
filetype: — Restrict to a file type
Returns only documents with the specified file extension. Useful for surfacing PDFs, spreadsheets, presentations, and other non-HTML documents.
pdf, doc, docx, xls, xlsx, ppt, pptx, txt, rtf, csv, xml, json
You can achieve the same effect using the dedicated
fileType API parameter: &fileType=pdf. The API parameter is generally more reliable than the inline operator for programmatic use. Use the inline operator when you want to let users type it directly into a search box.intitle: — Require a word in the page title
Returns only pages whose HTML <title> tag contains the specified word.
allintitle: — All listed words must appear in the title (alternative form):
inurl: — Require a word in the URL
Returns only pages whose URL contains the specified string. This is particularly effective for targeting blog posts, documentation paths, and structured URL schemes.
allinurl: — All listed words must appear in the URL:
intext: — Require a word in the page body
Returns only pages whose body text contains the specified word. Because most searches already look at body text, intext: is most useful when you want to ensure a specific technical term actually appears in the content rather than just in metadata or links.
allintext: — All listed words must appear in the body text:
related: — Find similar pages
Returns pages that Google considers topically similar to the specified URL. This is most effective with well-known, high-traffic domains.
related: works best as a standalone operator without additional keywords. Results depend entirely on Google’s internal page similarity scores and may be limited or absent for less prominent sites.cache: — Retrieve Google’s cached version info
Returns the Google-cached version of a URL. In the API context, this appears as search results linking to Google’s cache of the specified page rather than performing a keyword search.
link: — Find pages linking to a URL
Returns pages that contain at least one link to the specified URL. Note that Google has substantially reduced the scope of link: results in recent years, so results may be sparse.
Combining operators
You can stack multiple operators and keywords in a singleq value. Each additional operator narrows the result set further.