Tools API

A collection of useful APIs for public use.

With a collection of useful APIs for public use, you can enhance your sites and applications in minutes.

All API URLs listed herein are relative to https://www.gentlentapis.com/tools/v1/. No authentication is required. Parameters should be sent as URL parameters or as a request body with type application/json.

Even though no authentication is required, we strongly recommend to sign up for an Gentlent Account and create API credentials to receive notifications in case of breaking changes to our APIs.


GET Barcodes API

The Barcodes API can be used to generate QR, aztec, and data matrix codes. It is recommended to download and/or cache codes that are used often.

TypeDescriptionValue
URLAPI EndpointGET /barcodes
Query/URL
Parameters
typeType of code that should be generated. Must be one of:
  • qr_code
  • aztec_code
  • data_matrix
dataAny string between 4 and 1663 characters that should be encoded
in the barcode. Could be:
  • URL
  • Coordinates
  • Phone Number
  • Text
  • ...
scale OptionalDefines how large the resulting image should be. Must be:
  • Integer between 1 and 10
  • Default: 2

GET Countries API

The Countries API provides a list of countries and their states along with their names and ISO codes.

TypeDescriptionValue
URLAPI EndpointGET /countries
Query/URL
Parameters
country OptionalLists more detailed information and the states of a specific country.
Must be:
  • 2-letter Country Code
[
​  {
​    "code2": "AF",
​    "code3": "AFG",
​    "name": "Afghanistan",
​    "capital": "Kabul",
​    "region": "Asia",
​    "subregion": "Southern Asia",
​    "api_url": "https://www.gentlentapis.com/tools/v1/countries?country=AF"
​  },
​  {
​    "code2": "AX",
​    "code3": "ALA",
​    "name": "Åland Islands",
​    "capital": "Mariehamn",
​    "region": "Europe",
​    "subregion": "Northern Europe",
​    "api_url": "https://www.gentlentapis.com/tools/v1/countries?country=AX"
​  },
​  …
]

POST Email Sanitizer API

Our Email Sanitizer API is used to normalise email addresses by honoring things such as punycode, inbox aliases, and more.

TypeDescriptionValue
URLAPI EndpointGET /sanitizeEmail
Request BodyemailThe email address that should be formatted. Must be:
  • Email Address
format OptionalType of the response. Must be one of:
  • text (default)
  • json
{
​  "email": "john.doe@yourname.xyz"
}

GET Favicon API

Get the URL or direct image of any site's favicon with our public Favicon API. It supports the classic favicon.ico, but also much newer icons, such as the Apple touch icons.

TypeDescriptionValue
URLAPI EndpointGET /getFavicon
Query/URL
Parameters
urlThe URL of the website you want the favicon from. Must be:
  • HTTP/HTTPS-based URL
format OptionalType of the response. Must be one of:
  • text (default)
  • json
  • image

GET Geo IP API

You can use our Geo IP API to get location data, as well as geo-supported subnet details of an IP address.

TypeDescriptionValue
URLAPI EndpointGET /geoIp
Query/URL
Parameters
ip_addressThe IP address you want to look up. Must be one of:
  • IPv4 address (without CIDR)
  • IPv6 address (without CIDR)
{
​  "ip": "8.8.8.8",
​  "metadata": {
​    "location": {
​      "country": "US",
​      "eu": false
​    },
​    "asn": 15169,
​    "asn_name": "GOOGLE",
​    "coords": {
​      "lat": 37.751,
​      "lon": -97.822
​    },
​    "ip": "8.8.8.8",
​    "subnet": "8.8.8.0/24"
​  }
}

POST One-Time-Password (OTP) API

Integrating TOTP-based 2-factor authentication is now easier than ever. With out OTP API, you can create and verify 2FA codes with ease.

TypeDescriptionValue
URLAPI EndpointPOST /otp
Request BodytypeType of the OTP code. Must be:
  • time_based
actionWhat action you want to take. Must be one of:
  • generate
  • verify
digits OptionalDefines how many digits should be generated. Must be one of:
  • 6 (default; most compatible)
  • 8
secret
Only when verifying
Must only be set when action=verify. Should be:
  • Secret returned by an action=generate request
label Optional
Only when generating
Must only be set when action=generate. Defines the label used
by OTP apps and software. May be:
  • Text
issuer Optional
Only when generating
Must only be set when action=generate. Defines the issuer
name used by OTP apps and software. May be:
  • Text
{
​  "algorithm": "SHA1",
​  "digits": 6,
​  "issuer": "",
​  "label": "",
​  "otp_url": "otpauth://totp/?secret=...&issuer=&algorithm=SHA1&digits=6&period=30",
​  "period": 30,
​  "qrcode_url": "https://www.gentlentapis.com/tools/v1/barcodes?type=qr_code&...",
​  "secret": "FF4HND2CCGPWNZHKIA66I6Y44DEKPXXI",
​  "type": "totp"
}

{
​  "algorithm": "SHA1",
​  "digits": 6,
​  "otp_codes": {
​    "+30s": "623843",
​    "current": "078649",
​    "-30s": "697286",
​    "-60s": "673108"
​  },
​  "period": 30,
​  "secret": "FF4HND2CCGPWNZHKIA66I6Y44DEKPXXI",
​  "type": "totp"
}

GET Sitemaps API

Let us scan your site and build your sitemap to get more visibility in search engines. Please note that this API is subject to rate limiting. Please cache responses or contact us for increased limits.

TypeDescriptionValue
URLAPI EndpointGET /sitemap
Query/URL
Parameters
urlThe URL of the website you want the favicon from. Must be:
  • HTTP/HTTPS-based URL
depth OptionalHow deep you want your site to be crawled. This increases the
risk of a timeout. Must be one of:
  • Integer between 1 and 5
  • Default: 3
format OptionalType of the response. Must be one of:
  • xml (default)
  • text
  • json
<?xml version="1.0" encoding="UTF-8"?>
​<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
​  <url>
​    <loc>https://pki.gentlent.com/</loc>
​    <priority>1.0000</priority>
​  </url>
​  <url>
​    <loc>https://root-ca3-demo-revoked.pki.gentlent.com/</loc>
​    <priority>0.9000</priority>
​  </url>
​  <url>
​    <loc>https://root-ca3-demo.pki.gentlent.com/</loc>
​    <priority>0.9000</priority>
​  </url>
​  …
​</urlset>

GET What's my IP API

Get the IP address of the client you connect to this API with. This is more of a utility to find your public IP in a complicated cloud environment.

TypeDescriptionValue
URLAPI EndpointGET /getIp
Query/URL
Parameters
format OptionalType of the response. Must be one of:
  • text (default)
  • json

GET WHOIS API

Retrieve the WHOIS data of any IP address or domain. Please note that this API is subject to rate limiting. Please cache responses or contact us for increased limits.

TypeDescriptionValue
URLAPI EndpointGET /whois
Query/URL
Parameters
queryType of the response. Must be one of:
  • Registered Domain Name
  • IPv4 address
  • IPv6 address
showServer OptionalAdds the queried WHOIS server to the response. Must be one of:
  • false (default)
  • true
Domain name: yourname.xyz
Registry Domain ID: D18815624-CNIC
Registrar WHOIS Server: whois.namecheap.com
Registrar URL: http://www.namecheap.com
Updated Date: 2021-02-19T07:49:59.61Z
Creation Date: 2016-03-21T00:28:19.00Z
Registrar Registration Expiration Date: 2022-03-21T23:59:59.00Z
...
Got your interest?
Get notified or invited to our beta as soon as Gentlent opens its doors:
Gentlent

An official Gentlent website.
Official Gentlent websites are always linked from our website www.gentlent.com , or contain an extended validated certificate.