Page 1 of 1

Help Documents API?

Posted: Thu Jan 23, 2025 4:32 pm
by DocHoss333
Hi Factorio devs, you've devoured a ton of my life over the past few years and I thank you for it! I work in tech and would like to use the new (well, new-ish at this point) AI craze to build a mod or standalone site to use an LLM to help Factorio players build better factories. I would love to have either a structured set of data for all the craftable items in the game, or even an API that may have that information exposed as REST endpoints. The wiki is great, but not easily digestible by a model...certainly doable, but if that data already exists (as it does in the game), perhaps there's an easier way. Does that data set exist? If not, is there any hope of an API?

Re: Help Documents API?

Posted: Thu Jan 23, 2025 5:04 pm
by eugenekay
All of the Lua prototype data is available on GitHub. The Lua API itself offers necessary context for what each property does.

You may also want to investigate the Blueprint string format as the easiest way to get Designs in/out of the game.

Good luck!

Re: Help Documents API?

Posted: Fri Jan 24, 2025 4:06 am
by robot256
Run factorio with the command line argument "--dump-data". The game will create a json file with all the prototype data at the end of the loading process for the currently enabled set of mods.

There are also mods on the mod portal that can produce customized data dumps.