Logo
Logo

PRODUCTS

TOOLS

pricing background

C++API Integration

api

live

1#include <curl/curl.h>
2#include <stdio.h>
3
4int main() {
5	CURL *curl = curl_easy_init();
6	if(curl) {
7		curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/whois?apiKey=API_KEY&whois=live&domainName=google.com");
8		curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
9		curl_easy_perform(curl);
10		curl_easy_cleanup(curl);
11	}
12	return 0;
13}

Historical

1#include <curl/curl.h>
2#include <stdio.h>
3
4int main() {
5	CURL *curl = curl_easy_init();
6	if(curl) {
7		curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/whois?apiKey=API_KEY&whois=historical&domainName=google.com");
8		curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
9		curl_easy_perform(curl);
10		curl_easy_cleanup(curl);
11	}
12	return 0;
13}

Reverse

1#include <curl/curl.h>
2#include <stdio.h>
3
4int main() {
5	CURL *curl = curl_easy_init();
6	if(curl) {
7		curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/whois?apiKey=API_KEY&whois=reverse&keyword=youtube");
8		curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
9		curl_easy_perform(curl);
10		curl_easy_cleanup(curl);
11	}
12	return 0;
13}

Bulk Whois

1#include <curl/curl.h>
2#include <stdio.h>
3
4int main() {
5	CURL *curl = curl_easy_init();
6	if(curl) {
7		curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/bulkwhois?apiKey=API_KEY");
8		curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
9		struct curl_slist *headers = NULL;
10		headers = curl_slist_append(headers, "Content-Type: application/json");
11		curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
12		curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{"domainNames": ["amazon.ch","google.com","whoisfreaks.com","nic.dev","news.si"]}");
13		curl_easy_perform(curl);
14		curl_easy_cleanup(curl);
15	}
16	return 0;
17}