Mod portal API: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
Lexxy Fox (talk | contribs)
Sevens7 (talk | contribs)
Result Entry: latest_release does not appear as a Release object in the search api response
 
(83 intermediate revisions by 18 users not shown)
Line 1: Line 1:
<div align="center" class="stub">'''Category:''' [[Factorio_HTTP_API_usage_guidelines#Internal|Internal API]]</div>
The Mod Portal API is used to both browse and download all mods available on the [https://mods.factorio.com/ 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.
The Mod Portal API is used to both browse and download all mods available on the [https://mods.factorio.com/ 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.


Line 7: Line 9:
<code>https://mods.factorio.com/api/mods/{name}</code>
<code>https://mods.factorio.com/api/mods/{name}</code>


== Object Types ==
To get even more information about a mod, you can use the following URL.
 
<code>https://mods.factorio.com/api/mods/{name}/full</code>
 
List of bookmarked mods can be accessed from following URL (requires authentication).
 
<code>https://mods.factorio.com/api/bookmarks?username={username}&token={token}</code>
 
You can also toggle a bookmark using following URL, with <code>state</code> being <code>on</code> or <code>off</code>.
 
<code>https://mods.factorio.com/api/bookmarks/toggle?username={username}&token={token}&mod={name}&state={state}</code>
 
== Endpoints ==


=== Result Entry ===
=== /api/mods ===


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.
GET Parameters (sent as query parameters):


{| class="wikitable"
{| class="wikitable"
! Key !! Type !!+ style='writing-mode:vertical-lr;vertical-align:bottom;font-size:90%' | Short !!+ style='writing-mode:vertical-lr;vertical-align:bottom;font-size:90%' | Full !! Description
! Key !! Values !! Description
|-
| <code>hide_deprecated</code> || Boolean? || Whether to exclude incompatible mods from the results. Defaults to true if absent
|-
|-
| created_at || String(ISO 8601) || ✓ || ✓
| <code>page</code> || Integer? || Page number to fetch, ignored for <code>page_size="max"</code> queries. Defaults to 1 when absent
| The datetime the mod was uploaded, in the full ISO 8601 format, with a space separator instead of 'T'.
|-
|-
| current_user_rating || Null || ✓ || ✓
| <code>page_size</code> || (Integer <nowiki>&#124;</nowiki> <code>"max"</code>)? || The amount of results to show per page, or all results when passed <code>"max"</code>. Defaults to 25 when absent
| Doesn't seem to be implemented yet.
|-
|-
| description || String || || ✓
| <code>sort</code> || String? (one of <code>"name"</code>, <code>"created_at"</code> or <code>"updated_at"</code>) || Sort results by this property. Defaults to <code>"name"</code> when absent. Ignored for <code>page_size=max</code> queries
| A longer description of the mod, in text only format.
|-
|-
| description_html || String(HTML) || || ✓
| <code>sort_order</code> || String? (either <code>"asc"</code> or <code>"desc"</code>) || Sort results ascending or descending. Defaults to <code>"desc"</code> when absent. Ignored for <code>page_size="max"</code> queries
| A longer description of the mod, with HTML tags.
|-
|-
| downloads_count || Integer || ✓ || ✓
| <code>namelist</code> || String[]? || Return only mods that match the given names. Response will include <code>releases</code> instead of <code>latest_release</code>
| Number of downloads.
|-
|-
| first_media_file || Object || ✓ ||  
| <code>version</code> || Factorio Version String (e.g. <code>"2.0.76"</code>) || Mods incompatible with this Factorio version are marked as deprecated and hidden for <code>hide_deprecated=true</code> queries.
| The first media file in the "media_files" list.
|}
 
 
Returns [[#Mod List Response]]
 
=== /api/mods/{mod_name} ===
 
Return short information of a specific mod.
 
See [[#Result Entry]], "Short" column.
 
=== /api/mods/{mod_name}/full ===
 
Returns more information of a mod.
 
See [[#Result Entry]], "Full" column.
 
=== /api/bookmarks ===
 
Returns array of mod names
 
=== /api/search ===
POST Parameters (sent as json content):
 
{| class="wikitable"
! Keys !! Values !! Descrption
|-
|-
| game_versions || String[] || ✓ || ✓
| <code>version</code> || Factorio Version String (e.g. <code>"2.0.76"</code>) || The version of Factorio to search mods for, mods incompatible with this version are marked as "deprecated"
| A list of major Factorio version strings (e.g. "0.13") starting with 0.13 that the mod is compatible with, ''in addition to'' the version(s) found in "latest_release" / "releases".
|-
|-
| github_path || String || ✓ || ✓
| <code>lang</code> || Locale Identifier? || No effect on response
| A link to the mod's github project page, just prepend "github.com/". Can be blank ("").
|-
|-
| homepage || String || ✓ || ✓
| <code>is_space_age</code> || Boolean? || No effect on response
| Usually a URL to the mod's main project page, but can be any string.
|-
|-
| id || Integer || ||
| <code>username</code> || String || factorio.com account username to use for the query
| A numerical mod ID used to identify the mod in other API endpoints.
|-
| <code>token</code> || String || factorio.com account token to use for the query
|-
|-
| latest_release || Object || ✓ ||
| <code>query</code> || String? || The string to filter by, empty or absent does not filter
| The latest version of the mod available for download. See [[#Releases]]
|-
|-
| license_flags || Integer(11 bit) || ✓ ||
| <code>sort_attribute</code> || [[#Sort Attribute|Sort Attribute]]? || The attribute to sort the results by. Defaults to <code>"relevancy"</code> if absent
| A bit field describing what permissions the mod's license grants. See [[#License Flags]]
|-
|-
| license_name || String || ✓ || ✓
| <code>only_bookmarks</code> || Boolean? || Whether to filter results down to only mods bookmarked by the account given by <code>username</code> and <code>token</code>. Defaults to false if absent
| The mod's license name.
|-
|-
| license_url || String || ✓ || ✓
| <code>show_deprecated</code> || Boolean? || Whether to show mods incompatible with the Factorio version specified with <code>version</code>. Defaults to false if absent
| A URL link to the full license agreement. Can be any string in case of custom licenses.
|-
|-
| media_files || Object[] || || ✓
| <code>highlight_pre_tag</code> || String? || A string to place in front of the matched text for <code>query</code>, defaults to <code>"&lt;em&gt;"</code> if absent. If <code>query</code> is empty or absent, value is ignored
| A list of media files, such as screen shots of the mod in action. See [[#Media Files]].
|-
|-
| name || String || ✓ || ✓
| <code>highlight_post_tag</code> || String? || A string to place behind the matched text for <code>query</code>, defaults to <code>"&lt;/em&gt;"</code> if absent. If <code>query</code> is empty or absent, value is ignored
| The mod's machine-readable ID string.
|-
|-
| owner || String || ✓ || ✓
| <code>expansion</code> || String[]? || A whitelist of expansion(s) to filter mods with (currently the only valid value is <code>"space-age"</code>)
| The Factorio username of the mod's author.
|-
|-
| ratings_count || 0 || ✓ || ✓
| <code>exclude_expansion</code> || String[]? || A blacklist of expansion(s) to filter mods with (currently the only valid value is <code>"space-age"</code>)
| Doesn't seem to be implemented yet.
|-
|-
| releases || Object[] || || ✓
| <code>category</code> || [[Mod_details_API#Category|Category]][]? || A whitelist of categories to filter mods with
| A list of different versions of the mod available for download. See [[#Releases]]
|-
|-
| summary || String || ✓ || ✓
| <code>exclude_category</code> || [[Mod_details_API#Category|Category]][]? || A blacklist of categories to filter mods with
| A shorter mod description.
|-
|-
| tags || Object[] || ✓ || ✓
| <code>tag</code> || [[Mod_details_API#Tags|Tag]][]? || A whitelist of tags to filter mods with
| A list of tag objects that categorize the mod.
|-
|-
| title || String || || ✓
| <code>exclude_tag</code> || [[Mod_details_API#Tags|Tag]][]? || A blacklist of tags to filter mods with
| The mod's human-readable name.
|-
|-
| updated_at || String(ISO 8601) || ✓ || ✓
| <code>page</code> || Integer || Page number you would like to show, ignored for <code>page_size="max"</code> queries
| The datetime the mod was last updated, in the full ISO 8601 format, with a space separator instead of 'T'.
|-
|-
| visits_count || Integer || ✓ || ✓
| <code>page_size</code> || Integer or <code>"max"</code> ||The amount of results to show per page, or all results when passed <code>"max"</code>
| The number of times the mod was viewed, but perhaps only counted on the web interface???
|}
|}


=== License Flags ===
== JSON Object Types ==


The "license_flags" is an 11 bit number that describe generally what permissions the mod's license grants.
=== Sort Attribute ===


{| class="wikitable"
{| class="wikitable"
! 2<sup>n</sup> !! Title !! Description
|-
|-
! colspan=3 | Permissions
! Attribute !! Sort By
|-
|-
| 0 || Commercial Use || This software and derivatives may be used for commercial purposes
| <code>"relevancy"</code> || Seemingly identical to <code>"last_updated_at"</code>
|-
|-
| 1 || Modification || The software may be modified.
| <code>"most_downloads"</code> || Download count
|-
|-
| 2 || Distribution || You may distribute this software.
| <code>"last_updated_at"</code> || Most recently updated
|-
| <code>"trending"</code> || Internal metric
|}
 
=== Mod List Response ===
 
{| class="wikitable"
! Key !! Type !! Description
|-
|-
| 3 || Patent Use || This license provides an express grant of patent rights from the contributor to the recipient.
| <code>pagination</code> || [[#Pagination|Pagination]] || See [[#Pagination]]
|-
|-
| 4 || Private Use || You may use and modify the software without distributing it.
| <code>results</code> || [[#Result Entry|Result]][] || A list of mods, matching the filters specified by the query
|}
 
=== Pagination ===
 
{| class="wikitable"
! Key !! Type !! Description
|-
|-
! colspan=3 | Conditions
| <code>count</code> || Integer || Total number of mods that match your specified filters.
|-
|-
| 5 || Disclose Source || Source code must be made available when distributing the software.
| <code>links</code> || [[#Pagination_Links|Links]]? || Utility links to mod portal api requests, preserving all filters and search queries. Absent from the <code>/api/search</code> endpoint response
|-
|-
| 6 || License & Copyright Notice || Include a copy of the license and copyright notice with the code.
| <code>page</code> || Integer || The current page number.
|-
|-
| 7 || Same License || Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used.
| <code>page_count</code> || Integer || The total number of pages returned.
|-
|-
| 8 || State Changes || Indicate changes made to the code.
| <code>page_size</code> || Integer || The number of results per page.
|}
 
=== Pagination Links ===
 
{| class="wikitable"
! Key !! Type !! Description
|-
|-
! colspan=3 | Limitations
| <code>first</code> || String(URL) || URL to the first page of the results, or <code>null</code> if you're already on the first page
|-
| <code>prev</code> || String(URL) || URL to the previous page of the results, or <code>null</code> if you're already on the first page
|-
|-
| 9 || Hold Liable || Software is provided without warranty and the software author/license owner cannot be held liable for damages.
| <code>next</code> || String(URL) || URL to the next page of the results, or <code>null</code> if you're already on the last page
|-
|-
| 10 || Trademark Use || This license explicitly states that it does NOT grant you trademark rights, even though licenses without such a statement probably do not grant you any implicit trademark rights.
| <code>last</code> || String(URL) || URL to the last page of the results, or <code>null</code> if you're already on the last page
|}
|}


=== Media File ===
=== Result Entry ===


A media file object describes a single image, along with a smaller thumbnail sized version of the image.
Fields returned by the api/mods endpoint are marked with a check (✓) in the "api/mods endpoint" column, those returned by the api/mods/{name} endpoint are marked with a check in the "Short" column and those returned by the api/mods/{name}/full endpoint are marked in the "Full" column. Fields may be absent if there is no data.


{| class="wikitable"
{| class="wikitable"
! Key !! Type !! Description
! Key !! Type !!+ style='writing-mode:vertical-lr;vertical-align:bottom;font-size:90%' | api/mods endpoint !!+ style='writing-mode:vertical-lr;vertical-align:bottom;font-size:90%' | Short !!+ style='writing-mode:vertical-lr;vertical-align:bottom;font-size:90%' | Full !!+ style='writing-mode:vertical-lr;vertical-align:bottom;font-size:90%' | api/search !! Description
|-
| <code>latest_release</code> || [[#Releases|Release]]? || ✓* || || ||
| The latest version of the mod available for download. <b>*Absent when the <code>namelist</code> [[#/api/mods|parameter]] is used</b>.
|-
| <code>downloads_count</code> || Integer || ✓ || ✓ || ✓ || ✓
| Number of downloads.
|-
| <code>name</code> || String || ✓ || ✓ || ✓ || ✓
| The mod's machine-readable ID string.
|-
| <code>owner</code> || String || ✓ || ✓ || ✓ || ✓
| The Factorio username of the mod's author.
|-
| <code>releases</code> || [[#Releases|Release]][] || ✓* || ✓ || ✓ ||
| A list of different versions of the mod available for download. See [[#Releases]]. <b>*Only when using <code>namelist</code> [[#/api/mods|parameter]]</b>.
|-
| <code>summary</code> || String || ✓ || ✓ || ✓ || ✓
| A shorter mod description.
|-
| <code>title</code> || String || ✓ || ✓ || ✓ || ✓
| The mod's human-readable name.
|-
| <code>category</code> || [[Mod_details_API#Category|Category]]? || ✓ || ✓ || ✓ || ✓
| A single category describing the mod. See [[Mod_details_API#Category]].
 
|-
| <code>score</code> || Integer || ✓ || ✓* || ✓* ||
| The score of the mod. <b>*Only when not 0</b>.
|-
| <code>thumbnail</code> || String(relative URL)? || || ✓ || ✓ || ✓
| The relative path to the thumbnail of the mod. For mods that have no thumbnail it may be absent or default to <code>"/assets/.thumb.png"</code>. Prepend "assets-mod.factorio.com".
|-
| <code>changelog</code> || String? || || || ✓ ||
| A string describing the recent changes to a mod.
|-
| <code>created_at</code> || String(ISO 8601) || || || ✓ || ✓
| ISO 8601 for when the mod was created. (RFC 3339 nano)
|-
| <code>updated_at</code> || String(ISO 8601) || || || ✓ || ✓
| ISO 8601 for when the mod was last updated. (RFC 3339 nano)
|-
| <code>last_highlighted_at</code> || String(ISO 8601)? || || || ✓ ||
| ISO 8601 for when the mod was last featured on the "Highlighted mods" tab. (RFC 3339 nano)
|-
| <code>description</code> || String? || || || ✓ ||
| A longer description of the mod, in text only format.
|-
| <code>source_url</code> || String? || || || ✓ || ✓
| A URL to the mod's source code.
|-
| <code>github_path</code> || String? || || || ✓ ||
| Deprecated: Use <code>source_url</code> instead. A link to the mod's github project page, just prepend "github.com/". Can be blank ("").
|-
| <code>homepage</code> || String || || || ✓ ||
| Usually a URL to the mod's main project page, but can be any string.
|-
|-
| id || Integer || A numerical ID unique to this media file.
| <code>tags</code> || [[Mod_details_API#Tags|Tag]][] || || || ✓ || ✓
| A list of tag names that categorize the mod. See [[#Mod_details_API#Tags]].
|-
|-
| width || Integer || Width of the full sized image in pixels.
| <code>license</code> || [[#License]][] || || || ✓ ||
| The license that applies to the mod. See [[#License]].
|-
|-
| height || Integer || Height of the full sized image in pixels.
| <code>deprecated</code> || Boolean || || || ✓ || ✓
| True if the mod is marked as deprecated by its owner.
|-
|-
| size || Integer || Size of the full image in bytes.
| <code>requires_space_age</code> || Boolean || ? || ? || ? || ✓
| True if the mod depends on the user having the Space Age expansion.
|-
|-
| urls || Object || URLs to the full sized image and a thumbnail, see below.
| <code>highlighted_fields</code> || Object{"name", "owner", "summary", "title"} || || || ||
| The fields that <code>query</code> field matched against, the matching text surrounded by the text specified with the <code>highlight_*_tag</code> parameters.
|}
|}


The "urls" object contains two keys: "original" that links to the original, full sized image, and "thumb" that links to a 144x144 pixel PNG image. The original image is in either PNG, JPEG, or GIF formats, with the extensions ".png", ".jpg", or ".gif". All image URLs seem to be located at https://mods-data.factorio.com/pub_data/media_files/ with a file name consisting of 12 alphanumerical characters (of the base64 alphabet) followed by the file extension. The thumbnail URL contains the same code, but instead with a file extension of ".thumb.png".
=== Releases ===


=== Releases ===
Only difference here between the api/mods/{name} endpoint and the api/mods/{name}/full endpoint is that the full one includes an array of dependencies in the info_json object.


{| class="wikitable"
{| class="wikitable"
! Key !! Type !! Description
! Key !! Type !! Description
|-
|-
| download_url || String ||
| <code>download_url</code> || String  
| Path to download for a mod. starts with "/download" and does not include a full url. See [[#Downloading Mods]]
|-
| <code>file_name</code> || String
| The file name of the release. Always seems to follow the pattern "{name}_{version}.zip"
|-
| <code>info_json</code> || Object
| A copy of the mod's info.json file, only contains factorio_version in short version, also contains an array of dependencies in full version
|-
| <code>released_at</code> || String(ISO 8601)
| ISO 8601 for when the mod was released. (RFC 3339 nano)
|-
|-
| downloads_count || Integer ||
| <code>version</code> || String
| The version string of this mod release. Used to determine dependencies.
|-
|-
| factorio_version || String ||
| <code>sha1</code> || String  
| The sha1 key for the file.
|-
| <code>feature_flags</code> || String[]?
| The feature flags this mod uses. See [https://lua-api.factorio.com/latest/types/FeatureFlags.html FeatureFlags]
|-
|}
 
=== License ===
 
{| class="wikitable"
! Key !! Type !! Description
|-
|-
| file_name || String ||
| <code>description</code> || String || A short description of the license.
|-
|-
| file_size || Integer ||
| <code>id</code> || String || The unique id of the license. For more information on each, see [[#Mod_details_API#License|License]]
|-
|-
| game_version || String ||
| <code>name</code> || String || The internal name of the license.
|-
|-
| id || Integer || A numerical ID unique to this release.
| <code>title</code> || String || The human-readable title of the license.
|-
|-
| info_json || Object ||
| <code>url</code> || String || Usually a URL to the full license text, but can be any string.
|-
|}
| released_at || String(ISO 8601) ||
 
=== Error ===
 
{| class="wikitable"
! Key !! Type
|-
|-
| version || String ||
| <code>message</code> || String
|}
|}
== Downloading Mods ==
You can get the full url by appending the download_url to mods.factorio.com, but if you're not authenticated, you will be redirected to mods.factorio.com/login. Logging in to that would give you access to the file. Fortunately, there's a better way to do this. Simply adding username and token parameters to the download url will prevent the redirecting and let you download the file immediately. The token can be acquired from a json file called "player-data.json", located in the User Data directory (see [[Application_directory#User_data_directory]]). You can also get the token by using the [[Web_authentication_API | Web Authentication API]].
Example usage:
<code>https://mods.factorio.com/{download_url}?username={username}&token={token}</code>




{{Languages}}[[Category:Technical]]
[[Category:Technical]]

Latest revision as of 18:44, 28 July 2026

Category: Internal API

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}

To get even more information about a mod, you can use the following URL.

https://mods.factorio.com/api/mods/{name}/full

List of bookmarked mods can be accessed from following URL (requires authentication).

https://mods.factorio.com/api/bookmarks?username={username}&token={token}

You can also toggle a bookmark using following URL, with state being on or off.

https://mods.factorio.com/api/bookmarks/toggle?username={username}&token={token}&mod={name}&state={state}

Endpoints

/api/mods

GET Parameters (sent as query parameters):

Key Values Description
hide_deprecated Boolean? Whether to exclude incompatible mods from the results. Defaults to true if absent
page Integer? Page number to fetch, ignored for page_size="max" queries. Defaults to 1 when absent
page_size (Integer | "max")? The amount of results to show per page, or all results when passed "max". Defaults to 25 when absent
sort String? (one of "name", "created_at" or "updated_at") Sort results by this property. Defaults to "name" when absent. Ignored for page_size=max queries
sort_order String? (either "asc" or "desc") Sort results ascending or descending. Defaults to "desc" when absent. Ignored for page_size="max" queries
namelist String[]? Return only mods that match the given names. Response will include releases instead of latest_release
version Factorio Version String (e.g. "2.0.76") Mods incompatible with this Factorio version are marked as deprecated and hidden for hide_deprecated=true queries.


Returns #Mod List Response

/api/mods/{mod_name}

Return short information of a specific mod.

See #Result Entry, "Short" column.

/api/mods/{mod_name}/full

Returns more information of a mod.

See #Result Entry, "Full" column.

/api/bookmarks

Returns array of mod names

/api/search

POST Parameters (sent as json content):

Keys Values Descrption
version Factorio Version String (e.g. "2.0.76") The version of Factorio to search mods for, mods incompatible with this version are marked as "deprecated"
lang Locale Identifier? No effect on response
is_space_age Boolean? No effect on response
username String factorio.com account username to use for the query
token String factorio.com account token to use for the query
query String? The string to filter by, empty or absent does not filter
sort_attribute Sort Attribute? The attribute to sort the results by. Defaults to "relevancy" if absent
only_bookmarks Boolean? Whether to filter results down to only mods bookmarked by the account given by username and token. Defaults to false if absent
show_deprecated Boolean? Whether to show mods incompatible with the Factorio version specified with version. Defaults to false if absent
highlight_pre_tag String? A string to place in front of the matched text for query, defaults to "<em>" if absent. If query is empty or absent, value is ignored
highlight_post_tag String? A string to place behind the matched text for query, defaults to "</em>" if absent. If query is empty or absent, value is ignored
expansion String[]? A whitelist of expansion(s) to filter mods with (currently the only valid value is "space-age")
exclude_expansion String[]? A blacklist of expansion(s) to filter mods with (currently the only valid value is "space-age")
category Category[]? A whitelist of categories to filter mods with
exclude_category Category[]? A blacklist of categories to filter mods with
tag Tag[]? A whitelist of tags to filter mods with
exclude_tag Tag[]? A blacklist of tags to filter mods with
page Integer Page number you would like to show, ignored for page_size="max" queries
page_size Integer or "max" The amount of results to show per page, or all results when passed "max"

JSON Object Types

Sort Attribute

Attribute Sort By
"relevancy" Seemingly identical to "last_updated_at"
"most_downloads" Download count
"last_updated_at" Most recently updated
"trending" Internal metric

Mod List Response

Key Type Description
pagination Pagination See #Pagination
results Result[] A list of mods, matching the filters specified by the query

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. Absent from the /api/search endpoint response
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 "api/mods endpoint" column, those returned by the api/mods/{name} endpoint are marked with a check in the "Short" column and those returned by the api/mods/{name}/full endpoint are marked in the "Full" column. Fields may be absent if there is no data.

Key Type api/mods endpoint Short Full api/search Description
latest_release Release? ✓* The latest version of the mod available for download. *Absent when the namelist parameter is used.
downloads_count Integer Number of downloads.
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. *Only when using namelist parameter.
summary String A shorter mod description.
title String The mod's human-readable name.
category Category? A single category describing the mod. See Mod_details_API#Category.
score Integer ✓* ✓* The score of the mod. *Only when not 0.
thumbnail String(relative URL)? The relative path to the thumbnail of the mod. For mods that have no thumbnail it may be absent or default to "/assets/.thumb.png". Prepend "assets-mod.factorio.com".
changelog String? A string describing the recent changes to a mod.
created_at String(ISO 8601) ISO 8601 for when the mod was created. (RFC 3339 nano)
updated_at String(ISO 8601) ISO 8601 for when the mod was last updated. (RFC 3339 nano)
last_highlighted_at String(ISO 8601)? ISO 8601 for when the mod was last featured on the "Highlighted mods" tab. (RFC 3339 nano)
description String? A longer description of the mod, in text only format.
source_url String? A URL to the mod's source code.
github_path String? Deprecated: Use source_url instead. A link to the mod's github project page, just prepend "github.com/". Can be blank ("").
homepage String Usually a URL to the mod's main project page, but can be any string.
tags Tag[] A list of tag names that categorize the mod. See #Mod_details_API#Tags.
license #License[] The license that applies to the mod. See #License.
deprecated Boolean True if the mod is marked as deprecated by its owner.
requires_space_age Boolean ? ? ? True if the mod depends on the user having the Space Age expansion.
highlighted_fields Object{"name", "owner", "summary", "title"} The fields that query field matched against, the matching text surrounded by the text specified with the highlight_*_tag parameters.

Releases

Only difference here between the api/mods/{name} endpoint and the api/mods/{name}/full endpoint is that the full one includes an array of dependencies in the info_json object.

Key Type Description
download_url String Path to download for a mod. starts with "/download" and does not include a full url. See #Downloading Mods
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 in short version, also contains an array of dependencies in full version
released_at String(ISO 8601) ISO 8601 for when the mod was released. (RFC 3339 nano)
version String The version string of this mod release. Used to determine dependencies.
sha1 String The sha1 key for the file.
feature_flags String[]? The feature flags this mod uses. See FeatureFlags

License

Key Type Description
description String A short description of the license.
id String The unique id of the license. For more information on each, see License
name String The internal name of the license.
title String The human-readable title of the license.
url String Usually a URL to the full license text, but can be any string.

Error

Key Type
message String

Downloading Mods

You can get the full url by appending the download_url to mods.factorio.com, but if you're not authenticated, you will be redirected to mods.factorio.com/login. Logging in to that would give you access to the file. Fortunately, there's a better way to do this. Simply adding username and token parameters to the download url will prevent the redirecting and let you download the file immediately. The token can be acquired from a json file called "player-data.json", located in the User Data directory (see Application_directory#User_data_directory). You can also get the token by using the Web Authentication API.

Example usage: https://mods.factorio.com/{download_url}?username={username}&token={token}