Get Credit Balance (v2)

This API will tell you how many credits you have left on your account. It's simple, fast and easy to use.

Here are a few scenarios that businesses will use this API for.

  • You use our API to validate emails and you need to check within a certain time-frame when your credit balance is too low, so you can make a payment.
  • You want to track how many email validation credits you're using per your defined time-frame to generate useful statistical information.
  • You want to automate and integrate information into your application dashboard that shows you your currently remaining credit balance.

Below, you will find the instructions on how to use our API. It's very easy to use and it requires SSL.

GET /v2/getcredits


Below you will find the instructions on how to use our API, it's very easy to use and requires SSL. The API requires that you have an active credit balance and will never consume a credit for any unknown result.

URL Parameters

  • Parameter
  • api_key
    Your API Key, found in your account.

Get Credit Balance Code Samples

  • Visual Basic
  • C#
  • PHP
  • Java
  • Python
  • Swift
  • Objective C
  • Android Java
        Dim apiKey = "Your Secret Key"
        Dim apiURL = "" & apiKey

        Dim request As HttpWebRequest = DirectCast(WebRequest.Create(apiURL), HttpWebRequest)
        request.Timeout = 150000
        request.Method = "GET"

        Using response As WebResponse = request.GetResponse()
            response.GetResponseStream().ReadTimeout = 20000
            Using ostream As New StreamReader(response.GetResponseStream())
                responseString = ostream.ReadToEnd()
            End Using
        End Using
      Catch ex as exception
        'Catch Exception - All errors will be shown here - if there are issues with the API
      End Try

    try {
      string apiKey = "Your Secret Key";
      string apiURL = "" + apiKey; 
      HttpWebRequest request = (HttpWebRequest)WebRequest.Create(apiURL);
      request.Timeout = 150000;
      request.Method = "GET";
      using (WebResponse response = request.GetResponse()) {
         response.GetResponseStream().ReadTimeout = 20000;
         using (StreamReader ostream = new StreamReader(response.GetResponseStream())) {
         responseString = ostream.ReadToEnd();
      } catch (exception ex) {
      //Catch Exception - All errors will be shown here - if there are issues with the API

    // set the api key and email to be validated
    $apiKey = 'Your Secret Key';
    // use curl to make the request
    $url = ''.$apiKey;
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); 
    curl_setopt($ch, CURLOPT_TIMEOUT, 150); 
    $response = curl_exec($ch);
    //decode the json response
    $json = json_decode($response, true);


public class MyClass {

    public static void main(String[] args){

        String key = "Your Secret Key";
        String targetURL = ""+key;

        HttpURLConnection connection = null;
        final String USER_AGENT = "Mozilla/5.0";

        try {
            URL url = new URL(targetURL);
            connection = (HttpURLConnection) url.openConnection();
            connection.addRequestProperty("User-Agent", USER_AGENT);


            BufferedReader in = new BufferedReader(
                    new InputStreamReader(connection.getInputStream()));
            String inputLine;
            StringBuffer response = new StringBuffer();

            while ((inputLine = in.readLine()) != null) {

            //print result

        } catch (Exception e) {
        } finally {
            if (connection != null) {


import requests
import json

target_url = ""
secret_key = "Your Secret Key"

api_response = requests.get("%s%s" % (target_url, secret_key))
data = json.loads(api_response.content)

# prints the number of credits
print data["Credits"]


let key = "Your Secret Key"
let url = URL(string: String(format: "", key))
let task = URLSession.shared.dataTask(with: url!) { (data, response, error) in
    if error != nil {
        NSLog("Error (String(describing: error))")
    } else {
        do {
            let parsedData = try JSONSerialization.jsonObject(with: data!) as! [String:Any]
            for (key, value) in parsedData {
                NSLog("(key) = (value) ")
        } catch {
            print("Error deserializing JSON: (error)")

  NSString *key = @"Your Secret Key";
  NSString *urlString = [NSString stringWithFormat:@"", key];
  __block NSURL *url = [NSURL URLWithString:urlString];
  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
      NSData *response = [NSData dataWithContentsOfURL:url];
      NSDictionary *arrResponse = nil;
          arrResponse = [NSJSONSerialization JSONObjectWithData: response options:kNilOptions error:nil];
      dispatch_async(dispatch_get_main_queue(), ^(void) {
          for(NSString *key in [arrResponse allKeys]) {
              NSLog(@"%@: %@",key,[arrResponse objectForKey:key]);
  //            callback(nil, arr);

  //Add to build.gradle (App) in the "android" bracket:
  useLibrary 'org.apache.http.legacy'


  android {
      compileSdkVersion 25
      useLibrary 'org.apache.http.legacy'

  import android.os.AsyncTask;
  import org.json.JSONObject;
  import java.util.Iterator;

  public class MainActivity extends AppCompatActivity {

      protected void onCreate(Bundle savedInstanceState) {

          new AsyncTaskParseJson().execute();

  public class AsyncTaskParseJson extends AsyncTask<String, String, String> {

      String key = "Your Secret Key";
      String url = ""+key;

      protected void onPreExecute() {

      protected String doInBackground(String... arg0) {

          JsonParser jParser = new JsonParser();
          JSONObject json = jParser.getJSONFromUrl(url);
          Iterator keys = json.keys();
          while( keys.hasNext() ) {
              String key = (String);
              try {
                  System.out.println("ZeroBounce: "+key+" = " +json.get(key).toString());
              catch (Exception e){}

          return null;
      protected void onPostExecute(String strFromDoInBg) {}


  package com.zerobounce.zbapiandroid;


  import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.ClientProtocolException;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.impl.client.DefaultHttpClient;
  import org.json.JSONException;
  import org.json.JSONObject;

  import android.util.Log;

  public class JsonParser {

      final String TAG = "";

      static InputStream is = null;
      static JSONObject jObj = null;
      static String json = "";

      public JSONObject getJSONFromUrl(String url) {

          try {

              DefaultHttpClient httpClient = new DefaultHttpClient();
              HttpGet httpGet = new HttpGet(url);

              HttpResponse httpResponse = httpClient.execute(httpGet);
              HttpEntity httpEntity = httpResponse.getEntity();
              is = httpEntity.getContent();

          } catch (UnsupportedEncodingException e) {
          } catch (ClientProtocolException e) {
          } catch (IOException e) {

          try {

              BufferedReader reader = new BufferedReader(new InputStreamReader(is, "iso-8859-1"), 8);
              StringBuilder sb = new StringBuilder();
              String line = null;
              while ((line = reader.readLine()) != null) {
                  sb.append(line + "
              json = sb.toString();

          } catch (Exception e) {
              Log.e(TAG, "Error converting result " + e.toString());

          try {
              jObj = new JSONObject(json);
          } catch (JSONException e) {
              Log.e(TAG, "Error parsing data " + e.toString());

          return jObj;

This API will tell you how many credits you have left on your account. It's simple, fast and easy to use.

If you want to call the API from your browser to test it, all you have to do is to replace the API KEY with your key:

This API will tell you how many credits you have left on your account.

The API will return these results in a JSON format using the "getcredits" method. credits - The amount of credits you have left in your account for email validations. If a -1 is returned, that means your API Key is invalid.

Endpoint Response

This API will tell you how many credits you have left on your account. It's simple, fast and easy to use.

Successful Response


Error Response