NAVNavbar
Logo
cURL php NodeJS Python cSharp

Setting Live ‘DataForSEO Search Volume’ Tasks

This endpoint will provide you with search volume normalized with Bing search volume data or clickstream data for up to 1000 keywords in a single request.

Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-dashboard

<?php
// You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip
require('RestClient.php');
$api_url = 'https://api.dataforseo.com/';
// Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-dashboard
$client = new RestClient($api_url, null, 'login', 'password');

$post_array = array();
// simple way to set a task
$post_array[] = array(
	"keywords" => [
        "you tube",
        "youtube",
        "youtub"
	],
	"language_name" => "English",
	"location_code" => 2840
);
try {
	// POST /v3/keywords_data/clickstream_data/search_volume/live
	$result = $client->post('/v3/keywords_data/clickstream_data/search_volume/live', $post_array);
	print_r($result);
	// do something with post result
} catch (RestClientException $e) {
	echo "\n";
	print "HTTP code: {$e->getHttpCode()}\n";
	print "Error code: {$e->getCode()}\n";
	print "Message: {$e->getMessage()}\n";
	print  $e->getTraceAsString();
	echo "\n";
}
$client = null;
?>

The above command returns JSON structured like this:

{
  "version": "0.1.20240801",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "3.6964 sec.",
  "cost": 0.15,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "08021312-1535-0589-0000-c36efd4ad04e",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "3.6322 sec.",
      "cost": 0.15,
      "result_count": 1,
      "path": [
        "v3",
        "keywords_data",
        "clickstream_data",
        "search_volume",
        "live"
      ],
      "data": {
        "api": "keywords_data",
        "function": "search_volume",
        "se": "clickstream_data",
        "location_code": 2840,
        "language_code": "en",
        "use_clickstream": true,
        "tag": "test-tag",
        "keywords": [
          "you tube",
          "youtube",
          "youtub"
        ]
      },
      "result": [
        {
          "location_code": 2840,
          "language_code": "en",
          "items_count": 3,
          "items": [
            {
              "keyword": "you tube",
              "use_clickstream": true,
              "search_volume": 3841450,
              "monthly_searches": [
                {
                  "year": 2024,
                  "month": 6,
                  "search_volume": 4850027
                },
                {
                  "year": 2024,
                  "month": 5,
                  "search_volume": 5791200
                },
                {
                  "year": 2024,
                  "month": 4,
                  "search_volume": 5063908
                },
                {
                  "year": 2024,
                  "month": 3,
                  "search_volume": 4057639
                },
                {
                  "year": 2024,
                  "month": 2,
                  "search_volume": 3499745
                },
                {
                  "year": 2024,
                  "month": 1,
                  "search_volume": 4948844
                },
                {
                  "year": 2023,
                  "month": 12,
                  "search_volume": 4167276
                },
                {
                  "year": 2023,
                  "month": 11,
                  "search_volume": 3252548
                },
                {
                  "year": 2023,
                  "month": 10,
                  "search_volume": 4372437
                },
                {
                  "year": 2023,
                  "month": 9,
                  "search_volume": 3322543
                },
                {
                  "year": 2023,
                  "month": 8,
                  "search_volume": 4070665
                },
                {
                  "year": 2023,
                  "month": 7,
                  "search_volume": 3424434
                }
              ]
            },
            {
              "keyword": "youtube",
              "use_clickstream": true,
              "search_volume": 141457261,
              "monthly_searches": [
                {
                  "year": 2024,
                  "month": 6,
                  "search_volume": 161581931
                },
                {
                  "year": 2024,
                  "month": 5,
                  "search_volume": 200944345
                },
                {
                  "year": 2024,
                  "month": 4,
                  "search_volume": 189930752
                },
                {
                  "year": 2024,
                  "month": 3,
                  "search_volume": 167179529
                },
                {
                  "year": 2024,
                  "month": 2,
                  "search_volume": 131840294
                },
                {
                  "year": 2024,
                  "month": 1,
                  "search_volume": 186755632
                },
                {
                  "year": 2023,
                  "month": 12,
                  "search_volume": 179034394
                },
                {
                  "year": 2023,
                  "month": 11,
                  "search_volume": 144365840
                },
                {
                  "year": 2023,
                  "month": 10,
                  "search_volume": 185597392
                },
                {
                  "year": 2023,
                  "month": 9,
                  "search_volume": 143876762
                },
                {
                  "year": 2023,
                  "month": 8,
                  "search_volume": 171954692
                },
                {
                  "year": 2023,
                  "month": 7,
                  "search_volume": 131361848
                }
              ]
            },
            {
              "keyword": "youtub",
              "use_clickstream": true,
              "search_volume": 401067,
              "monthly_searches": [
                {
                  "year": 2024,
                  "month": 6,
                  "search_volume": 456295
                },
                {
                  "year": 2024,
                  "month": 5,
                  "search_volume": 560123
                },
                {
                  "year": 2024,
                  "month": 4,
                  "search_volume": 557952
                },
                {
                  "year": 2024,
                  "month": 3,
                  "search_volume": 517788
                },
                {
                  "year": 2024,
                  "month": 2,
                  "search_volume": 368580
                },
                {
                  "year": 2024,
                  "month": 1,
                  "search_volume": 536242
                },
                {
                  "year": 2023,
                  "month": 12,
                  "search_volume": 529729
                },
                {
                  "year": 2023,
                  "month": 11,
                  "search_volume": 393389
                },
                {
                  "year": 2023,
                  "month": 10,
                  "search_volume": 513446
                },
                {
                  "year": 2023,
                  "month": 9,
                  "search_volume": 388073
                },
                {
                  "year": 2023,
                  "month": 8,
                  "search_volume": 383185
                },
                {
                  "year": 2023,
                  "month": 7,
                  "search_volume": 329596
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

All POST data should be sent in the JSON format (UTF-8 encoding). The task setting is done using the POST method. When setting a task, you should send all task parameters in the task array of the generic POST array. You can send up to 2000 API calls per minute. Visit DataForSEO Help Center to get practical tips for request handling depending on your Keyword Data API payload volume.

You will get information for every single keyword in an array.

You can send up to 1000 keywords in one keywords array. Our system will charge your account per each request, no matter what number of keywords an array has, the price for 1 or 1000 keywords will be the same.

Below you will find a detailed description of the fields you can use for setting a task.

Description of the fields for setting a task:

Field name Type Description
keywords array target keywords
required field
UTF-8 encoding
maximum number of keywords you can specify in this array: 1000
the keywords will be converted to lowercase format

Note: certain symbols and characters (e.g., UTF symbols, emojis) are not allowed
to learn more about which symbols can be used, please refer to this article

location_name string full name of search engine location
required field if you don’t specify location_code
you can receive the list of available locations with location_name by making a separate request to https://api.dataforseo.com/v3/keywords_data/clickstream_data/locations_and_languages
example:
London,England,United Kingdom
location_code integer search engine location code
required field if you don’t specify location_name
if you use this field, you can receive the list of available locations with location_code by making a separate request to the https://api.dataforseo.com/v3/keywords_data/clickstream_data/locations_and_languages
example:
2840
language_name string full name of search engine language
required field if don’t specify language_code
you can receive the list of available languages with their language_name by making a separate request to the https://api.dataforseo.com/v3/keywords_data/clickstream_data/locations_and_languages
example:
English
language_code string search engine language code
required field if don’t specify language_name
you can receive the list of available languages with their language_code by making a separate request to the https://api.dataforseo.com/v3/keywords_data/clickstream_data/locations_and_languages
example:
en
use_clickstream boolean use clickstream data to provide results
optional field
if set to true, you will get DataForSEO search volume values based on clickstream data;
if set to false, Bing search volume data will be used to calculate DataForSEO search volume;
default value: true;
Note: some locations may not be available for calculating Bing search volume, in this case search volume will be calculated based on clickstream data even if you set this parameter to false
tag string user-defined task identifier
optional field
the character limit is 255
you can use this parameter to identify the task and match it with the result
you will find the specified tag value in the data object of the response


As a response of the API server, you will receive JSON-encoded data containing a tasks array with the information specific to the set tasks.

Description of the fields in the results array:

Field name Type Description
version string the current version of the API
status_code integer general status code
you can find the full list of the response codes here
Note: we strongly recommend designing a necessary system for handling related exceptional or error conditions
status_message string general informational message
you can find the full list of general informational messages here
time string execution time, seconds
cost float total tasks cost, USD
tasks_count integer the number of tasks in the tasks array
tasks_error integer the number of tasks in the tasks array returned with an error
tasks array array of tasks
        id string task identifier
unique task identifier in our system in the UUID format
        status_code integer status code of the task
generated by DataForSEO; can be within the following range: 10000-60000
you can find the full list of the response codes here
        status_message string informational message of the task
you can find the full list of general informational messages here
        time string execution time, seconds
        cost float cost of the task, USD
        result_count integer number of elements in the result array
        path array URL path
        data array contains the same parameters that you specified in the POST request
        result array array of results
            location_code string location code in a POST array
if there is no data, then the value is null
            language_code string language code in a POST array

Note:if the keyword in the POST array appears to be misspelled, data will be returned for the correctly spelled keyword;
we use the functionality of Google Ads API to check and validate the spelling of keywords, learn more by this link
            location_code integer location code in a POST array
if there is no data, then the value is null
            language_code string language code in a POST array
if there is no data, then the value is null
            items_count string ithe number of results returned in the items array
            items array array of keywords
contains keywords and their search volume rates
                keyword string keyword provided in the POST array
                use_clickstream boolean indicates if the use_clickstream parameter is active
possible values: true, false
                search_volume integer current search volume rate of a keyword
                monthly_searches array monthly search volume rates
array of objects with search volume rates in a certain month of a year
                    year integer year
                    month integer month
                    search_volume integer search volume rate in a certain month of a year

‌‌