track ip addresses, lookup mac addresses, etc

API Usage

This section contains a list of 10 publicly available FREE web services that you can use. There is currently no usage restriction, but please be reasonable in making curl calls, jQuery, Postman, Ajax or other API calls. Thank you.

List of web services:

  1. Get IP Address in text format
  2. Get IP Address in JSON format
  3. Get IP Address in JSONP
  4. Get IP Address in JSONP with custon callback
  5. Convert text to uppercase
  6. Convert text to lowercase
  7. Convert text to titlecase
  8. Get all Costco location IDs in the DC area
  9. Get Costco gas prices for a particular location in the DC area
  10. Get Costco gas prices for multiple locations in the DC area

1. Get IP Address in text format

This web service returns your IP address in text format.

URL: https://api.aruljohn.com/ip

PARAMETERS: none

RETURN TYPE: text

EXAMPLE:

curl https://api.aruljohn.com/ip

Alternative URL: https://ip.aruljohn.com

EXAMPLE:

curl https://ip.aruljohn.com/

OUTPUT:

199.199.199.199

2. Get IP Address in JSON format

This web service returns your IP address in JSON format.

URL: https://api.aruljohn.com/ip/json

PARAMETERS: none

RETURN TYPE: JSON

EXAMPLE:

curl https://api.aruljohn.com/ip/json

Alternative URL: https://ip.aruljohn.com/json

EXAMPLE:

curl https://ip.aruljohn.com/json

OUTPUT:

{"ip":"199.199.199.199"}

3. Get IP Address in JSONP

This web service returns your IP address in JSONP format.

URL: https://api.aruljohn.com/ip/jsonp

PARAMETERS: none

RETURN TYPE: JSON

EXAMPLE:

curl https://api.aruljohn.com/ip/jsonp

Alternative URL: https://ip.aruljohn.com/jsonp

EXAMPLE:

curl https://ip.aruljohn.com/jsonp

OUTPUT:

callback({"ip":"199.199.199.199"});

4. Get IP Address in JSONP with custon callback

This web service returns your IP address in JSONP format with a custom function name.

URL: https://api.aruljohn.com/ip/jsonp

PARAMETERS: callback=functionName

RETURN TYPE: JSON

EXAMPLE:

curl https://api.aruljohn.com/ip/jsonp?callback=findmyip

Alternative URL: https://ip.aruljohn.com/jsonp?callback=findmyip

EXAMPLE:

curl https://ip.aruljohn.com/jsonp?callback=findmyip

OUTPUT:

findmyip({"ip":"199.199.199.199"});

5. Convert text to uppercase

This web service returns a string with all the input converted to uppercase.

URL: https://api.aruljohn.com/uppercase

METHOD: POST

PARAMETERS: str

RETURN TYPE: text

EXAMPLE:

curl -X POST --data "str=hEllo tHEre" https://api.aruljohn.com/uppercase

OUTPUT:

HELLO THERE

6. Convert text to lowercase

This web service returns a string with all the input converted to lowercase.

URL: https://api.aruljohn.com/lowercase

METHOD: POST

PARAMETERS: str

RETURN TYPE: text

EXAMPLE:

curl -X POST --data "str=hEllo tHEre" https://api.aruljohn.com/lowercase

OUTPUT:

hello there

7. Convert text to titlecase

This web service returns a string with all the input converted to titlercase.

URL: https://api.aruljohn.com/titlecase

METHOD: POST

PARAMETERS: str

RETURN TYPE: text

EXAMPLE:

curl -X POST --data "str=hEllo tHEre" https://api.aruljohn.com/titlecase

OUTPUT:

Hello There

10. Get all Costco location IDs in the DC area

This web service returns all Costco location IDs in the DC area. These location IDs can be used to retrieve gas information in any of those locations.

URL: https://api.aruljohn.com/gas/costco

METHOD: GET

RETURN TYPE: JSON array

EXAMPLE:

curl https://api.aruljohn.com/gas/costco

OUTPUT:

[{"id": "alexandria", "location": "ALEXANDRIA, VA"},
 {"id": "beltsville", "location": "BELTSVILLE, MD"},
 {"id": "brandywine", "location": "BRANDYWINE, MD"},
 {"id": "chantilly", "location": "CHANTILLY, VA"},
 {"id": "charlottesville", "location": "CHARLOTTESVILLE, VA"},
 {"id": "elkridge", "location": "ELKRIDGE, MD"},
 {"id": "fairfax", "location": "FAIRFAX, VA"},
 {"id": "frederick", "location": "FREDERICK, MD"},
 {"id": "fredericksburg", "location": "FREDERICKSBURG, VA"},
 {"id": "glenallen", "location": "GLEN ALLEN, VA"},
 {"id": "glenburnie", "location": "GLEN BURNIE, MD"},
 {"id": "glenmills", "location": "GLEN MILLS, PA"},
 {"id": "glenarden", "location": "GLENARDEN, MD"},
 {"id": "hanover", "location": "HANOVER, MD"},
 {"id": "harrisonburg", "location": "HARRISONBURG, VA"},
 {"id": "lancaster", "location": "LANCASTER, PA"},
 {"id": "leesburg", "location": "LEESBURG, VA"},
 {"id": "manassas", "location": "MANASSAS, VA"},
 {"id": "newark", "location": "NEWARK, DE"},
 {"id": "newportnews", "location": "NEWPORT NEWS, VA"},
 {"id": "owingsmills", "location": "OWINGS MILLS, MD"},
 {"id": "sterling", "location": "STERLING, VA"},
 {"id": "washington", "location": "WASHINGTON, DC"},
 {"id": "whitemarsh", "location": "WHITE MARSH (BALTIMORE), MD"},
 {"id": "winchester", "location": "WINCHESTER, VA"},
 {"id": "woodbridge", "location": "WOODBRIDGE, VA"}]

9. Get Costco gas prices for a particular location in the DC area

This web service returns Costco gas prices for any particular location in the DC area. You can find all location IDs here.

URL: https://api.aruljohn.com/gas/costco/<LOCATION-ID>

METHOD: GET

RETURN TYPE: JSON string

EXAMPLE:

curl https://api.aruljohn.com/gas/costco/fairfax

OUTPUT:

{"location": "FAIRFAX, VA", "regular": "$4.59", "premium": "$5.29","previous": ["regular": "$4.55", "premium": "$5.25"]}

10. Get Costco gas prices for multiple locations in the DC area

This web service returns Costco gas prices for multiple locations (up to 5) in the DC area. The location IDs are separated by commas. You can find all location IDs here.

URL: https://api.aruljohn.com/gas/costco/<LOCATION-ID-1>,< LOCATION-ID-2>,< LOCATION-ID-3>

METHOD: GET

RETURN TYPE: JSON array

EXAMPLE:

curl https://api.aruljohn.com/gas/costco/fairfax,woodbridge,sterling

OUTPUT:

[{"location": "FAIRFAX, VA", "regular": "$4.59", "premium": "$5.29","previous": ["regular": "$4.55", "premium": "$5.25"]},
 {"location": "WOODBRIDGE, VA", "regular": "$4.39", "premium": "$4.94","previous": ["regular": "$4.35", "premium": "$4.89"]},
 {"location": "STERLING, VA", "regular": "$4.51", "premium": "$5.03","previous": ["regular": "$4.46", "premium": "$4.98"]}]

ANOTHER EXAMPLE:

curl https://api.aruljohn.com/gas/costco/sterling,glenarden

OUTPUT:

[{"location": "STERLING, VA", "regular": "$4.51", "premium": "$5.03","previous": ["regular": "$4.46", "premium": "$4.98"]},
 {"location": "GLENARDEN, MD", "regular": "$4.58", "premium": "$5.19","previous": ["regular": "$4.49", "premium": "$5.04"]}]

Disclaimer: This website is not affiliated with Costco or its affiliates.

Legacy IP Address Documentation

Additional IP Address Documentation (LEGACY)

Finding IPv4 or IPv6 address

API Endpoint URLMethodSample Output (IPv4)Sample Output (IPv6)
https://ip.aruljohn.comGET123.123.123.1230:0:0:0:0:ffff:7b7b:7b7b
https://ip.aruljohn.com/jsonGET{"ip":"123.123.123.123"}{"ip":"0:0:0:0:0:ffff:7b7b:7b7b"}
https://ip.aruljohn.com/jsonpGETcallback({"ip":"123.123.123.123"});callback({"ip":"0:0:0:0:0:ffff:7b7b:7b7b"});
https://ip.aruljohn.com/jsonp?callback=findmyipGETfindmyip({"ip":"123.123.123.123"});findmyip({"ip":"0:0:0:0:0:ffff:7b7b:7b7b"});

Text format

To get the IP address in text format, run this curl command on the terminal.

curl https://ip.aruljohn.com
123.123.123.123

JSON format

To get the IP address in JSON format, run this curl command on the terminal.

curl https://ip.aruljohn.com/json
{"ip":"123.123.123.123"}

JSONP callback

To get the IP address with JSONP callback, thia is the endpoint.

curl https://ip.aruljohn.com/jsonp

The default output returns a function called callback().

curl https://ip.aruljohn.com/jsonp
callback({"ip":"123.123.123.123"});

JSONP callback with custom callback

To get the IP address with a specific JSONP callback, say findmyip, this is the endpoint.

curl https://ip.aruljohn.com/jsonp?callback=findmyip

The default output returns a function called findmyip().

curl https://ip.aruljohn.com/jsonp?callback=findmyip
findmyip({"ip":"123.123.123.123"});

JSON format using jQuery

To get the IP address via Ajax call using jQuery, this code may be useful.

$(function() {
    $.ajax({
      url: "https://ip.aruljohn.com/json",
      dataType: 'json',
      crossDomain: true,
      data: null,
      success: function (data, status, xhr) {
          $('#ip').html(data.ip);
      },
      error:  function(e, textStatus, errorMessage) {
          alert("ERROR" + e);
      },
    });
});