API Documentation

Google Site Search API

Estimate Google results for a domain and inspect the current organic results, with an optional recency window.

Test API

For domain search use cases and a live test, see the Google Site Search API product page.

Google Site Search API product page →

Endpoint

GET https://api.goanyapi.com/api/v1/google-site-search

With the current configuration, each successful request costs 4 credits.

The current request cost follows the API configuration shown on this page.

Authentication

Authorization: Bearer YOUR_API_KEY

Request parameters

ParameterRequiredDescription
siteYesDomain to search, such as example.com or www.example.com. Maximum 253 characters. Do not include a protocol, port, path, or site: prefix.
qdrNoOptional recency window: h, d, w, m, or y. Omit it for Any Time.
glNoTwo-letter country code, such as us.
hlNoInterface language code, such as en or zh-cn.
deviceNodesktop, mobile, ios, iphone, ipad, ios_tablet, android, or android_tablet.
browserNochrome, safari, or firefox. Firefox can only be combined with desktop.
safeNoSafeSearch setting: active or off.

The endpoint does not accept raw q, search_type, tbm, or udm parameters.

Additional Google search controls

ParameterTypeDescription
filterstringSimilar-result filtering: 1 enabled, 0 disabled
crstringResult countries, e.g. countryUS or countryFR|countryDE
lrstringContent languages, e.g. lang_en or lang_fr|lang_de
nfprstring1 prefers original spelling; 0 allows corrected queries
startintegerResult offset from 0 to 990
tbsstringAdvanced date filter, e.g. qdr:w; cannot combine with qdr

hl also accepts regional language codes such as zh-cn. The existing response JSON contract is unchanged. Unsupported combinations of browser/platform/vertical controls with advanced filters return invalid_params.

Request example

curl --get 'https://goanyapi.com/api/v1/google-site-search' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'site=example.com' \
  --data-urlencode 'qdr=w'

This request applies the following search scope:

site:example.com

This example uses qdr=w to limit the query to the past week.

Response example

{
  "code": "ok",
  "message": "ok",
  "data": {
    "endpoint": "google-site-search",
    "remainingCredits": 96,
    "query": {
      "site": "example.com",
      "qdr": "w"
    },
    "siteCount": 128000,
    "searchTime": 0.42,
    "organic": [
      {
        "link": "https://example.com/article",
        "source": "Example",
        "display_link": "https://example.com › article",
        "title": "Example Article",
        "description": "An example search result.",
        "extensions": [
          {
            "inline": true,
            "type": "text",
            "text": "3 days ago",
            "rank": 1
          }
        ],
        "rank": 1,
        "global_rank": 1
      }
    ]
  }
}

Response fields

FieldDescription
data.endpointEndpoint identifier: google-site-search.
data.costCreditsCredits consumed by this successful request.
data.remainingCreditsCredits remaining after the request.
data.queryNormalized public request parameters.
data.siteCountEstimated total reported for the complete website query.
data.searchTimeReported search processing time, when available.
data.organicOrganic results returned on the current result page.
data.organic[].extensionsOptional result metadata; with a recency filter, some rows may include a relative time hint.

siteCount is an estimate, not an exact indexed-page count or the number of rows in organic. It can vary over time and by country, language, device, and browser.

When qdr is set, some organic rows may include a relative time hint such as 3 days ago in extensions. It can be used as a recency or indexing reference, but the field is optional, may be absent from any row, and is not an exact crawl or first-indexed timestamp.

Billing

  • Credits are deducted only after the query returns a valid siteCount value.
  • Authentication failures, invalid parameters, failed queries, and incomplete results do not consume credits.