Arul's Public APIs

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

8 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.