Newastro is a horoscope REST API written in Python with Flask, created for the intermediate Android course by Aristidevs. It accepts a zodiac sign plus optional date and language parameters and returns a formatted horoscope reading in JSON, ready to consume from mobile or web apps.
What is Newastro?
Newastro is a lightweight Flask-RESTful API that generates daily horoscope predictions for the twelve zodiac signs. Clients send a sign via a POST body or a GET path, optionally specifying a date and language, and receive a JSON response that includes the sign name, an id, a date, an icon URL, and the horoscope text. A live demo is hosted on Vercel at https://newastro.vercel.app/.
Key Features
- POST endpoint — Accepts JSON with sign, date, and lang fields, where date and lang can be omitted to default to the current date and a general language.
- GET endpoint — Place the sign in the URL path, for example /aries, and pass date and lang as query parameters.
- 12 zodiac signs supported — aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, and pisces.
- Consistent JSON response — Returns date, horoscope text, icon URL, id, and sign in a predictable structure for client parsing.
- API documentation included — The project includes API docs, referenced with a screenshot in the README.
- Language parameter — Accepts a lang code such as fr or es, though the README warns that translations may not be accurate because Google does poorly with long texts.
- Built for learning — Created as part of Aristidevs' intermediate Android course, giving students a real API to practice against.
Who is it for?
- Android students — Follow the Aristidevs course to practice making HTTP requests and parsing JSON responses from a live API.
- Backend learners — Study a minimal Flask API implementation, including route handling, request data parsing, and JSON serialization.
- Horoscope app developers — Prototype an app that displays daily zodiac readings without having to build a backend from scratch.
What can you do with Newastro?
- Mobile developers: integrate horoscope data into an Android app by calling the POST or GET endpoints and rendering the returned readings.
- API learners: experiment with different signs, dates, and language codes to observe how the JSON response changes.
- Frontend hobbyists: build a small web client that fetches a daily horoscope for any sign and displays it.
How does Newastro work?
The API responds to requests at https://newastro.vercel.app/. For a POST request, send a JSON body containing at least the sign field; the server returns the horoscope object. For GET, put the sign in the URL path and optionally add date and lang as query parameters. The README shows sample requests and responses for both styles, demonstrating the exact JSON structure returned.





