https://github.com/fastily/is-it-up
📡 A simple API for checking if a website/domain is reachable
https://github.com/fastily/is-it-up
fastapi python3 uptime-monitor
Last synced: about 1 month ago
JSON representation
📡 A simple API for checking if a website/domain is reachable
- Host: GitHub
- URL: https://github.com/fastily/is-it-up
- Owner: fastily
- License: gpl-3.0
- Created: 2022-12-25T09:05:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-05-05T22:40:26.000Z (about 2 months ago)
- Last Synced: 2026-05-06T00:35:16.483Z (about 2 months ago)
- Topics: fastapi, python3, uptime-monitor
- Language: Python
- Homepage:
- Size: 275 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# is-it-up
[](https://www.python.org)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
A simple API for checking if a website/domain is online. Useful for troubleshooting network issues (e.g. is it just me or is it down for everyone?).
## Usage
### GET `/check`
Takes a single URL parameter, `website` and queries it to see if it is up. Retuns the http `status` code, the time at which this domain was last queried as an iso 8601 timestamp, and a boolean indiciating if this result was cached (i.e. whether someone else already made this request in the past 5m).
* Responses are cached for 5m
* Only the domain will be queried. If you pass a URL wtih a path, it will be truncated.
* Input is restricted to alpha-numeric characters, periods, and hyphens.
Example request:
```
/check?website=www.google.com
```
Example response:
```json
{
"status": 200,
"last_checked": "2023-12-04T10:21:36+00:00",
"cached": false
}
```
## Run
```bash
# install dependencies
uv sync --no-install-project
# start in development mode, visit http://127.0.0.1:8000 to view the web interface
uv run python -m is_it_up
# run w/ gunicorn, accessible at http://localhost:8000
uv run gunicorn -w 2 -k uvicorn.workers.UvicornWorker -b "0.0.0.0" --access-logfile "-" --no-control-socket is_it_up.__main__:app
```