HELP CENTER

Using filters in DataForSEO APIs

With DataForSEO APIs, you can get very specific in your research, competitor analysis, and market study. By using the filters available for our APIs, you will always get the most relevant data in the response, which will enable you to reduce the number of requests and save your budget accordingly.

You can use filters when making a request to the following APIs:

DataForSEO Labs API
OnPage API
Backlinks API
Content Analysis API

You can set a maximum of eight filters in a single API request.

Filters are associated with certain parameters from the API response. Each endpoint provides different data, and thus the filter structure and values differ depending on the endpoint.

Generally the structure of the filter includes three parts that are separated with a , symbol:

  • filtered parameter – target parameter of the endpoint you want to filter;
  • filter operator – operator of the filter;
  • filter value – filtering value.

You can find the exact filter structure in the description of each DataForSEO API below.

In addition, filters support different data types. If you look at the list of supported filters, you will find the supported data type after the colon in each filter.
For example, "keyword_info.search_volume": "num" where num is the supported data type.

Each data type, in turn, supports different filter operators.
For example, for the ["domain_rank": "num"] we can use these operators <, <=, >, >=, =, <>, in, not_in.

How to use operators?

1When you use the in or not_in operator, the filter value should be specified as an array.
Example:
["keyword_info.search_volume","in",[10,1000]]

2The like and not_like operators require adding the % symbol to get accurate results.
Example:
The ["keyword_data.keyword", "like", "%seo%"] filter returns keyword_data items that contain “seo” anywhere in the keyword string and the ["keyword_data.keyword", "not_like", "%seo%"] filter returns keyword_data items that don’t contain “seo” anywhere in the keyword string.

3As for the has and has_not operators, they can be used only for array.str and array.num.
For example, the serp_item_types parameter in the Keyword Suggestions endpoint is the array of strings that displays SERP features available for the specified keyword (featured_snippet, answer_box, knowledge_graph, and others).

By applying a filter with the has or has_not operator to this parameter, you can receive the keywords for which a certain element is present or not present in SERP.
Example:
["serp_info.serp_item_types", "has", "featured_snippet"]

In this case, the API response will return only the keywords that have featured snippets in SERP.
And after the filter operator comes the filtering value, which may take the form of a string, array string, number, or boolean.

To not get confused with filter structure, we recommend calling the Available Filters endpoint and checking the examples.

Using Regex Operator

The regex operator is supported by the DataForSEO Labs and OnPage APIs and works only with string values.

. – Matches any character. For example:
ab. # matches ‘aba’, ‘abb’, ‘abz’, etc.
? – Repeat the preceding character zero or one times. Often used to make the preceding character optional. For example:
abc? # matches ‘ab’ and ‘abc’
+ – Repeat the preceding character one or more times. For example:
ab+ # matches ‘ab’, ‘abb’, ‘abbb’, etc.
* – Repeat the preceding character zero or more times. For example:
ab* # matches ‘a’, ‘ab’, ‘abb’, ‘abbb’, etc.
{} – Minimum and maximum number of times the preceding character can repeat. For example:
a{2} # matches ‘aa’
a{2,4} # matches ‘aa’, ‘aaa’, and ‘aaaa’
a{2,} # matches ‘a` repeated two or more times
| – OR operator. The match will succeed if the longest pattern on either the left side OR the right side matches. For example:
abc|xyz # matches ‘abc’ and ‘xyz’
( … ) – Forms a group. You can use a group to treat part of the expression as a single character. For example:
abc(def)? # matches ‘abc’ and ‘abcdef’ but not ‘abcd’
[ … ] – Match one of the characters in the brackets. For example:
[abc] # matches ‘a’, ‘b’, ‘c’
Inside the brackets, - indicates a range unless – is the first character or escaped. For example:
[a-c] # matches ‘a’, ‘b’, or ‘c’
[-abc] # ‘-‘ is first character. Matches ‘-‘, ‘a’, ‘b’, or ‘c’
[abc\-] # Escapes ‘-‘. Matches ‘a’, ‘b’, ‘c’, or ‘-‘
A ^ before a character in the brackets negates the character or range. For example:
[^abc] # matches any character except ‘a’, ‘b’, or ‘c’
[^a-c] # matches any character except ‘a’, ‘b’, or ‘c’
[^-abc] # matches any character except ‘-‘, ‘a’, ‘b’, or ‘c’
[^abc\-] # matches any character except ‘a’, ‘b’, ‘c’, or ‘-‘

Example:
Return string that contains keywords: ["keyword_data.keyword", "regex", "[0-9]"]
Return string that does not contain keywords: ["keyword_data.keyword", "regex", "^([^0-9]+)$"]

You can test parameters with regex operator via this link.

DataForSEO Labs API

You can get the full list of filters available for all DataForSEO Labs endpoints by calling the following endpoint:

GET https://api.dataforseo.com/v3/dataforseo_labs/available_filters

DataForSEO Labs API filters have the following structure:

[$item_array.$results_array.$parameter_field, $filter_operator, $filter_value]

. and , symbols are used as separators.

Example:
["keyword_data.impressions_info.daily_impressions_max", "=", 56] where keyword_data is the $item_array, impressions_info is the $results_array, daily_impressions_max is the $parameter_field, = is the $filter_operator, and 56 is the $filter_value.

DataForSEO Labs API $item_array and $results_array can be omitted depending on the endpoint.

Example:
The [”depth”, “>”, 500] filter in the Related Keywords endpoint.

In this case, depth is both $item_array and $parameter_field.

Page Intersection, Ranked Keywords, Subdomains, Relevant Pages, Competitors Domain, Categories For Domain, Domain Intersection endpoints also support an alternative structure:

[$item_array.$results_array.$parameter_field, $filter_operator, $item->$item_array.$results_array.$parameter_field]

If you use this structure, you need to attach $item-> to the right part of the condition.

Note: the $parameter_field variables in the right part and in the left part of the condition should have identical type: bool, num, str, time.
Example:
["metrics.organic.pos_1", ">", "$item->metrics.organic.pos_2_3"]

DataForSEO Labs API supports the following types and operators:

  • bool supports =, and <>;
  • num supports <, <=, >, >=, =, <>, in, and not_in;
  • str supports regex, like, not_like, in, not_in, =, and <>;
  • array.str supports has, and has_not;
  • array.num supports has, and has_not;
  • time supports < , > (time should be specified in the “yyyy-mm-dd hh-mm-ss +00:00” format. Example: 2021-01-29 15:02:37 +00:00)

For example, for the ["keyword_info.search_volume": "num"] filter, we can use one of the following operators: <, <=, >, >=, =, <>, in, not_in.

Example request:
Suppose you’re performing keyword research and want to find keyword suggestions for the buy lava lamp keyword. Your site is new, so you know that high search volume keywords aren’t for you — you want to focus on less popular terms instead. To find them, all you have to do is send a request to the Keyword Suggestions endpoint with the following filter: "keyword_info.search_volume": "num".

Let’s find search terms with a search volume of less than 500.

The filter will be structured as in the following example:

["keyword_info.search_volume", "<", 500]

Your POST request should be structured as in the example below:

[
    {
    	"keyword": "buy lava lamp",
        "language_name": "English",
        "location_code": 2840,
        "filters": [
	        ["keyword_info.search_volume", "<", 500]
	    ],
        "limit": 10
    }
]

 

In the API response, you will receive keyword suggestions with current search volumes of less than 500.

{
    "version": "0.1.20220216",
    "status_code": 20000,
    "status_message": "Ok.",
    "time": "1.2705 sec.",
    "cost": 0.011,
    "tasks_count": 1,
    "tasks_error": 0,
    "tasks": [
        {
            "id": "03211218-2806-0399-0000-23f54f988271",
            "status_code": 20000,
            "status_message": "Ok.",
            "time": "1.2158 sec.",
            "cost": 0.011,
            "result_count": 1,
            "path": [
                "v3",
                "dataforseo_labs",
                "google",
                "keyword_suggestions",
                "live"
            ],
            "data": {
                "api": "dataforseo_labs",
                "function": "keyword_suggestions",
                "se_type": "google",
                "keyword": "buy lava lamp",
                "language_name": "English",
                "location_code": 2840,
                "filters": [
                    [
                        "keyword_info.search_volume",
                        "<",
                        500
                    ]
                ],
                "limit": 10
            },
            "result": [
                {
                    "se_type": "google",
                    "seed_keyword": "buy lava lamp",
                    "seed_keyword_data": null,
                    "location_code": 2840,
                    "language_code": "en",
                    "total_count": 33,
                    "items_count": 10,
                    "offset": 0,
                    "offset_token": "eyJDdXJyZW50T2Zmc2V0IjoxMCwiUmVxdWVzdERhdGEiOnsia2V5d29yZCI6ImJ1eSBsYXZhIGxhbXAiLCJpbmNsdWRlX3NlZWRfa2V5d29yZCI6ZmFsc2UsImZ1bGxfbWF0Y2giOmZhbHNlLCJsb2FkX3NlcnBfaW5mbyI6ZmFsc2UsInNlYXJjaF9hZnRlcl90b2tlbiI6bnVsbCwibGFuZ3VhZ2UiOiJlbiIsInNlYXJjaF9lbmdpbmUiOiJnb29nbGUiLCJsb2NhdGlvbiI6Mjg0MCwib3JkZXJfYnkiOnsib3JkZXJfZmllbGQiOiJrZXl3b3JkX2luZm8uc2VhcmNoX3ZvbHVtZSIsIm9yZGVyX3R5cGUiOiJEZXNjIiwibmV4dCI6bnVsbH0sImxpbWl0IjoxMCwib2Zmc2V0IjowLCJUb2tlbiI6eyJJc0NhbmNlbGxhdGlvblJlcXVlc3RlZCI6ZmFsc2UsIkNhbkJlQ2FuY2VsZWQiOnRydWUsIldhaXRIYW5kbGUiOnsiSGFuZGxlIjp7InZhbHVlIjoyODY4fSwiU2FmZVdhaXRIYW5kbGUiOnsiSXNJbnZhbGlkIjpmYWxzZSwiSXNDbG9zZWQiOmZhbHNlfX19fSwiUmF3UXVlcnkiOnsiZmllbGQiOiJrZXl3b3JkX2luZm8uc2VhcmNoX3ZvbHVtZSIsInR5cGUiOiJsdCIsInZhbHVlIjo1MDB9LCJTZWFyY2hBZnRlckRhdGEiOls0MCwiNjNmOWY4ZTQtYmYxMi0wNTBmLTA5NDUtZjA2ZTdjN2RmMTgyIl19",
                    "items": [
                        {
                            "se_type": "google",
                            "keyword": "lava lamp buy",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-04 01:54:48 +00:00",
                                "competition": 1,
                                "cpc": 0.404441,
                                "search_volume": 320,
                                "categories": [
                                    10009,
                                    10010,
                                    10081,
                                    10419,
                                    11587,
                                    11588,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 880
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 480
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 2,
                                        "search_volume": 260
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": "buy lava lamp",
                                "keyword_difficulty": 49
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-13 08:19:19 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 17.21,
                                "cpc_max": 21.03,
                                "cpc_average": 19.12,
                                "daily_impressions_min": 0.36,
                                "daily_impressions_max": 0.44,
                                "daily_impressions_average": 0.4,
                                "daily_clicks_min": 0.04,
                                "daily_clicks_max": 0.05,
                                "daily_clicks_average": 0.04,
                                "daily_cost_min": 0.73,
                                "daily_cost_max": 0.89,
                                "daily_cost_average": 0.81
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "buy lava lamp",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-11 04:39:55 +00:00",
                                "competition": 1,
                                "cpc": 0.404441,
                                "search_volume": 320,
                                "categories": [
                                    10009,
                                    10010,
                                    10081,
                                    10419,
                                    11587,
                                    11588,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 880
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 480
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 2,
                                        "search_volume": 260
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": null,
                                "keyword_difficulty": 52
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-16 07:33:25 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 48,
                                "cpc_max": 58.67,
                                "cpc_average": 53.34,
                                "daily_impressions_min": 1.34,
                                "daily_impressions_max": 1.63,
                                "daily_impressions_average": 1.48,
                                "daily_clicks_min": 0.16,
                                "daily_clicks_max": 0.19,
                                "daily_clicks_average": 0.17,
                                "daily_cost_min": 8.36,
                                "daily_cost_max": 10.22,
                                "daily_cost_average": 9.29
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "lava lamp where to buy",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-13 08:44:03 +00:00",
                                "competition": 1,
                                "cpc": 0.404441,
                                "search_volume": 320,
                                "categories": [
                                    10009,
                                    10010,
                                    10081,
                                    10419,
                                    11587,
                                    11588,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 880
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 480
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 2,
                                        "search_volume": 260
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": "buy lava lamp",
                                "keyword_difficulty": 52
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-17 08:19:54 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 47.05,
                                "cpc_max": 57.5,
                                "cpc_average": 52.27,
                                "daily_impressions_min": null,
                                "daily_impressions_max": null,
                                "daily_impressions_average": null,
                                "daily_clicks_min": null,
                                "daily_clicks_max": null,
                                "daily_clicks_average": null,
                                "daily_cost_min": null,
                                "daily_cost_max": null,
                                "daily_cost_average": null
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "where to buy a lava lamp",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-19 12:43:13 +00:00",
                                "competition": 1,
                                "cpc": 0.358656,
                                "search_volume": 320,
                                "categories": [
                                    10009,
                                    10010,
                                    10081,
                                    10419,
                                    11587,
                                    11588,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 2,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 390
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 1300
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 590
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 170
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": "where to buy lava lamp",
                                "keyword_difficulty": 52
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-09 09:38:04 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 15.75,
                                "cpc_max": 19.25,
                                "cpc_average": 17.5,
                                "daily_impressions_min": 0.38,
                                "daily_impressions_max": 0.46,
                                "daily_impressions_average": 0.42,
                                "daily_clicks_min": 0.02,
                                "daily_clicks_max": 0.02,
                                "daily_clicks_average": 0.02,
                                "daily_cost_min": 0.34,
                                "daily_cost_max": 0.42,
                                "daily_cost_average": 0.38
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "where to buy lava lamp",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-14 09:40:38 +00:00",
                                "competition": 1,
                                "cpc": 0.329418,
                                "search_volume": 320,
                                "categories": [
                                    10009,
                                    10010,
                                    10081,
                                    10419,
                                    11587,
                                    11588,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 390
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 1300
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 590
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 2,
                                        "search_volume": 210
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": "where to buy a lava lamp",
                                "keyword_difficulty": 52
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-18 00:25:19 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 19.76,
                                "cpc_max": 24.15,
                                "cpc_average": 21.95,
                                "daily_impressions_min": null,
                                "daily_impressions_max": null,
                                "daily_impressions_average": null,
                                "daily_clicks_min": null,
                                "daily_clicks_max": null,
                                "daily_clicks_average": null,
                                "daily_cost_min": null,
                                "daily_cost_max": null,
                                "daily_cost_average": null
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "where can i buy a lava lamp",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-17 07:23:19 +00:00",
                                "competition": 1,
                                "cpc": 0.390699,
                                "search_volume": 260,
                                "categories": [
                                    10009,
                                    10405,
                                    10419,
                                    11587,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 2,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 880
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 110
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 170
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": null,
                                "keyword_difficulty": 52
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-20 08:13:18 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 31.64,
                                "cpc_max": 38.67,
                                "cpc_average": 35.16,
                                "daily_impressions_min": 4.45,
                                "daily_impressions_max": 5.44,
                                "daily_impressions_average": 4.94,
                                "daily_clicks_min": 0.59,
                                "daily_clicks_max": 0.72,
                                "daily_clicks_average": 0.66,
                                "daily_cost_min": 20.73,
                                "daily_cost_max": 25.34,
                                "daily_cost_average": 23.03
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "where can i buy lava lamp",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-10 20:22:33 +00:00",
                                "competition": 1,
                                "cpc": 0.444673,
                                "search_volume": 260,
                                "categories": [
                                    10005,
                                    10011,
                                    10089,
                                    11772
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 260
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 880
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 110
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 140
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 170
                                    },
                                    {
                                        "year": 2021,
                                        "month": 2,
                                        "search_volume": 170
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": null,
                                "keyword_difficulty": 50
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-16 02:33:46 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": null,
                                "ad_position_max": null,
                                "ad_position_average": null,
                                "cpc_min": null,
                                "cpc_max": null,
                                "cpc_average": null,
                                "daily_impressions_min": null,
                                "daily_impressions_max": null,
                                "daily_impressions_average": null,
                                "daily_clicks_min": null,
                                "daily_clicks_max": null,
                                "daily_clicks_average": null,
                                "daily_cost_min": null,
                                "daily_cost_max": null,
                                "daily_cost_average": null
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "best buy lava lamp",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-18 01:21:28 +00:00",
                                "competition": 1,
                                "cpc": 0.268335,
                                "search_volume": 70,
                                "categories": [
                                    10009,
                                    10010,
                                    10081,
                                    10419,
                                    11587,
                                    11588,
                                    12820
                                ],
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 2,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 90
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 320
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 70
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 50
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 50
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 20
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": null,
                                "keyword_difficulty": 47
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-20 19:41:48 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": 1.11,
                                "ad_position_max": 1,
                                "ad_position_average": 1.06,
                                "cpc_min": 8.23,
                                "cpc_max": 10.06,
                                "cpc_average": 9.14,
                                "daily_impressions_min": null,
                                "daily_impressions_max": null,
                                "daily_impressions_average": null,
                                "daily_clicks_min": null,
                                "daily_clicks_max": null,
                                "daily_clicks_average": null,
                                "daily_cost_min": null,
                                "daily_cost_max": null,
                                "daily_cost_average": null
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "where to buy lava lamp near me",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-02 10:28:46 +00:00",
                                "competition": 1,
                                "cpc": 0.255234,
                                "search_volume": 50,
                                "categories": null,
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 50
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 210
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 70
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 20
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 20
                                    },
                                    {
                                        "year": 2021,
                                        "month": 2,
                                        "search_volume": 30
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": null,
                                "keyword_difficulty": 53
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-09 22:34:34 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": null,
                                "ad_position_max": null,
                                "ad_position_average": null,
                                "cpc_min": null,
                                "cpc_max": null,
                                "cpc_average": null,
                                "daily_impressions_min": null,
                                "daily_impressions_max": null,
                                "daily_impressions_average": null,
                                "daily_clicks_min": null,
                                "daily_clicks_max": null,
                                "daily_clicks_average": null,
                                "daily_cost_min": null,
                                "daily_cost_max": null,
                                "daily_cost_average": null
                            },
                            "serp_info": null
                        },
                        {
                            "se_type": "google",
                            "keyword": "what is the biggest lava lamp you can buy",
                            "location_code": 2840,
                            "language_code": "en",
                            "keyword_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-03-21 04:44:35 +00:00",
                                "competition": 1,
                                "cpc": 0.524548,
                                "search_volume": 40,
                                "categories": null,
                                "monthly_searches": [
                                    {
                                        "year": 2022,
                                        "month": 2,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2022,
                                        "month": 1,
                                        "search_volume": 50
                                    },
                                    {
                                        "year": 2021,
                                        "month": 12,
                                        "search_volume": 70
                                    },
                                    {
                                        "year": 2021,
                                        "month": 11,
                                        "search_volume": 50
                                    },
                                    {
                                        "year": 2021,
                                        "month": 10,
                                        "search_volume": 20
                                    },
                                    {
                                        "year": 2021,
                                        "month": 9,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 8,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 7,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 6,
                                        "search_volume": 30
                                    },
                                    {
                                        "year": 2021,
                                        "month": 5,
                                        "search_volume": 40
                                    },
                                    {
                                        "year": 2021,
                                        "month": 4,
                                        "search_volume": 50
                                    },
                                    {
                                        "year": 2021,
                                        "month": 3,
                                        "search_volume": 50
                                    }
                                ]
                            },
                            "keyword_properties": {
                                "se_type": "google",
                                "core_keyword": null,
                                "keyword_difficulty": 44
                            },
                            "impressions_info": {
                                "se_type": "google",
                                "last_updated_time": "2022-02-09 04:20:07 +00:00",
                                "bid": 999,
                                "match_type": "exact",
                                "ad_position_min": null,
                                "ad_position_max": null,
                                "ad_position_average": null,
                                "cpc_min": null,
                                "cpc_max": null,
                                "cpc_average": null,
                                "daily_impressions_min": null,
                                "daily_impressions_max": null,
                                "daily_impressions_average": null,
                                "daily_clicks_min": null,
                                "daily_clicks_max": null,
                                "daily_clicks_average": null,
                                "daily_cost_min": null,
                                "daily_cost_max": null,
                                "daily_cost_average": null
                            },
                            "serp_info": null
                        }
                    ]
                }
            ]
        }
    ]
}

 

OnPage API

You can get the full list of filters available for OnPage endpoints by calling the following endpoint:

GET https://api.dataforseo.com/v3/on_page/available_filters

DataForSEO OnPage API filters have the following structure:

[$item_array.$parameter_field, $filter_operator, $filter_value]

. and , symbols are used as separators.

Example:
["fetch_timing.duration_time",">",1] where fetch_timing is the $item_array, duration_time is the $parameter_field, > is the $filter_operator, and 1 is the $filter_value.

DataForSEO OnPage API supports the following types and operators:

    • bool supports =, and <>;
    • num supports <, <=, >, >=, =, <>, in, and not_in;
    • str supports regex, like, not_like, in, not_in, =, and <>;
    • array.str supports has, and has_not.

For example, for the ["resource_type": "str"] filter, we can use one of the following operators: regex, like, not_like, in, not_in, =, <>.

Example request:
If you have a website you might want to establish clear paths for your site visitors and create a smooth user experience. This can be done by minimizing the click depth across a website.
Firstly set a task to On-Page API and specify the necessary target site. Then configure your request to the Pages endpoint with the following filter:

[
  {
    "id": "07281559-0695-0216-0000-c269be8b7592",
    "filters": [
      ["resource_type", "=", "html"],
      "and",
      ["click_depth", ">", 4]
    ]
  }
]

 

The response from the API server will contain a list of pages located further than within 4 clicks from the homepage. You will also get detailed performance metrics, including meta tags checks, page timing, and over 60 other check-ups for each listed page.

Backlinks API

You can get the full list of filters available for Backlinks endpoints by calling the following endpoint:

GET https://api.dataforseo.com/v3/backlinks/available_filters

DataForSEO Backlinks API filters have the following structure:

[filered_field, filter_operator, filter_value]

. and , symbols are used as separators.

Example:
["domain_from","=", "forbes.com"] where domain_from is the filered_field, = is the filter_operator, and forbes.com is the filter_value.

DataForSEO Backlinks API supports the following data types and operators:

    • num: <, <=, >, >=, =, <>, in, not_in
    • str: like, not_like, ilike, not_ilike, =, <>
    • array.str: has, has_not
    • array.num: has, has_not
    • time: <, > (Example: 2021-01-29 15:02:37 +00:00)

For example, for the ["main_domain": "str"] filter, we can use one of the following operators: <, <=, >, >=, =, <>, in, not_in.

Note: in Domain Intersection and Page Intersection endpoints the $key parameter refers to the variable denoting the sequence number of the page indicated in the targets array of the POST request;
For example, if you specify the pages in the POST request as follows:

"targets":[
"https://football.com/news",
"https://fifa.com/updates",
"https://uefa.com/updates"]

The specified pages will be assigned with sequence numbers and the filter by the “https://fifa.com/updates” page will be assigned with a “2” and the filter will look as follows:
"filters": ["2.domain_from","=","news24.com"]

Note #2: in Backlinks Anchors, Domain Pages, and Domain Intersection endpoints you may come across empty-titled fields in the referring_links_semantic_locations array, which, however, are also available in filters. These empty fields are denoted as $empty and have the num type.
Example:
referring_links_semantic_locations.$empty

Note #3: the ilike and not_ilike operators represent the case-insesntive alternative to the like and not_like operators accordingly.
Example:
"filters": ["page_from_title", "ilike", "%health%"]

Note #4: in the following endpoints, you can filter the results by any top-level domain (TLD) from the referring_links_tld object of the response, but the structure of the filtered field is different:

• in Backlinks Anchors, Referring Domains, Referring Networks, and Domain Pages Summary endpoints, use referring_links_tld.$tld;
• in the Domain Pages endpoint, use page_summary.referring_links_tld.$tld;
• in the Domain Intersection endpoint, use $key.referring_links_tld.$tld.

In all cases, replace the $tld variable with the necessary TLD returned in the referring_links_tld object of the endpoint’s response. Example filter:
"filters": ["1.referring_links_tld.com",">",0]

Example request:
Let’s imagine you want to improve your page’s organic search engine rankings. One of the ways to do that is to increase the number of backlinks. To check how many websites are referring to your page make a request to Backlinks endpoint using ["dofollow", "=", true] filter. If you want to filter out domains with high ratings add the following structure:

POST https://api.dataforseo.com/v3/backlinks/backlinks/live

[
    {
        "target": "forbes.com",
        "mode": "as_is",
        "filters": [
            [
                "page_from_rank",
                ">",
                "55"
            ],
            "and",
            [
                "dofollow",
                "=",
                true
            ],
            "and",
            [
                "page_from_title",
                "ilike",
                "%seo%"
            ]
        ],
        "limit": 5
    }
]

 

Example response:

{
  "version": "0.1.20231117",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "1.6060 sec.",
  "cost": 0.02015,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01111709-1535-0269-0000-b21c90c1eba4",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "1.5542 sec.",
      "cost": 0.02015,
      "result_count": 1,
      "path": [
        "v3",
        "backlinks",
        "backlinks",
        "live"
      ],
      "data": {
        "api": "backlinks",
        "function": "backlinks",
        "target": "forbes.com",
        "mode": "as_is",
        "filters": [
          [
            "page_from_rank",
            ">",
            "55"
          ],
          "and",
          [
            "dofollow",
            "=",
            true
          ],
          "and",
          [
            "page_from_title",
            "ilike",
            "%seo%"
          ]
        ],
        "limit": 5
      },
      "result": [
        {
          "target": "forbes.com",
          "mode": "as_is",
          "custom_mode": null,
          "total_count": 5974,
          "items_count": 5,
          "items": [
            {
              "type": "backlink",
              "domain_from": "www.overthetopseo.com",
              "url_from": "https://www.overthetopseo.com/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/jiawertz/2020/02/17/how-seo-strategy-needs-adapt-developments-2020/",
              "url_to_https": true,
              "tld_from": "com",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 658,
              "page_from_rank": 791,
              "domain_from_rank": 595,
              "domain_from_platform_type": [
                "cms",
                "blogs",
                "organization"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "51.161.102.148",
              "domain_from_country": "US",
              "page_from_external_links": 12,
              "page_from_internal_links": 136,
              "page_from_size": 414969,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Dominate SERPs with OTT SEO Services - Trusted SEO Company",
              "page_from_status_code": 200,
              "first_seen": "2023-10-24 18:09:35 +00:00",
              "prev_seen": "2023-10-24 18:09:35 +00:00",
              "last_seen": "2023-11-11 19:33:03 +00:00",
              "item_type": "anchor",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": null,
              "image_url": null,
              "anchor": "Forbes",
              "text_pre": null,
              "text_post": "How Your SEO Strategy Needs To Adapt For Developments In 2022",
              "semantic_location": "section",
              "links_count": 2,
              "group_count": 0,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null,
              "ranked_keywords_info": {
                "page_from_keywords_count_top_3": 1,
                "page_from_keywords_count_top_10": 3,
                "page_from_keywords_count_top_100": 203
              },
              "is_indirect_link": false,
              "indirect_link_path": null
            },
            {
              "type": "backlink",
              "domain_from": "breezemaxweb.com",
              "url_from": "https://breezemaxweb.com/",
              "url_from_https": true,
              "domain_to": "profiles.forbes.com",
              "url_to": "https://profiles.forbes.com/members/bizdev/profile/Andrew-Faridani-President-CEO-BreezeMaxWeb/e9888695-8c26-4e4d-8ddf-fc60fa969186",
              "url_to_https": true,
              "tld_from": "com",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 470,
              "page_from_rank": 595,
              "domain_from_rank": 444,
              "domain_from_platform_type": [
                "unknown"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "188.114.96.3",
              "domain_from_country": null,
              "page_from_external_links": 6,
              "page_from_internal_links": 89,
              "page_from_size": 138842,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "BreezeMaxWeb | Creative Digital Agency | SEO Agency Canada",
              "page_from_status_code": 200,
              "first_seen": "2022-12-23 08:49:09 +00:00",
              "prev_seen": "2023-10-28 09:37:21 +00:00",
              "last_seen": "2023-12-13 11:52:01 +00:00",
              "item_type": "image",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": "Forbes Logo",
              "image_url": "https://breezemaxweb.com/images/2019/11/forbes-logo.png",
              "anchor": null,
              "text_pre": "Marketing Pharmacy Marketing Plumber Advertising Psychotherapists/Psychologists Marketing Real Estate Marketing Restaurant Marketing Staffing Solutions Marketing Vape Marketing Veterinarian Marketing",
              "text_post": null,
              "semantic_location": null,
              "links_count": 1,
              "group_count": 0,
              "is_broken": false,
              "url_to_status_code": 301,
              "url_to_spam_score": 0,
              "url_to_redirect_target": "https://councils.forbes.com/profile/Andrew-Faridani-President-CEO-BreezeMaxWeb/e9888695-8c26-4e4d-8ddf-fc60fa969186",
              "ranked_keywords_info": {
                "page_from_keywords_count_top_3": 4,
                "page_from_keywords_count_top_10": 4,
                "page_from_keywords_count_top_100": 30
              },
              "is_indirect_link": false,
              "indirect_link_path": null
            },
            {
              "type": "backlink",
              "domain_from": "indexsy.com",
              "url_from": "https://indexsy.com/seo-reseller/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/brianrashid/2017/04/11/how-this-25-year-old-hustled-his-way-to-success/",
              "url_to_https": true,
              "tld_from": "com",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 448,
              "page_from_rank": 599,
              "domain_from_rank": 474,
              "domain_from_platform_type": [
                "cms",
                "blogs"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "194.1.147.26",
              "domain_from_country": "WW",
              "page_from_external_links": 13,
              "page_from_internal_links": 40,
              "page_from_size": 181646,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Looking for an SEO Reseller or White Label (Outsourcing) SEO Provider?",
              "page_from_status_code": 200,
              "first_seen": "2022-04-14 21:33:50 +00:00",
              "prev_seen": "2022-12-05 13:03:14 +00:00",
              "last_seen": "2022-12-15 13:10:43 +00:00",
              "item_type": "anchor",
              "attributes": [
                "noreferrer",
                "noopener"
              ],
              "dofollow": true,
              "original": false,
              "alt": null,
              "image_url": null,
              "anchor": "Forbes",
              "text_pre": "marketer. He is the founder of Indexsy, Far & Away, Laurel & Wolf, a couple FBA businesses , and about 40 affiliate sites. He is a proud native of Vancouver, BC, who has been featured on Entrepreneur.com,",
              "text_post": ", Oberlo and GoDaddy.",
              "semantic_location": "section",
              "links_count": 1,
              "group_count": 0,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null,
              "ranked_keywords_info": {
                "page_from_keywords_count_top_3": 0,
                "page_from_keywords_count_top_10": 0,
                "page_from_keywords_count_top_100": 0
              },
              "is_indirect_link": false,
              "indirect_link_path": null
            },
            {
              "type": "backlink",
              "domain_from": "utahseopros.com",
              "url_from": "https://utahseopros.com/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/brentgleeson/2016/11/09/10-unique-perspectives-on-what-makes-a-great-leader/",
              "url_to_https": true,
              "tld_from": "com",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 445,
              "page_from_rank": 585,
              "domain_from_rank": 430,
              "domain_from_platform_type": [
                "unknown"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "34.122.21.204",
              "domain_from_country": null,
              "page_from_external_links": 9,
              "page_from_internal_links": 34,
              "page_from_size": 289554,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Utah SEO Services - Utah SEO Company - Salt Lake City Utah SEO Pros",
              "page_from_status_code": 200,
              "first_seen": "2019-01-22 20:42:44 +00:00",
              "prev_seen": "2023-11-11 20:16:36 +00:00",
              "last_seen": "2024-01-11 00:01:48 +00:00",
              "item_type": "image",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": "Forbes_logo.740x200",
              "image_url": "https://newseoprossite.wpenginepowered.com/wp-content/uploads/freshizer/202aea6ae98fd31417651fd54dcae2ed_Forbes_logo.740x200-0-100-c-90.jpg",
              "anchor": null,
              "text_pre": null,
              "text_post": null,
              "semantic_location": "section",
              "links_count": 1,
              "group_count": 0,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null,
              "ranked_keywords_info": {
                "page_from_keywords_count_top_3": 22,
                "page_from_keywords_count_top_10": 26,
                "page_from_keywords_count_top_100": 60
              },
              "is_indirect_link": false,
              "indirect_link_path": null
            },
            {
              "type": "backlink",
              "domain_from": "kcwebdesigner.com",
              "url_from": "https://kcwebdesigner.com/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/johnrampton/2017/05/16/7-essential-seo-books-for-every-startup-to-read-in-2017/",
              "url_to_https": true,
              "tld_from": "com",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 377,
              "page_from_rank": 560,
              "domain_from_rank": 409,
              "domain_from_platform_type": [
                "cms",
                "blogs"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "192.124.249.107",
              "domain_from_country": "US",
              "page_from_external_links": 19,
              "page_from_internal_links": 37,
              "page_from_size": 104685,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Kansas City Web Design & SEO | Local Website Designers & Developers",
              "page_from_status_code": 200,
              "first_seen": "2022-05-31 15:52:34 +00:00",
              "prev_seen": "2023-01-10 06:19:14 +00:00",
              "last_seen": "2023-03-11 12:43:03 +00:00",
              "item_type": "image",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": null,
              "image_url": "https://kcwebdesigner.com/wp-content/uploads/2017/05/forbes-logo-1.png",
              "anchor": null,
              "text_pre": null,
              "text_post": null,
              "semantic_location": "section",
              "links_count": 1,
              "group_count": 0,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null,
              "ranked_keywords_info": {
                "page_from_keywords_count_top_3": 0,
                "page_from_keywords_count_top_10": 0,
                "page_from_keywords_count_top_100": 0
              },
              "is_indirect_link": false,
              "indirect_link_path": null
            }
          ],
          "search_after_token": "eyJDdXJyZW50T2Zmc2V0IjowLCJSYXdSZXF1ZXN0Ijp7InRhcmdldCI6ImZvcmJlcy5jb20iLCJxdWVyeSI6eyJ0eXBlIjoiYW5kIiwibGVmdCI6eyJmaWVsZCI6InBhZ2VfZnJvbV9yYW5rIiwidHlwZSI6Imd0IiwidmFsdWUiOjU1fSwicmlnaHQiOnsidHlwZSI6ImFuZCIsImxlZnQiOnsiZmllbGQiOiJkb2ZvbGxvdyIsInR5cGUiOiJlcSIsInZhbHVlIjp0cnVlfSwicmlnaHQiOnsiZmllbGQiOiJwYWdlX2Zyb21fdGl0bGUiLCJ0eXBlIjoiaWxpa2UiLCJ2YWx1ZSI6IiVzZW8lIn19fSwibGltaXQiOjUsImJhY2tsaW5rc19zdGF0dXNfdHlwZSI6ImxpdmUiLCJpbmNsdWRlX3N1YmRvbWFpbnMiOnRydWUsIm1vZGUiOiJhc19pcyIsImFpZCI6MTUzNX0sIlNlYXJjaEFmdGVyRGF0YSI6eyJWZXJzaW9uIjoxLCJTZWFyY2hBZnRlclZhbHVlcyI6eyJyYW5rIjozNzcsImxhc3Rfc2VlbiI6IjIwMjMtMDMtMTFUMTI6NDM6MDMrMDA6MDAifSwiVG9rZW5SZWFsT2Zmc2V0Ijo1fX0="
        }
      ]
    }
  ]
}

 

Content Analysis API

You can get the full list of filters available for Content Analysis endpoints by calling the following endpoint:

GET https://api.dataforseo.com/v3/content_analysis/available_filters

DataForSEO Content Analysis API filters have the following structure:

[filered_field, filter_operator, filter_value]

. and , symbols are used as separators.

Example:
["domain_rank",">", "800"] where domain_rank is the filered_field, > is the filter_operator, and 800 is the filter_value.

DataForSEO Content Analysis API supports the following data types and operators:

    • num: <, <=, >, >=, =, <>, in, not_in
    • str: like, not_like, =, <>
    • array.str: has, has_not
    • array.num: has, has_not
    • time: <, > (Example: 2021-01-29 15:02:37 +00:00)

For example, for the ["page_types": "array.str"] filter, we can use one of the following operators: has, has_not.

Note: some filtered_fields have the following structure: "content_info.$parameter_field" or "content_info.$results_array.$parameter_field"
Examples:
"domain_rank"
"content_info.title"
"content_info.sentiment_connotations.fun"

Example request:
Suppose you’re doing a keyword research. By calling a Search endpoint you can get a detailed citation data, which displays where the specified keyword is used and its sentiment polarity. For example, to see which pages in the US mentions the keyword use the following filter:

["country", "=", "US"]

[
   {
       "keyword": "logitech",
       "filters": [
           "country",
           "=",
           "US"
       ],
       "order_by": [
           "content_info.sentiment_connotations.anger,desc"
       ],
       "limit": 5
   }
]

The results will contain the snippet of the mention’s text, text category, the URL where the mention was found, domain and URL rank, country, content quality score, sentiment polarity scores, and scored sentiment connotations (anger, happiness, love, sadness, share, fun).

{
    "version": "0.1.20220819",
    "status_code": 20000,
    "status_message": "Ok.",
    "time": "3.8156 sec.",
    "cost": 0.02015,
    "tasks_count": 1,
    "tasks_error": 0,
    "tasks": [
        {
            "id": "12071626-1535-0463-0000-e05969663d47",
            "status_code": 20000,
            "status_message": "Ok.",
            "time": "3.7991 sec.",
            "cost": 0.02015,
            "result_count": 1,
            "path": [
                "v3",
                "content_analysis",
                "search",
                "live"
            ],
            "data": {
                "api": "content_analysis",
                "function": "search",
                "keyword": "logitech",
                "filters": [
                    "country",
                    "=",
                    "US"
                ],
                "order_by": [
                    "content_info.sentiment_connotations.anger,desc"
                ],
                "limit": 5
            },
            "result": [
                {
                    "offset_token": "eyJDdXJyZW50T2Zmc2V0Ijo1LCJSYXdSZXF1ZXN0Ijp7ImtleXdvcmQiOiJsb2dpdGVjaCIsInF1ZXJ5Ijp7ImZpZWxkIjoiY291bnRyeSIsInR5cGUiOiJlcSIsInZhbHVlIjoiVVMifSwib3JkZXJfYnkiOnsib3JkZXJfZmllbGQiOiJjb250ZW50X2luZm8uc2VudGltZW50X2Nvbm5vdGF0aW9ucy5hbmdlciIsIm9yZGVyX3R5cGUiOiJkZXNjIn0sImxpbWl0Ijo1LCJhaWQiOjE1MzV9LCJTZWFyY2hBZnRlckRhdGEiOnsiVmVyc2lvbiI6MSwiU2VhcmNoQWZ0ZXJWYWx1ZXMiOnsiY29udGVudHMuc2VudGltZW50X2Nvbm5vdGF0aW9ucy5hbmdlciI6MC41Mjk1NzY5NiwiX3Njb3JlIjo1NTgyLjI5NiwidXJsX2hhc2giOiI1Mzk1OTc4NDgyMDEyNDkwNDU5In0sIlRva2VuUmVhbE9mZnNldCI6MH19",
                    "total_count": 572063,
                    "items_count": 5,
                    "items": [
                        {
                            "type": "content_analysis_search",
                            "url": "https://steamboatspringsluxuryhomes.com/govdb-588168-Kanu-Paddel-Push-Feder-Clips/",
                            "domain": "steamboatspringsluxuryhomes.com",
                            "main_domain": "steamboatspringsluxuryhomes.com",
                            "url_rank": 0,
                            "spam_score": 0,
                            "domain_rank": 181,
                            "fetch_time": "2022-09-21 13:02:26 +00:00",
                            "country": "US",
                            "language": "de",
                            "score": 6306.804,
                            "page_category": [
                                10014,
                                13605,
                                13618,
                                10009,
                                10404
                            ],
                            "page_types": [
                                "cms",
                                "blogs"
                            ],
                            "ratings": null,
                            "social_metrics": null,
                            "content_info": {
                                "content_type": "comment",
                                "title": null,
                                "main_title": null,
                                "previous_title": null,
                                "level": 0,
                                "author": null,
                                "snippet": "1 System von Teufel/Logitech etc. Das wollte ich dann auch nicht. ",
                                "snippet_length": 66,
                                "social_metrics": null,
                                "highlighted_text": null,
                                "language": "de",
                                "sentiment_connotations": {
                                    "anger": 0.5765729546546936,
                                    "happiness": 0.04464385658502579,
                                    "love": null,
                                    "sadness": 0.20320411026477814,
                                    "share": 0.12103315442800522,
                                    "fun": 0.050858959555625916
                                },
                                "connotation_types": {
                                    "positive": 0,
                                    "negative": 0.9411442279815674,
                                    "neutral": 0
                                },
                                "text_category": [
                                    10001,
                                    10026,
                                    10209,
                                    10994,
                                    12270
                                ],
                                "date_published": "2022-08-21 21:00:00 +00:00",
                                "content_quality_score": 100,
                                "semantic_location": null,
                                "rating": null,
                                "group_date": "2022-08-21 21:00:00 +00:00"
                            }
                        },
                        {
                            "type": "content_analysis_search",
                            "url": "http://azpremium.monster/xqiohcmf-708742-60x40x26cm-Transportbox-Flightcase-Koffercase-Box/",
                            "domain": "azpremium.monster",
                            "main_domain": "azpremium.monster",
                            "url_rank": 0,
                            "spam_score": 0,
                            "domain_rank": 182,
                            "fetch_time": "2022-09-23 13:06:19 +00:00",
                            "country": "US",
                            "language": "de",
                            "score": 5995.022,
                            "page_category": [
                                10013,
                                10021,
                                10178,
                                10937,
                                12263
                            ],
                            "page_types": [
                                "cms",
                                "blogs"
                            ],
                            "ratings": null,
                            "social_metrics": null,
                            "content_info": {
                                "content_type": "comment",
                                "title": null,
                                "main_title": null,
                                "previous_title": null,
                                "level": 0,
                                "author": null,
                                "snippet": "Bei Logitech wird das Batteriefach \"geschoben\". Wenn man Apps runter lädt die nicht so funktionieren, muß man die Werkseinstellung betätigen. ",
                                "snippet_length": 142,
                                "social_metrics": null,
                                "highlighted_text": null,
                                "language": "de",
                                "sentiment_connotations": {
                                    "anger": 0.5452792644500732,
                                    "happiness": 0.07148043811321259,
                                    "love": null,
                                    "sadness": 0.14249087870121002,
                                    "share": 0.10865204781293869,
                                    "fun": 0.12447550892829895
                                },
                                "connotation_types": {
                                    "positive": 0,
                                    "negative": 0.5001452565193176,
                                    "neutral": 0
                                },
                                "text_category": [
                                    10019,
                                    10167,
                                    10007,
                                    13418
                                ],
                                "date_published": "2022-06-17 21:00:00 +00:00",
                                "content_quality_score": 93,
                                "semantic_location": null,
                                "rating": null,
                                "group_date": "2022-06-17 21:00:00 +00:00"
                            }
                        },
                        {
                            "type": "content_analysis_search",
                            "url": "http://azpremium.monster/dworzfkx-708742-PRO-x40x26cm-Transportbox-Flightcase-Koffercase/",
                            "domain": "azpremium.monster",
                            "main_domain": "azpremium.monster",
                            "url_rank": 0,
                            "spam_score": 0,
                            "domain_rank": 182,
                            "fetch_time": "2022-10-01 16:12:36 +00:00",
                            "country": "US",
                            "language": "de",
                            "score": 5989.8984,
                            "page_category": [
                                10013,
                                10021,
                                10178,
                                10937,
                                12263
                            ],
                            "page_types": [
                                "cms",
                                "blogs"
                            ],
                            "ratings": null,
                            "social_metrics": null,
                            "content_info": {
                                "content_type": "comment",
                                "title": null,
                                "main_title": null,
                                "previous_title": null,
                                "level": 0,
                                "author": null,
                                "snippet": "Bei Logitech wird das Batteriefach \"geschoben\". Wenn man Apps runter lädt die nicht so funktionieren, muß man die Werkseinstellung betätigen. ",
                                "snippet_length": 142,
                                "social_metrics": null,
                                "highlighted_text": null,
                                "language": "de",
                                "sentiment_connotations": {
                                    "anger": 0.5452792644500732,
                                    "happiness": 0.07148043811321259,
                                    "love": null,
                                    "sadness": 0.14249087870121002,
                                    "share": 0.10865204781293869,
                                    "fun": 0.12447550892829895
                                },
                                "connotation_types": {
                                    "positive": 0,
                                    "negative": 0.5001452565193176,
                                    "neutral": 0
                                },
                                "text_category": [
                                    10019,
                                    10167,
                                    10007,
                                    13418
                                ],
                                "date_published": "2022-06-17 21:00:00 +00:00",
                                "content_quality_score": 93,
                                "semantic_location": null,
                                "rating": null,
                                "group_date": "2022-06-17 21:00:00 +00:00"
                            }
                        },
                        {
                            "type": "content_analysis_search",
                            "url": "http://azpremium.monster/qtcie-708742-Case-TOUR-PRO-x40x26cm-Transportbox/",
                            "domain": "azpremium.monster",
                            "main_domain": "azpremium.monster",
                            "url_rank": 0,
                            "spam_score": 0,
                            "domain_rank": 182,
                            "fetch_time": "2022-09-25 01:12:11 +00:00",
                            "country": "US",
                            "language": "de",
                            "score": 5989.555,
                            "page_category": [
                                10013,
                                10021,
                                10178,
                                10937,
                                12263
                            ],
                            "page_types": [
                                "cms",
                                "blogs"
                            ],
                            "ratings": null,
                            "social_metrics": null,
                            "content_info": {
                                "content_type": "comment",
                                "title": null,
                                "main_title": null,
                                "previous_title": null,
                                "level": 0,
                                "author": null,
                                "snippet": "Bei Logitech wird das Batteriefach \"geschoben\". Wenn man Apps runter lädt die nicht so funktionieren, muß man die Werkseinstellung betätigen. ",
                                "snippet_length": 142,
                                "social_metrics": null,
                                "highlighted_text": null,
                                "language": "de",
                                "sentiment_connotations": {
                                    "anger": 0.5452792644500732,
                                    "happiness": 0.07148043811321259,
                                    "love": null,
                                    "sadness": 0.14249087870121002,
                                    "share": 0.10865204781293869,
                                    "fun": 0.12447550892829895
                                },
                                "connotation_types": {
                                    "positive": 0,
                                    "negative": 0.5001452565193176,
                                    "neutral": 0
                                },
                                "text_category": [
                                    10019,
                                    10167,
                                    10007,
                                    13418
                                ],
                                "date_published": "2022-06-17 21:00:00 +00:00",
                                "content_quality_score": 93,
                                "semantic_location": null,
                                "rating": null,
                                "group_date": "2022-06-17 21:00:00 +00:00"
                            }
                        },
                        {
                            "type": "content_analysis_search",
                            "url": "https://chuckrosco.com/tyqvhpk-172323-Unterwassersport-Diver-Cylinder-Symbol/",
                            "domain": "chuckrosco.com",
                            "main_domain": "chuckrosco.com",
                            "url_rank": 0,
                            "spam_score": 0,
                            "domain_rank": 103,
                            "fetch_time": "2022-09-14 14:27:04 +00:00",
                            "country": "US",
                            "language": "de",
                            "score": 5582.296,
                            "page_category": [
                                10002,
                                10028,
                                10222,
                                13813,
                                10017,
                                10145,
                                13582
                            ],
                            "page_types": [
                                "cms",
                                "blogs"
                            ],
                            "ratings": null,
                            "social_metrics": null,
                            "content_info": {
                                "content_type": "comment",
                                "title": null,
                                "main_title": null,
                                "previous_title": null,
                                "level": 0,
                                "author": null,
                                "snippet": "Es hat aber kein Zweck mit Logitech. Leider enthielt das Paket nicht den wie auf den Fotis gezeigten Inhalt. ",
                                "snippet_length": 109,
                                "social_metrics": null,
                                "highlighted_text": null,
                                "language": "de",
                                "sentiment_connotations": {
                                    "anger": 0.5295769572257996,
                                    "happiness": 0.059367917478084564,
                                    "love": 0.021694591268897057,
                                    "sadness": 0.2476615160703659,
                                    "share": 0.0666995719075203,
                                    "fun": 0.07505948096513748
                                },
                                "connotation_types": {
                                    "positive": 0,
                                    "negative": 0.5709952116012573,
                                    "neutral": 0
                                },
                                "text_category": [
                                    10007,
                                    13418,
                                    10019,
                                    10168,
                                    10885,
                                    12197,
                                    12211
                                ],
                                "date_published": "2022-04-28 21:00:00 +00:00",
                                "content_quality_score": 96,
                                "semantic_location": null,
                                "rating": null,
                                "group_date": "2022-04-28 21:00:00 +00:00"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Embed DataForSeo widget on your website


Embed code:
Preview: