NAV Navbar
php python csharp java


To authorize, use this code:

//You can download this file from here

try {
    //Instead of 'login' and 'password' use your credentials from
    $client = new RestClient('', null, 'login', 'password');

    //do something

} 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";
from client import RestClient
#You can download this file from here

#Instead of 'login' and 'password' use your credentials from
client = RestClient("login", "password")

#do something
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace DataForSeoDemos
    public static partial class Demos
        public static async Task cmn_key_id()
            var httpClient = new HttpClient
                BaseAddress = new Uri(""),

                //Instead of 'login' and 'password' use your credentials from
                DefaultRequestHeaders = { Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes("login:password"))) }

            // do something
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;

public class Demos {
    public static void cmn_key_id_first_method_in_api() throws Exception {
        URI url = new URI("");
        HttpClient client = HttpClientBuilder.create().build();
        //Instead of 'login' and 'password' use your credentials from
        String basicAuth = Base64.getEncoder().encodeToString(("login:password").getBytes("UTF-8"));
        //do something

Instead of ‘login’ and ‘password’ use your credentials from

First of all, you should register at our service and then you will be able to use your login and password to start using our API service.

DataForSEO API uses technology Basic Authentication.

It provides you with a possibility to use our API almost for all programming languages.