SerpBase
Back to Blog

Google Search API: Exclude Sites from Results with -site:

Add -site:domain.com to the query to drop a website from Google results. Tested with two excluded domains on desktop and phone: zero leaks in 19 results.

December 2, 2026
By SerpBase Team2 min read

Short answer: put -site:domain.com in the query you send to /google/search. Google drops every result from that domain, and you can stack several exclusions in one query. It costs the same 1 credit as any other search.

The request

curl -X POST 'https://api.serpbase.dev/google/search' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{"q":"best running shoes -site:amazon.com -site:nike.com","gl":"us","hl":"en","device":"desktop"}'

There is no separate "exclude" parameter: the operator is part of q, exactly as you would type it into Google. Keep a space before each minus sign and no space after it.

What came back

We ran the query above on 2 December 2026, once with the desktop layout and once with the default phone layout:

LayoutOrganic resultsamazon.com or nike.com in themFirst three sites
desktop100runrepeat.com, runnersworld.com, reddit.com
phone90runrepeat.com, runnersworld.com, reddit.com

The rest of the desktop page came from irunfar.com, fleetfeet.com, quora.com, sixminutemile.com and rtings.com. The desktop answer also carried a discussions block (Reddit and Quora threads) and inline_videos.

The first result, trimmed:

{
  "rank": 1,
  "title": "7 Best Running Shoes in 2026",
  "link": "https://runrepeat.com/guides/best-running-shoes",
  "display_url": "https://runrepeat.com › guides › best-running-shoes",
  "date": "Sep 12, 2026"
}

Python: check that an exclusion held

import requests
from urllib.parse import urlparse

EXCLUDE = ["amazon.com", "nike.com"]
q = "best running shoes " + " ".join(f"-site:{d}" for d in EXCLUDE)

r = requests.post(
    "https://api.serpbase.dev/google/search",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"q": q, "gl": "us", "hl": "en", "device": "desktop"},
    timeout=60,
).json()
if r["status"] != 0:
    raise SystemExit(r.get("error"))

for item in r.get("organic", []):
    shown = item.get("display_url") or item["link"]
    leaked = any(d in shown for d in EXCLUDE)
    print(item["rank"], urlparse(item["link"]).netloc, "LEAK" if leaked else "")

Things that trip people up

  • Check display_url, not only link. Some result links come back as a google.com/goto?... address when Google does not reveal the target on that page; display_url still shows the site. See resolving Google redirect links.
  • -site: matches the domain you name. -site:amazon.com covers www.amazon.com too; country sites such as amazon.co.uk are separate domains and need their own term.
  • It filters organic results. Ads, shopping units and some modules can still show the excluded brand.
  • Long exclusion lists get unreliable. Google limits query length (about 32 words); a dozen -site: terms is a practical ceiling.
  • The opposite is site:. To keep only one domain, see site: queries for indexing audits.

Related

Cost and docs

A Google search is 1 credit, with or without operators. Failed requests are not charged, and new accounts get 500 free credits.