https://github.com/mohammadhasanii/node-ipgeolocation
This is an Express project with an API to get information about an IP address by sending a POST request with the IP address in the body, and receiving detailed information about the IP address in response.
https://github.com/mohammadhasanii/node-ipgeolocation
express geolocation geolocation-api ip-geolocation ip-geolocation-api javascript nodejs restapi
Last synced: 10 months ago
JSON representation
This is an Express project with an API to get information about an IP address by sending a POST request with the IP address in the body, and receiving detailed information about the IP address in response.
- Host: GitHub
- URL: https://github.com/mohammadhasanii/node-ipgeolocation
- Owner: mohammadhasanii
- Created: 2023-07-12T18:11:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T18:32:38.000Z (over 2 years ago)
- Last Synced: 2024-01-27T08:35:39.206Z (almost 2 years ago)
- Topics: express, geolocation, geolocation-api, ip-geolocation, ip-geolocation-api, javascript, nodejs, restapi
- Language: JavaScript
- Homepage: https://nodejs.org/en
- Size: 8.79 KB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Node-IPGeolocation
IP Info API is a web service that provides you with information about the details of an IP address by receiving the IP address through a POST request to the / route.

## Getting Started
To use this API, first, clone the repository:
git clone https://github.com/mohammadhasanii/Node-IPGeolocation ↗
1-npm install
2-run command "node app.js"
## Request
This will make a POST request to the root endpoint '/' with a JSON body containing the IP address to lookup.
POST /
{
"ip": "8.8.8.8"
}
## Response
The API will return a JSON response with details about the IP address:
```json
{
"ip": "8.8.8.8",
"city": "Mountain View",
"region": "California",
"country": "United States",
"loc": "37.3860,-122.0838",
"org": "AS15169 Google LLC",
"postal": "94035"
}