Skip to content

See Google's results for a search

POST
/api/v1/dataforseo/results
curl --request POST \
--url https://digize.com/api/v1/dataforseo/results \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "keyword": "example", "device": "desktop", "depth": 100, "locationCode": 2840, "languageCode": "en", "fresh": false }'

Google’s results for a search now, from DataForSEO’s SERP API, as someone in the country sees them: the ads, the featured snippet and the results in order, the workspace’s own sites marked, and where the first of them shows. Each lookup costs money from the workspace’s DataForSEO balance, as cost says in US dollars; the same lookup again within a day is free, answered from what it found. Each 10 results deeper cost a little more.

Needs the analytics:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
keyword
required

The search, such as “coffee shop austin”.

string
>= 1 characters <= 200 characters
device
string
default: desktop
Allowed values: desktop mobile
depth
Any of:
number
Allowed value: 10
locationCode

DataForSEO’s code for the country, from dataforseo.countries: 2840 is the United States, 2826 the United Kingdom.

integer
default: 2840 > 0 <= 9007199254740991
languageCode

The language’s code, such as en, from dataforseo.countries.

string
default: en >= 2 characters <= 8 characters
fresh

Ask DataForSEO again rather than answer what the same lookup found in the last day. It costs money again.

boolean

Done

Media typeapplication/json
object
keyword
required
string
total
required

The results Google says it has in all.

number | null
checkUrl
required

The same search on Google, to see it there.

string | null
results
required
Array<object>
object
type
required
string
Allowed values: organic paid featured_snippet
position
required

Its place among results of its type.

integer
>= -9007199254740991 <= 9007199254740991
domain
required
string
title
required
string
url
required
string
description
required
string | null
own
required

It’s one of the workspace’s live sites.

boolean
ownPosition
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
cost
required

What this lookup cost from the DataForSEO balance, in US dollars: 0 when it was kept from the last day.

number
checkedAt
required

When DataForSEO answered it.

string format: date-time
cached
required

It’s what the same lookup found before.

boolean

Example

{
"results": [
{
"type": "organic"
}
]
}

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"
}
}

A request with the same Idempotency-Key is still running (conflict).

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 Idempotency-Key was used with a different request.

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"
}
}