WorldInfoAPI is a REST API that provides real-time global information – time, weather, sunrise/sunset, moon phases, cultural notes, NASA's Astronomy Picture of the Day, country flag, and more.
https://worldinfoapi.onrender.com
✅ Check by Country
/time?country=India
✅ Check by Timezone
/time?timezone=Asia/Kolkata
✅ Compare Two Timezones
/compare?from=Asia/Kolkata&to=America/New_York
Check Current Time in India
👉 https://worldinfoapi.onrender.com/time?country=India
Compare India and USA Time
👉 https://worldinfoapi.onrender.com/compare?from=Asia/Kolkata&to=America/New_York
Returns real-time information about the given country or timezone.
Name | Type | Required | Example |
---|---|---|---|
country |
string | optional | ?country=India |
timezone |
string | optional | ?timezone=Asia/Kolkata |
{
"country": "Australia",
"country_image": "https://source.unsplash.com/600x400/?Australia",
"cultural_note": "Casual 'G'day' with handshake.",
"currency": {
"code": "AUD",
"name": "Australian Dollar"
},
"date": "2025-07-18",
"day": "Friday",
"flag_image": "https://flagcdn.com/w320/au.png",
"greeting": "Good Night",
"is_daytime": false,
"language": "English",
"moon_phase": "Last Quarter",
"nasa_image": {
"description": "Bright planet Saturn rises in evening skies...",
"image_url": "https://apod.nasa.gov/apod/image/2507/ISSMeetsSaturn3_1024.jpg",
"title": "ISS Meets Saturn"
},
"public_holiday_today": "No Holiday Today",
"sunrise": "08:18",
"sunset": "19:03",
"time": "21:50:00",
"time_fun_fact": "Australia has multiple time zones.",
"utc_offset": "+1030",
"weather": {
"condition": "Clear Sky",
"humidity": "40%",
"temperature": "11.7°C",
"wind_speed": "3.55 m/s"
},
"whats_happening_today": "Sydney Festival is ongoing.",
"working_hours_status": "Late Night"
}
Compare time between two timezones.
/compare?from=Asia/Kolkata&to=America/New_York
{
"from": "Asia/Kolkata",
"to": "America/New_York",
"time_now_from": "20:11:25",
"time_now_to": "10:41:25",
"difference_hours": 9.5
}
WorldInfoAPI/
│
├── app.py # Main Flask App
├── requirements.txt # Required packages
├── dataset/
│ ├── data_store.py # Static cultural data, currencies, etc.
│
└── README.md # Documentation
- Clone the repo:
git clone https://github.com/YOUR_USERNAME/WorldInfoAPI.git
cd WorldInfoAPI
- Install dependencies:
pip install -r requirements.txt
- Run the API:
python app.py
- Open in browser:
http://127.0.0.1:5000/time?country=India
You can update cultural facts, currencies, or fun facts by editing:
dataset/data_store.py
Example:
CULTURAL_NOTES["Brazil"] = "Brazilians greet with a handshake or a kiss."
LANGUAGES["Brazil"] = "Portuguese"
CURRENCIES["Brazil"] = {"name": "Brazilian Real", "code": "BRL"}
Restart the server after making changes.
- Fork the repo
- Create a new branch:
git checkout -b feature-name
- Make your changes
- Submit a Pull Request
Developed by Vaibhav Rawat
🔗 GitHub: vaibhavrawat27
If you like this project, please star ⭐ the repository on GitHub!