https://github.com/haithamaouati/geolocate
Geolocate an IP address using JSON API.
https://github.com/haithamaouati/geolocate
api bash bash-script geolocate geolocation ip ipaddress location script termux termux-tool tools
Last synced: 6 months ago
JSON representation
Geolocate an IP address using JSON API.
- Host: GitHub
- URL: https://github.com/haithamaouati/geolocate
- Owner: haithamaouati
- License: mit
- Created: 2024-01-30T13:58:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-26T13:55:59.000Z (11 months ago)
- Last Synced: 2025-04-19T17:17:01.606Z (6 months ago)
- Topics: api, bash, bash-script, geolocate, geolocation, ip, ipaddress, location, script, termux, termux-tool, tools
- Language: Shell
- Homepage:
- Size: 379 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Geolocate
**Geolocate** an IP address using the ip-api.com JSON API. The script displays various details such as city, region, country, ISP, and more. Additionally, it saves the fetched information to a JSON file.

## Usage
To use the Geolocate script, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/haithamaouati/Geolocate.git
```2. Navigate to the Geolocate directory:
```bash
cd Geolocate
```3. Run the script with a specified IP address:
```bash
./geolocate.sh [OPTIONS]
```Replace `` with the actual IP address you want to geolocate.
##### Options:
`-h, --help`
Displays the help message with usage instructions.`-i, --ip `
Specify the IP address to geolocate. If not provided, the script will use your public IP.`-f, --file`
Saves the geolocation information to a JSON file named after the IP address.## Dependencies
The script requires the following dependencies:
- [figlet](http://www.figlet.org/): Program for making large letters out of ordinary text
- [curl](https://curl.se/): Command line tool for transferring data with URL syntax
- [jq](https://stedolan.github.io/jq/): Command-line JSON processorMake sure to install these dependencies before running the script.
## Author
- **Haitham Aouati**
- GitHub: [github.com/haithamaouati](https://github.com/haithamaouati)## License
This Geolocate Bash script is open-source and available under the [MIT License](LICENSE).
Feel free to contribute or report issues on the [GitHub repository](https://github.com/haithamaouati/Geolocate).