OGame provides two different types of API: a public API, and a non-public, access controlled API.
Public API
The public API provides data about the universe and their players and is updated at a set interval.
To check the API of another server, you just need to change the s1-en to the one you want to check, e.g. s122-de.
If the universe you want to check is a universe with a number as name, there won't be a <name></name> entry in the serverData API.
In order to get the data as JSON instead of XML, append ?toJson=1 to the URL.
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
https://s1-en.ogame.gameforge.com/api/localization.xml -> Tech IDs (Buildings, Researchs, Ships, Defence, Missiontypes) and their localization
https://s1-en.ogame.gameforge.com/api/universes.xml -> All universes of a community
Non-universe-specific APIs
https://lobby.ogame.gameforge.com/api/servers - List of all universes accessible via the Lobby with a short excerpt of their settings.
Non-public API
This API is access-controlled. In order to access this API endpoint, you need to request access in the Submissions & API Requests sub-forum. See the pinned threads there for more details on how to submit a request. Once you've been granted access, you will be given an access key that you need to keep private and that you will use for every request.
Reports API
In the game some reports (combat reports, espionage reports, recycler reports, missile reports) in the form of messages have API strings attached to them, shown as a button labeled "API". If you hover over this button, you will get a string to copy and paste that will look like this: cr-en-1-5c36288ad220f5d68845c6bdd90bad979aff6409.
This string is made up of four parts which will get important later:
- the type of the report (cr)
- the community (en)
- the server number (1)
- and the report ID (5c36288ad220f5d68845c6bdd90bad979aff6409)
With these, and your access key mentioned above, you can request the report data from 3rd party tools via the following API.