Sklik API

Sklik API Drak


The Sklik API is a simple interface for developers who want to flexibly manage Sklik accounts. API is based on the XML-RPC protocol. You should have an understanding of this protocol and have common programming skills to use this API. XML-RPC is available in many programming languages. Using the Sklik API, you can create and manage campaigns, groups, keywords, ads and their statistics.


Logo API Drak Current stable Sklik API version is called Cipisek. New beta version is called Drak which is in testing process. Old Sklik API version is called Bajaja. New Sklik API version is released if parameters or response of some method is changed in a backward-incompatible way.

Following XML-RPC endpoints can be used:

See below for sandbox endpoints.

Paying for the API

Sklik API is free of charge. (Of course you are still charged for clicks on your ads.)

Developing API applications

For testing and developing API applications you can use the API sandbox. It doesn't contain any data – only the data you create in it. The username and login for the access to sandbox is the same as your account. All sandbox data will be deleted and account info synchronized each day after midnight. XML-RPC endpoints for sandbox environment are:

Differences between Sklik API versions Bajaja and Cipisek

Changes that are introduced in Cipisek:

Differences between Sklik API versions Cipisek and beta version of Drak

Changes that are introduced in bete Drak:

Changes that will be introduced in Drak: - All features meantioned in beta plus JSON - API



Json-api is simple http/json interface. This interface allows using JSON over HTTP as a communication protocol with our API(instead of XMLRPC or FASTRPC). Returns http response with results in json.

Using Json api is simple, only thing you must know is that method is in url and parameters for this method are in json (see examples).

Note: Json does not support some types used in XML-RPC/FAST-RPC protocol. These types are datetime and binary. Our Json-api accepts datetime in string ISO(YYYY-MM-DDThh:mm:ss, YYYY-MM-DD hh:hh:ss+TT:tt) format or in format YYYY-MM-DD (Y=year, M=month, D=day, h=hour, m=minute, s=second, T=time zone hour, t=time zone minute). Binary format must be convertible base64.

Simple examples use

example in python

import requests
from requests import post
import json
response = post("",
                       json=("", "password"))
response_data = response.json()
print "Response client.login:", response_data
response = post("", json=[{'session': response_data['session']},
                                                            {'dateFrom': '2005-01-01', 'dateTo':  '2016-12-01 12:00:00+01:00'},
                                                            {'statGranularity': 'monthly'}])
response_data = response.json()
print "Response campaigns.createReport:", response_data

response = post("", json=[{'session': response_data['session']}, response_data['reportId'], {'limit': 100, 'offset': 0, 'displayColumns': ['id', 'impressions', 'clicks']} ]) response_data = response.json() print "Response campaigns.stats:", response_data

example in php


function executePostRequest($postData, $url){ $ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_POST => TRUE, CURLOPT_HTTPHEADER => array("Content-type: application/json"), CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_POSTFIELDS => json_encode($postData) ));

// Create the context for the request $context = stream_context_create(array( 'https' => array( 'method' => 'POST', 'content' => json_encode($postData) ) ));

// Send the request $response = curl_exec($ch);

// Decode the response return json_decode($response, TRUE); }

$postData = array ( "", "password" );

$responseData = executePostRequest($postData, "");

// Print the date from the responsponse = curl_exec($ch); print_r( $responseData );

$postData = array( array( 'session' => $responseData['session'], ), array( 'dateFrom' => '2005-01-01', 'dateTo' => '2016-12-01 12:00:00+01:00' ), array( 'statGranularity' => 'monthly' ) );

$responseData = executePostRequest($postData, "");

// Print the date from the responsponse = curl_exec($ch); print_r( $responseData );

$postData = array( array( 'session' => $responseData['session'], ), $responseData['reportId'], array( 'limit' => 100, 'offset' => 0, 'displayColumns' => array('id', 'impressions', 'clicks') ) );

$responseData = executePostRequest($postData, "");

print_r( $responseData );

example in java


package cz.seznam.sklik.HttpJsonTest;

import; import; import; import; import;

import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.HttpClientBuilder;

/ * Jsonapi call / public class App {

public static String readInput(InputStream input) throws IOException {
    try (BufferedReader buffer = new BufferedReader(new InputStreamReader(input))) {
        return buffer.lines().collect(Collectors.joining("\n"));

public static void main( String[] args )
    HttpClient httpClient = HttpClientBuilder.create().build();
        HttpPost request = new HttpPost("");
        StringEntity params = new StringEntity("[\"\", \"password\"]");
        request.addHeader("Content-Type", "application/json");
        HttpResponse response = httpClient.execute(request);
        if (response != null) {
            InputStream in = response.getEntity().getContent();
            String getData = readInput(in);
    }catch(Exception e){




Copyright © 1996-2017   Help   Contact