Skip to content

Searches and the pages they lead to

GET
/api/v1/search-console/queries
curl --request GET \
--url 'https://digize.com/api/v1/search-console/queries?by=search&device=desktop&live=false&limit=100' \
--header 'x-api-key: <x-api-key>'

The Google searches that bring people to a page, or the pages that show for a search, with clicks, impressions, click rate and position, over any days Search Console keeps (about 16 months; the latest 28 unless asked), on one device or in one country if asked. With neither, the top searches and their pages. By page, each page’s own numbers instead, which take in the searches too rare to list.

Needs the analytics:read permission.

page

A page’s address, or its path on any of the sites, such as /pricing: the searches that bring people to it.

string
<= 2000 characters

A page’s address, or its path on any of the sites, such as /pricing: the searches that bring people to it.

query

A search, word for word: the pages that show for it.

string
>= 1 characters <= 200 characters

A search, word for word: the pages that show for it.

by

Rows by search and page, or by page alone.

string
default: search
Allowed values: search page

Rows by search and page, or by page alone.

startDate

The first day, on Search Console’s clock (Pacific time). Left out, 27 days before endDate.

string
/^\d{4}-\d{2}-\d{2}$/

The first day, on Search Console’s clock (Pacific time). Left out, 27 days before endDate.

endDate

The last day. Left out, the latest Search Console has, two or three days ago.

string
/^\d{4}-\d{2}-\d{2}$/

The last day. Left out, the latest Search Console has, two or three days ago.

device
string
Allowed values: desktop mobile tablet
country

Search Console’s three-letter country code: usa, gbr, deu.

string
/^[a-z]{3}$/

Search Console’s three-letter country code: usa, gbr, deu.

live

Ask Search Console now even when the last sync’s 28 days would answer. The sync keeps the 500 most clicked searches, each with only the page it led to most, so asking live reaches rarer searches and every page a search shows.

boolean

Ask Search Console now even when the last sync’s 28 days would answer. The sync keeps the 500 most clicked searches, each with only the page it led to most, so asking live reaches rarer searches and every page a search shows.

limit
integer
default: 100 >= 1 <= 1000

Done

Media typeapplication/json
object
property
required
string
source
required

The last sync’s 28 days, or Search Console asked now.

string
Allowed values: stored live
startDate
required
string
endDate
required
string
totals
required
Any of:
object
clicks
required
number
impressions
required
number
ctr
required
number
position
required
number
rows
required

The most clicked first.

Array<object>
object
query
required

Null in rows by page.

string | null
url
required
string
host
required
string
path
required
string
clicks
required
number
impressions
required
number
ctr
required

Clicks over impressions, 0 to 1.

number
position
required

Where the result sat on average, 1 being the top.

number
more
required

Whether there were more rows than the limit.

boolean
note
required
string | null

Example

{
"source": "stored"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}