Mod portal API

A place to talk about the official Factorio mod portal (https://mods.factorio.com)
Post Reply
Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Mod portal API

Post by Artentus »

Before I start I have to say I'm not really sure if this belongs here but it's the best place I could find.
This is not about the ingame lua API but the online API over at mods.factorio.com, if you think this belongs somewhere else please move.

Now to my request. I am the developer of ModMyFactory, an external tool to download and manage mods.
I am using the URL 'mods.factorio.com/api/mods/<modname>' to query information about specific mods, for example https://mods.factorio.com/api/mods/015AdvancedRadar. Back in January the mod portal underwent a huge overhaul that sadly changed this API page. Previously this page contained the tags "license_url", "github_path", "homepage" and "description", however since the update they have all been removed. The data in question is still presented on the actual mod page so it has not been removed, the API just does not provide it anymore.

I have since then searched for this information in the API to no avail. I'd like to avoid having to parse the full website for this data since it loads significantly slower then the API and causes unnecessary trafic on both your server and the users end. The desription in particular was also formatted in Markdown, which is easier to parse than the full HTML page.

That's why I'm kindly asking for this data to be added back into the API, if it is not too big of a hassle for you. It was a really useful feature, right now my users have to download mods without seeing a proper description, only the really short summary that is also shown ingame.

Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Re: Mod portal API

Post by Artentus »

Idk if noone saw this or not, but just in case I'm bumping this up.

I have people asking me about the aforementioned functionality but since I never receivd a reply here I myself still don't know what to make of this. If there are no plans to ever add this functionality back please just say so, then I will look into other options.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Mod portal API

Post by Koub »

The devs should read this, but in case they didn't, maybe you can try an alternate way getting in touch with them via email (can be found on the contact tab of the website)
Koub - Please consider English is not my native language.

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 266
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: Mod portal API

Post by Sanqui »

I have re-added the data you have asked for to the API, as well as a bunch of other goodies like the FAQ and changelog pages. You'll find it under /full, e.g.

https://mods.factorio.com/api/mods/015A ... Radar/full

Let me know if there's anything else that could be useful to you.
ovo

Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Re: Mod portal API

Post by Artentus »

Wow, thank you very much!
This is already more than what I'm asking for so I don't think I need anything else, but if I come across something I'll let you know. I don't want to bother you too much with this either.

I really appreaciate that you took the time for me, this is why I love supporting this game. Again thank you.

ukezi
Filter Inserter
Filter Inserter
Posts: 387
Joined: Sat Jul 02, 2016 11:02 pm
Contact:

Re: Mod portal API

Post by ukezi »

You could also the include the dependencies.

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 266
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: Mod portal API

Post by Sanqui »

ukezi wrote:You could also the include the dependencies.
Good point, adding!
ovo

arielbeje
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jun 29, 2018 2:17 pm
Contact:

Re: Mod portal API

Post by arielbeje »

I would've loved it if the API had a search that returned the same results as the normal search, or if the main /api/mods included the info from /full, so I could cache and search the mod portal more easily.

Before the API rework, there was an option to use mods.factorio.com/api/mods?q={query} to search, but to search for mods now requires web scraping/caching and requesting /api/mods/{modname}/full. I wrote the bot for the Discord server and would love it if I could go back to using the API to get mod info properly.

Additionally, there is no way to get the mod's thumbnail URL(even with /full), as was possible previously.

Thank you.

Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Re: Mod portal API

Post by Artentus »

I kind of agree the full mod list is currently not very search-friendly.

For example you are using a tag-system on the portal, where the tags are supposed to help find mods. However, the API doesn't make the tags available in the full list (and querying /full for every single mod would take ages, you can realistically only get that info for a single mod at a time). So the tags are effectively useless in the API.

I don't think including tags in the list would increase traffic by too much (a lot of mods have very few tags if any at all). I guess even the ingame UI could make use of tag information.

Post Reply

Return to “Mod portal Discussion”