How to Get Exact Update Times for OGame API Endpoints?

  • Hello,


    Is there a way to determine the exact time when these OGame API endpoints are updated?


    https://s1-en.ogame.gameforge.com/api/highscore.xml  - Updates once an hour

    https://s1-en.ogame.gameforge.com/api/players.xml  - Updates once a day

    https://s1-en.ogame.gameforge.com/api/alliances.xml  - Updates once a day

    https://s1-en.ogame.gameforge.com/api/universe.xml  - Updates once a week

    https://s1-en.ogame.gameforge.com/api/serverData.xml  - Updates once a day

    https://s1-en.ogame.gameforge.com/api/playerData.xml  - Updates once a week


    I’d like to schedule my cron jobs to run shortly after the data refreshes so I can avoid making unnecessary API requests.


    Thanks in advance!

  • RiV-

    Approved the thread.
  • Yes, there is a way, but it works a bit differently than a fixed “cron-friendly” schedule.


    All public OGame API endpoints include a timestamp attribute in the root element, for example:

    XML
    1. <players
    2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3. xsi:noNamespaceSchemaLocation="https://s1-en.ogame.gameforge.com/api/xsd/players.xsd"
    4. timestamp="1769418782"
    5. serverId="en1"
    6. >

    That timestamp is the Unix time of the last successful update of that endpoint.


    Important part: updates are call-triggered.


    These APIs do not refresh automatically at a fixed time (like “every day at 04:00”).

    Instead, they update when the endpoint is called, and only if the minimum refresh interval has passed.


    So for example:

    • players.xml → minimum refresh interval: 24 hours
    • If the last update was at timestamp = T
    • The next update will happen on the first request made after T + 24h


    Same logic applies to:

    • hourly endpoints (e.g. highscore.xml)
    • daily endpoints
    • weekly endpoints (universe.xml, playerData.xml)

    What this means for cron jobs

    There is no “exact update time” you can pre-calculate globally.


    The recommended approach is:

    1. Read and store the timestamp from the last response
    2. Schedule your update request after the minimum refresh interval
    3. Make a single request — if enough time has passed, the API will refresh; otherwise it will return cached data


    This way you avoid unnecessary requests and always get fresh data as soon as it becomes available.


    TL;DR

    • timestamp = last update time
    • APIs refresh on request, not on a fixed clock
    • Next update happens on the first call after the minimum interval
  • RiV-

    Added the Label Questions