Overview
Introduction
This is the official documentation for the Geekflare REST API.
These APIs provide numerous capabilities for important testing and monitoring methods for websites. For instance, website performance, security, DNS, and SEO score are some of the capabilities offered by these APIs.
Getting started
Getting started with Geekflare API is very easy. You'd need to register (no credit card required) to gain access to the free tier of Geekflare.
API type
The Geekflare API is a REST API. That means it works over HTTP and accepts and returns data in the JSON format.
Rate (usage) limits
The Geekflare API permits a call rate of 25 API calls per second under premium plan for each client having a valid token.
Proxy county
Many of the Geekflare APIs support request over proxy. In case you need to use this feature, the proxy to be provided as a proxyCountry
parameter.
Here's a list of the supported countries:
Country | Code |
---|---|
United States | us |
United Kingdom | uk |
France | fr |
Germany | de |
Canada | ca |
India | in |
China | cn |
Brazil | br |
Spain | es |
Japan | jp |
Request
Authentication
Make sure it's present in your header value when making API calls.
x-api-key YOUR-API-KEY
It expects the API access key to be present in a request header called x-api-key
.
Base URL
For all the endpoints listed in this documentation, the base URL is https://api.geekflare.com
Response
The API response follows some common formats for the sake of clarity and consistency. Depending on the request status, the response structures are as given below.
On successful processing of a request, the API returns a response in the following format:
{
"timestamp": 1610796547300,
"apiStatus": "success",
"apiCode": 200,
"message": "An overview message.",
"meta": {
"url": "https://example.com"
},
"data": []
}
When the incoming request doesn't have proper authorization, the following response structure is returned:
{
"message": "Forbidden"
}
If you are under a free plan and try to access a paid-only API like Port Scanner, it would return an error in the following format:
{
"timestamp": 1658254283953,
"apiStatus": "failure",
"apiCode": 403,
"message": "You are not allowed to access. This is available to premium plan only."
}
If a wrong endpoint or wrong request type (POST instead of GET, for example) is provided, the API returns an error in the following format:
{
"timestamp": 1657208461046,
"apiStatus": "failure",
"apiCode": 404,
"message": "API not found.",
"meta": {
"method": "POST",
"endpoint": "/helloworld"
}
}
API Endpoints
The Geekflare API is comprised of the following endpoints.
Broken Link
curl --location --request POST 'https://api.geekflare.com/brokenlink' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
proxyCountry: "us",
followRedirect: true,
});
var config = {
method: "post",
url: "https://api.geekflare.com/brokenlink",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/brokenlink"
payload = json.dumps({
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": True
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/brokenlink")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
}';
$request = new Request('POST', 'https://api.geekflare.com/brokenlink', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657109686205,
"apiStatus": "success",
"apiCode": 200,
"message": "No broken links found.",
"meta": {
"url": "geekflare.com",
"proxyCountry": "United States",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "wf0b7yrn05br8xtwple7ngj7hhxzvl2e"
}
},
"data": [
{
"link": "https://geekflare.com/",
"status": 200
},
{
"link": "https://geekflare.com/articles",
"status": 200
}
]
}
The Broken Link Checker API checks if webpage contains any broken links.
Endpoint
/brokenlink
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
proxyCountry |
string |
Proxy county. |
followRedirect |
boolean |
Follow redirection. |
DNS Records
curl --location --request POST 'https://api.geekflare.com/dnsrecord' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"types": ["A", "MX"]
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
types: ["A", "MX"],
});
var config = {
method: "post",
url: "https://api.geekflare.com/dnsrecord",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/dnsrecord"
payload = json.dumps({
"url": "geekflare.com",
"types": [
"A",
"MX"
]
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/dnsrecord")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"types": [
"A",
"MX"
]
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"types": [
"A",
"MX"
]
}';
$request = new Request('POST', 'https://api.geekflare.com/dnsrecord', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657112689610,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"types": ["A", "MX"],
"test": {
"id": "zmkqoxxu075dwn4u61yoqhq2rwo0029m"
}
},
"data": {
"A": ["172.67.70.213", "104.26.11.88", "104.26.10.88"],
"MX": [
{
"exchange": "alt3.aspmx.l.google.com",
"priority": 10
},
{
"exchange": "alt2.aspmx.l.google.com",
"priority": 5
},
{
"exchange": "alt1.aspmx.l.google.com",
"priority": 5
},
{
"exchange": "aspmx.l.google.com",
"priority": 1
}
]
}
}
The DNS Records API pulls out and displays the DNS records of a given domain name.
Endpoint
/dnsrecord
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
types |
string[] |
Type(s) of DNS records. |
types
parameter supports the following strings.
A
AAAA
CNAME
MX
CAA
NS
SOA
SRV
TXT
If you don’t provide the types
parameter, it will show all the DNS records.
DNSSEC
curl --location --request POST 'https://api.geekflare.com/dnssec' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
});
var config = {
method: "post",
url: "https://api.geekflare.com/dnssec",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/dnssec"
payload = json.dumps({
"url": "geekflare.com"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/dnssec")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com"
}';
$request = new Request('POST', 'https://api.geekflare.com/dnssec', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657115589175,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"test": {
"id": "x4akd0mw0947jdo4c9qqdfru2c1h7maq"
}
},
"data": true
}
The DNSSEC API test if security extension is enabled on the domain.
Endpoint
/dnssec
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be tested. |
HTTP Headers
curl --location --request POST 'https://api.geekflare.com/httpheader' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
proxyCountry: "us",
followRedirect: true,
});
var config = {
method: "post",
url: "https://api.geekflare.com/httpheader",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/httpheader"
payload = json.dumps({
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": True
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/httpheader")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
}';
$request = new Request('POST', 'https://api.geekflare.com/httpheader', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657118780944,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"proxyCountry": "United States",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "32ca8x3m08oiychu49gx9r3fvrw9t7f7"
}
},
"data": [
{
"name": "date",
"value": "Wed, 06 Jul 2022 14:46:20 GMT"
},
{
"name": "content-type",
"value": "text/html; charset=UTF-8"
},
{
"name": "connection",
"value": "close"
}
]
}
The HTTP header API parses the response headers of a given endpoint (or website) and presents the output in JSON format. This can be useful in activities such as monitoring, data collection, etc.
Endpoint
/httpheader
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
proxyCountry |
string |
Proxy county. |
followRedirect |
boolean |
Follow redirection. |
HTTP Protocol Support
curl --location --request POST 'https://api.geekflare.com/httpprotocol' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"followRedirect": true
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
followRedirect: true,
});
var config = {
method: "post",
url: "https://api.geekflare.com/httpprotocol",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/httpprotocol"
payload = json.dumps({
"url": "geekflare.com",
"followRedirect": True
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/httpprotocol")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"followRedirect": true
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"followRedirect": true
}';
$request = new Request('POST', 'https://api.geekflare.com/httpprotocol', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657118991601,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "8b8beh8q03x5t82entwx9npfi1fxj39j"
}
},
"data": {
"http10": false,
"http11": true,
"http2": true,
"http3": ["h3-29"]
}
}
While the HTTP spec is constantly evolving, webservers (for want of configuration or capability) aren't always able to keep up. This API tests an HTTP endpoint and reports which HTTP versions are currently supported by that endpoint.
Endpoint
/httpprotocol
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
followRedirect |
boolean |
Follow redirection. |
Lighthouse
curl --location --request POST 'https://api.geekflare.com/lighthouse' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us",
"followRedirect": true,
"parameters": ["--only-categories=seo", "--output=csv"]
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
device: "desktop",
proxyCountry: "us",
followRedirect: true,
parameters: ["--only-categories=seo", "--output=csv"],
});
var config = {
method: "post",
url: "https://api.geekflare.com/lighthouse",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/lighthouse"
payload = json.dumps({
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us",
"followRedirect": True,
"parameters": [
"--only-categories=seo",
"--output=csv"
]
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/lighthouse")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us",
"followRedirect": true,
"parameters": [
"--only-categories=seo",
"--output=csv"
]
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us",
"followRedirect": true,
"parameters": [
"--only-categories=seo",
"--output=csv"
]
}';
$request = new Request('POST', 'https://api.geekflare.com/lighthouse', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657119087947,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "United States",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "3zniwkh5067adrro1llpqstdwbtei1va"
}
},
"data": "https://api-assets.geekflare.com/tests/lighthouse/irlqk1082a5iohh56j1f480v.csv"
}
The Lighthouse API provides access to the Google Lighthouse project as an API. Lighthouse is an audit tool for websites to score them on performance, accessibility, SEO, etc., while providing concrete improvement suggestions.
Endpoint
/lighthouse
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
device |
string |
The device to be used. |
parameters |
string[] |
Lighthouse parameters. |
proxyCountry |
string |
Proxy county. |
followRedirect |
boolean |
Follow redirection. |
device
parameter supports desktop
, mobile
, and tablet
strings. If you don’t provide the device parameter, desktop
will be used as a default option.
Advanced mode
The Lighthouse API also runs in an advanced mode, accepting some of the customization parameters recognized by Google's Lighthouse engine:
--screenEmulation
--screenEmulation.disabled
--emulatedUserAgent
--only-audits
--only-categories
--throttling-method
--extra-headers
--chrome-flags
--no-emulatedUserAgent
--blocked-url-patterns
--output
--preset
The --output
parameter controls the output format. It's set to json
by default, but can be html
or csv
as well.
In order to use these parameters, pass them in aparameters
JSON array in the body of the input. You may refer guide to run Lighthouse API using advanced mode.
Load Time
curl --location --request POST 'https://api.geekflare.com/loadtime' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"followRedirect": true
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
followRedirect: true,
});
var config = {
method: "post",
url: "https://api.geekflare.com/loadtime",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/loadtime"
payload = json.dumps({
"url": "geekflare.com",
"followRedirect": True
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/loadtime")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"followRedirect": true
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"followRedirect": true
}';
$request = new Request('POST', 'https://api.geekflare.com/loadtime', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657119303041,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "zbmzby8v07l4f4vp4po3h0x3c1qqr7bf"
}
},
"data": {
"dns": 10,
"connect": 12,
"tls": 9,
"send": 19,
"wait": 86,
"total": 88
}
}
As the name indicates, the Load Time API provides the total time it takes for an HTTP response to complete. More often than not, this is used to measure website performance, and includes time taken for DNS lookup, waiting for the server to respond, data sent, data received, etc.
Endpoint
/loadtime
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
followRedirect |
boolean |
Follow redirection. |
Mixed Content
curl --location --request POST 'https://api.geekflare.com/mixedcontent' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
proxyCountry: "us",
followRedirect: true,
});
var config = {
method: "post",
url: "https://api.geekflare.com/mixedcontent",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/mixedcontent"
payload = json.dumps({
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": True
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/mixedcontent")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"proxyCountry": "us",
"followRedirect": true
}';
$request = new Request('POST', 'https://api.geekflare.com/mixedcontent', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657124909949,
"apiStatus": "success",
"apiCode": 200,
"message": "No mixed content found.",
"meta": {
"url": "geekflare.com",
"proxyCountry": "United States",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "l8r16s8k0agfp31wt5i9y7bfzgfpf4ls"
}
},
"data": [
"https://geekflare.com/",
"https://geekflare.com/wp-content/themes/geekflare/dist/site.css",
"https://geekflare.com/wp-content/themes/geekflare/custom/custom.css",
"https://geekflare.com/wp-content/themes/geekflare/public/site/section/header/logo.png"
]
}
The Mixed Content API checks whether a given website loads one or more static assets as mixed content. The problem of mixed content arises when a website loads its initial response over https
but then loads one or more of its resources over http
. This is more than a question of hygiene, as mixing non-secure content with secure content is a grave security slip-up and can result in on-path attacks and more.
Endpoint
/mixedcontent
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
proxyCountry |
string |
Proxy county. |
followRedirect |
boolean |
Follow redirection. |
MTR
curl --location --request POST 'https://api.geekflare.com/mtr' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
});
var config = {
method: "post",
url: "https://api.geekflare.com/mtr",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/mtr"
payload = json.dumps({
"url": "geekflare.com"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/mtr")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com"
}';
$request = new Request('POST', 'https://api.geekflare.com/mtr', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657125115104,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"test": {
"id": "5cvz40fs08ige3jr15srd6ndl1qkndfc"
}
},
"data": [
{
"hop": 1,
"host": "240.192.18.19",
"asn": "AS???",
"loss": 0,
"sent": 2,
"last": 0.28,
"avg": 0.29,
"best": 0.28,
"worst": 0.3,
"stdDev": 0.01
},
{
"hop": 2,
"host": "240.0.60.49",
"asn": "AS???",
"loss": 0,
"sent": 2,
"last": 0.28,
"avg": 0.29,
"best": 0.28,
"worst": 0.29,
"stdDev": 0.01
},
{
"hop": 3,
"host": "240.0.60.34",
"asn": "AS???",
"loss": 0,
"sent": 2,
"last": 0.27,
"avg": 0.29,
"best": 0.27,
"worst": 0.31,
"stdDev": 0.03
}
]
}
The MTR API can traceroute domain or IP to check the network path.
Endpoint
/mtr
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
Port Scanner
curl --location --request POST 'https://api.geekflare.com/openport' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
});
var config = {
method: "post",
url: "https://api.geekflare.com/openport",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/openport"
payload = json.dumps({
"url": "geekflare.com"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/openport")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com"
}';
$request = new Request('POST', 'https://api.geekflare.com/openport', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657886341929,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"test": {
"id": "ug7odkom06u6d3fksph5952mvd09iyrz"
}
},
"data": [80, 443, 8080]
}
The Port Scanner API checks all 65K ports that are open to communication on a given IP or site.
Endpoint
/openport
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
Ping
curl --location --request POST 'https://api.geekflare.com/ping' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
});
var config = {
method: "post",
url: "https://api.geekflare.com/ping",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/ping"
payload = json.dumps({
"url": "geekflare.com"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/ping")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com"
}';
$request = new Request('POST', 'https://api.geekflare.com/ping', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657125453687,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"test": {
"id": "fb3a0b4r09vkc3enmh4p5yq3zii2j5u7"
}
},
"data": {
"requests": 3,
"loss": 0,
"latency": 0.885,
"min": 0.817,
"max": 0.885,
"avg": 0.843,
"stdDev": 0.029,
"ip": "104.26.10.88"
}
}
The Ping API ping domain or IP to check if its reachable and provide latency information. API makes three requests to the target endpoint.
Endpoint
/ping
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
Screenshot
curl --location --request POST 'https://api.geekflare.com/screenshot' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
device: "desktop",
proxyCountry: "us",
});
var config = {
method: "post",
url: "https://api.geekflare.com/screenshot",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/screenshot"
payload = json.dumps({
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/screenshot")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "us"
}';
$request = new Request('POST', 'https://api.geekflare.com/screenshot', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657125548273,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"device": "desktop",
"proxyCountry": "United States",
"test": {
"id": "qit3lw7b08esp9l3fd1wu42ii2jfrqw6"
}
},
"data": "https://api-assets.geekflare.com/tests/screenshot/kbi6d206g87ituahb7icwtpr.png"
}
The Screenshot API grabs a full-page screenshot of a website from a given device and location. This helps in knowing rendering correctness and performance of a website from the perspective of geographically distributed users having different devices.
Endpoint
/screenshot
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
device |
string |
Device to be used. |
proxyCountry |
string |
Proxy county. |
device
parameter supports desktop
, mobile
, and tablet
strings. If you don’t provide the device parameter, desktop
will be used as a default option.
TLS Scan
curl --location --request POST 'https://api.geekflare.com/tlsscan' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
});
var config = {
method: "post",
url: "https://api.geekflare.com/tlsscan",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/tlsscan"
payload = json.dumps({
"url": "geekflare.com"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/tlsscan")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com"
}';
$request = new Request('POST', 'https://api.geekflare.com/tlsscan', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657125629493,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"test": {
"id": "40zt4but04y07ccn4pov5fiolzrxbxdg"
}
},
"data": {
"protocols": {
"tls10": false,
"tls11": false,
"tls12": true,
"tls13": true
},
"certificate": {
"commonName": "sni.cloudflaressl.com",
"subjectAltName": "DNS:*.geekflare.com, DNS:sni.cloudflaressl.com, DNS:geekflare.com",
"issuer": {
"country": "US",
"organization": "Cloudflare, Inc.",
"commonName": "Cloudflare Inc ECC CA-3"
},
"expiry": "Jun 6 23:59:59 2023 GMT"
}
}
}
The TLS Scan API provides info about the supported TLS versions as well as the deployed certificate info for a given domain.
Endpoint
/tlsscan
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
Time to First Byte (TTFB)
curl --location --request POST 'https://api.geekflare.com/ttfb' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"followRedirect": true
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
followRedirect: true,
});
var config = {
method: "post",
url: "https://api.geekflare.com/ttfb",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/ttfb"
payload = json.dumps({
"url": "geekflare.com",
"followRedirect": True
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/ttfb")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"followRedirect": true
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"followRedirect": true
}';
$request = new Request('POST', 'https://api.geekflare.com/ttfb', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657125711631,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "irfdgwvw08mvdaqjyxvkp8apgqzxkyjj"
}
},
"data": 156
}
The TTFB API measures how fast a web resource starts loading when connected. It can be thought of as a way to measure response times (in milliseconds), loosely speaking.
Endpoint
/ttfb
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
followRedirect |
boolean |
Follow redirection. |
Site Status (Is site up or down?)
curl --location --request POST 'https://api.geekflare.com/up' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "geekflare.com",
"followRedirect": true,
"proxyCountry": "us"
}'
var axios = require("axios");
var data = JSON.stringify({
url: "geekflare.com",
followRedirect: true,
proxyCountry: "us",
});
var config = {
method: "post",
url: "https://api.geekflare.com/up",
headers: {
"x-api-key": "YOUR-API-KEY",
"Content-Type": "application/json",
},
data: data,
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
import json
url = "https://api.geekflare.com/up"
payload = json.dumps({
"url": "geekflare.com",
"followRedirect": True,
"proxyCountry": "us"
})
headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.geekflare.com/up")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = "YOUR-API-KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"url": "geekflare.com",
"followRedirect": true,
"proxyCountry": "us"
})
response = https.request(request)
puts response.read_body
<?php
$client = new Client();
$headers = [
'x-api-key' => 'YOUR-API-KEY',
'Content-Type' => 'application/json'
];
$body = '{
"url": "geekflare.com",
"followRedirect": true,
"proxyCountry": "us"
}';
$request = new Request('POST', 'https://api.geekflare.com/up', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
The above snippet returns JSON response like this:
{
"timestamp": 1657125793379,
"apiStatus": "success",
"apiCode": 200,
"message": "Site is up.",
"meta": {
"url": "geekflare.com",
"proxyCountry": "United States",
"followRedirect": true,
"redirectedURL": "https://geekflare.com/",
"test": {
"id": "fsxm0vyw06ztnvbtllwwvimajytf2s8d"
}
},
"data": {
"statusCode": 200,
"reasonPhrase": "OK"
}
}
The Site Status API provides info about whether the given URL is up or not. Almost exclusively, this API is meant to work with websites. Checking the status of an infrastructure (whose entry point is the given URL) isn't recommended and may provide wrong results.
Endpoint
/up
Parameters
Name | Type | Description |
---|---|---|
url |
string |
The URL to be checked. |
proxyCountry |
string |
Proxy county. |
followRedirect |
boolean |
Follow redirection. |