Skip to content

jackboylan7/ZIPCODE-API-SEARCH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Here's a README file for the provided code:

US Zipcode Search

This is a simple web application that allows users to search for a US zipcode and retrieve information about the corresponding state, city/town, latitude, and longitude. The application uses the Zippopotam.us API to fetch the data.

Features

  • Search for a US zipcode
  • Display the state, city/town, latitude, and longitude corresponding to the entered zipcode
  • Responsive design using Bootstrap

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • Axios (for making HTTP requests)
  • Bootstrap (for styling)

Setup

  1. Clone the repository or download the project files.
  2. Open the project folder in your preferred code editor.
  3. Make sure you have a web server running or use a live server extension in your code editor to preview the project.

Usage

  1. Open the index.html file in your web browser.
  2. In the search section, enter a valid US zipcode in the input field.
  3. Click the "Search" button or press Enter.
  4. The application will fetch and display the state, city/town, latitude, and longitude corresponding to the entered zipcode.

Code Structure

  • index.html: Contains the HTML structure of the web page.
  • style.css: Contains the CSS styles for the web page.
  • script.js: Contains the JavaScript code for fetching data from the API and updating the UI.

API

The application uses the Zippopotam.us API to fetch data about US zipcodes. The API endpoint used is https://api.zippopotam.us/us/{zipcode}, where {zipcode} is the user-entered zipcode.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.