Skip to main content
GET
/
api
/
version
Get Version
curl --request GET \
  --url https://api.example.com/api/version
{
  "version": "<string>",
  "latest_version": "<string>",
  "update_available": true,
  "changes": {},
  "error": "<string>"
}

Endpoint

GET /api/version

Description

Returns the current API version and checks for available updates from the GitHub repository. This endpoint also provides changelog information when the API is up to date.

Parameters

This endpoint does not require any parameters.

Response

version
string
required
The current version of the API (e.g., “1.4.8”)
latest_version
string
required
The latest available version from the GitHub repository
update_available
boolean
required
Whether an update is available (true if latest_version > version)
changes
string | null
Changelog text from GitHub (only included when the API is up to date)
error
string
Error message if the remote version check fails (status still 200)

Example Request

curl http://localhost:1234/api/version

Example Response

When Update is Available

{
  "version": "1.4.8",
  "latest_version": "1.5.0",
  "update_available": true,
  "changes": null
}

When Up to Date

{
  "version": "1.4.8",
  "latest_version": "1.4.8",
  "update_available": false,
  "changes": "- Fixed bug in series extractor\n- Improved error handling\n- Added new network filters"
}

When Remote Check Fails

{
  "error": "No se pudo obtener la versión remota: Connection timeout",
  "version": "1.4.8"
}

Version Comparison

The endpoint uses semantic versioning comparison:
  • Versions are compared as major.minor.patch
  • Returns update_available: true only when the remote version is strictly greater
  • Handles version strings with different lengths (e.g., “1.4” vs “1.4.0”)

GitHub Integration

The endpoint fetches version information from:
  • Version URL: https://raw.githubusercontent.com/UnfairAdventage/Web-Scrapping/refs/heads/main/CurrentVersion
  • Changes URL: https://raw.githubusercontent.com/UnfairAdventage/Web-Scrapping/refs/heads/main/Changes
Requests timeout after 5 seconds to prevent blocking.

Build docs developers (and LLMs) love