Get a mod's newest file, by a stated definition of newest
get_latest_fileCheck if a newer file exists for a CurseForge mod, using newest file date by default. Filter candidates by declared game version or release type integer when needed.
Instructions
Answers 'is there a newer file for this mod than the one I am running?' Default selection is 'newest_by_file_date' (founder decision 2026-08-18). The other definitions still give different answers: 'newest_matching_game_version' restricts to files declaring a game version and then orders by fileDate; 'newest_with_release_type' restricts to a releaseType INTEGER you supply and then orders by fileDate. There is no named release/beta/alpha filter because CurseForge publishes no value table for that integer (ADR-002 §14.3 U7) and this server will not invent one. Every answer restates the ordering used, whether the default was applied, the filter applied, how many candidates were considered, and where the candidates came from. The matched file includes file_length_bytes; inspect that and file_name before treating it as a content pack. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mod_id | Yes | CurseForge numeric mod (project) id. | |
| selection | No | Which question you are asking. Defaults to newest_by_file_date. These give different answers; pass another variant only when that is the question you mean. | newest_by_file_date |
| game_version | No | Required when selection is 'newest_matching_game_version'. The game version string a candidate file must declare. This server does NOT and MUST NOT learn your server's version from Nitrado (ADR-002 §9) — you supply it. | |
| release_type | No | Required when selection is 'newest_with_release_type'. The raw releaseType integer a candidate must carry. Unmapped on purpose: CurseForge publishes no value table, so pass the integer you mean rather than a label this server would have to guess. |