Using the Walton ZIP API.#

To use the Walton API you must be connected to the UARK WiFi or connected to the UARK VPN which can be accessed from (https://its.uark.edu/network-access/vpn/index.php). Once you have connected to the VPN you can make one of the following requests.

Methods for making requests#

Browser#

This can be done by visiting WaltonAPi.uark.edu in your browser and using one of the queries mentioned below.

Python#

This can be done using the requests library (https://requests.readthedocs.io/en/latest/)

import requests
r = requests.get('https://waltonapi.uark.edu/table/zip')
r.json()

Linux/Mac#

This can be done using a cURL command in the terminal

for example:

curl https://waltonapi.uark.edu/table/zip

Query Types#

Return a Table#

To access a specific table in the Walton API, you can add the table name to the API’s address by appending /table/(table name) to the end of the URL. For example, if the API’s base address is https://waltonapi.uark.edu, and you want to access a table called state, you would use the following URL: https://waltonapi.uark.edu/table/state. This will return the data in the state table, if it is available in the API.

Return the state associated with a Zip Code#

To get information about a specific zip code using the Walton API, you can add the zip code to the API’s address by appending /state/(desired zip) to the end of the URL. For example, if the API’s base address is https://waltonapi.uark.edu, and you want to get information about the zip code 12345, you would use the following URL: https://waltonapi.uark.edu/state/12345. This will return information about the zip code 12345, if it is available in the API.

To see more about how the WaltonAPI works, checkout this notebook to see how to add more features Expanding WaltonAPI