Mod portal API
This article is a stub, and not comprehensive. |
---|
You can help this wiki by expanding it. |
The Mod Portal API is used to both browse and download all mods available on the official Factorio mod portal. Using the API does not require any kind of authentication or account information and can be viewed simply by following the URLs below in any web browser.
https://mods.factorio.com/api/mods
More detailed information about a particular mod can be obtained by retrieving the following URL, where {name} is the mod's name field in the result object.
https://mods.factorio.com/api/mods/{name}
Endpoints
TODO!!! Note: The mod portal has been partially rewritten, and much of this section is out of date. Most of the parameters have been shifted to url path strings. Documentation needs to be updated, I'll do it soon(tm)! --Lexxy Fox (talk) 15:44, 24 February 2018 (UTC)
/api/mods
GET Parameters:
Key | Values | Description |
---|---|---|
page | {an integer} | Page number you would like to show. Makes it so you can see a certain part of the list without getting detail on all |
page_size | {an integer or 'max'} | The amount of results to show in your search |
namelist | {array of strings} | Return only mods that match the given names. |
Returns #Mod List Response
/api/mods/{mod_name}
/api/mods/{mod_name}/full
JSON Object Types
Mod List Response
Key | Type | Description |
---|---|---|
pagination | Pagination | See #Pagination |
results | Result[] | A list of mods, matching any filters you specified. |
Pagination
Key | Type | Description |
---|---|---|
count | Integer | Total number of mods that match your specified filters. |
links | Links | Utility links to mod portal api requests, preserving all filters and search queries. |
page | Integer | The current page number. |
page_count | Integer | The total number of pages returned. |
page_size | Integer | The number of results per page. |
Pagination Links
Key | Type | Description |
---|---|---|
first | String(URL) | URL to the first page of the results, or null if you're already on the first page. |
prev | String(URL) | URL to the previous page of the results, or null if you're already on the first page. |
next | String(URL) | URL to the next page of the results, or null if you're already on the last page. |
last | String(URL) | URL to the last page of the results, or null if you're already on the last page. |
Result Entry
Fields returned by the api/mods endpoint are marked with a check (✓) in the "Short" column, and those returned the the api/mods/{name} endpoint are marked with a check in the "Full" column.
Key | Type | Short | Full | Description |
---|---|---|---|---|
downloads_count | Integer | ✓ | ✓ | Number of downloads. |
latest_release | Release | ✓ | The latest version of the mod available for download. See #Releases | |
name | String | ✓ | ✓ | The mod's machine-readable ID string. |
owner | String | ✓ | ✓ | The Factorio username of the mod's author. |
releases | Release[] | ✓ | A list of different versions of the mod available for download. See #Releases | |
summary | String | ✓ | ✓ | A shorter mod description. |
title | String | ✓ | ✓ | The mod's human-readable name. |
Releases
Key | Type | Description |
---|---|---|
download_url | String | Path to download for a mod. starts with "/api" and does not include a full url |
file_name | String | The file name of the release. Always seems to follow the pattern "{name}_{version}.zip" |
info_json | Object | A copy of the mod's info.json file, only contains factorio_version |
released_at | String(ISO 8601) | ISO 6501 for when the mod was released. |
version | String | The version string of this mod release. Used to determine dependencies. |
sha1 | String | The sha1 key for the file |
Error
Key | Type | Description |
---|---|---|
detail | String |