-
Notifications
You must be signed in to change notification settings - Fork 7
Set SERP HTML tasks
georgesvash edited this page Nov 6, 2018
·
4 revisions
Original docs can be found at https://docs.dataforseo.com/#setting-serp-html-tasks
Attention Please notice that the get() method isn't used. The static call ::getAfterMerge() is used instead. Note that the first setOpt() call should be static
Method: ::getAfterMerge($pool) - creates a single payload out of the list of objects, makes a single call to the API, whereas the payload contains arrays with postIds or without, and returns an object ResponseCollection
require_once '../vendor/autoload.php';
use DFSClient\DFSClient;
use DFSClient\Models\SERP_API\SettingsExtraSerpTasks;
$DFSClient = new DFSClient('Your Login','Your Password');
$model = new SettingsExtraSerpTasks();
$pool=[]; // array with objects.
for($i=0; $i<3; $i++){
$pool[] = $model::setOpt('priority', 1)
->setOpt('se_id', 22 )
->setOpt('loc_id', 1006886)
->setOpt('key_id', 1095202)
->setPostId($i); //- you can use postId method, if you want set custom id for payload array.
}
// run request to api.
$completed = SettingsExtraSerpTasks::getAfterMerge($pool);
if (!$completed->isSuccessful())
dd($completed);
foreach ($completed as $key=>$item){
dump($item);
}- RankTracker API
- SERP API
-
Merchant API
-
Google Shopping API
- Set Google Shopping tasks
- Get Google Shopping completed tasks
- Get Google Shopping results by task_id
- Set Google Shopping HTML tasks
- Get Google Shopping HTML completed tasks
- Get Google Shopping HTML results by task_id
- Set Google Shopping Shops tasks
- Get Google Shopping Shops completed tasks
- Get Google Shopping Shops results by task_id
- Amazon API
-
Google Shopping API
- Keywords Data API
- Keywords Finder API
- Competitor Data API
- OnPage API
- Common API