Jump to content

Retrieve Config Data and Save Data location through the API


sometempaccount
 Share

Recommended Posts

I want to get the Config Data and Save Data locations for any given game through the API.

 

I've looked at the tables extensively, and the only thing related to this I've found, is the tags table which only holds boolean values, it doesn't give me an actual path.

 

So, is it possible to get this info? Or do I need to resort to web scraping?

Link to comment
Share on other sites

That data is currently not stored separately so you’ve to scrap the wikitext for the page and extract the particular section on your own.

1. Retrieve the page ID for a page based on its Steam AppID:

 https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Infobox_game&fields=Infobox_game._pageID%3DPageID%2CInfobox_game.Steam_AppID&where=Infobox_game.Steam_AppID HOLDS "1245620"&format=jsonfm

2. Retrieve the wikitext of the page with the aforementioned page ID:

https://www.pcgamingwiki.com/w/api.php?action=parse&format=json&pageid=146683&prop=wikitext

3. And then use regex or such to extract the relevant paths you’re after.

Link to comment
Share on other sites

  • 2 years later...
On 2/6/2023 at 3:26 PM, Aemony said:

That data is currently not stored separately so you’ve to scrap the wikitext for the page and extract the particular section on your own.

1. Retrieve the page ID for a page based on its Steam AppID:

 https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Infobox_game&fields=Infobox_game._pageID%3DPageID%2CInfobox_game.Steam_AppID&where=Infobox_game.Steam_AppID HOLDS "1245620"&format=jsonfm

2. Retrieve the wikitext of the page with the aforementioned page ID:

https://www.pcgamingwiki.com/w/api.php?action=parse&format=json&pageid=146683&prop=wikitext/geometry vibes

3. And then use regex or such to extract the relevant paths you’re after.

The information you shared is very useful, thanks.

Link to comment
Share on other sites

  • 1 month later...
On 2/6/2023 at 1:56 PM, Aemony said:

That data is currently not stored separately so you’ve to scrap the wikitext for the page and extract the particular section on your own.

1. Retrieve the page ID for a page based on its Steam AppID:

 https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Infobox_game&fields=Infobox_game._pageID%3DPageID%2CInfobox_game.Steam_AppID&where=Infobox_game.Steam_AppID HOLDS "1245620"&format=jsonfm

2. Retrieve the wikitext of the page with the aforementioned page ID:

https://www.pcgamingwiki.com/w/api.php?action=parse&format=json&pageid=146683&prop=wikitext

3. And then use regex or such to extract the relevant paths you’re after.
If you’re a student learning data scraping or working on a similar project for coursework, you can get professional academic guidance from MyAssignmentHelp — a trusted platform for college assignment help.

Thanks for the detailed breakdown — that makes perfect sense. Using the Cargo query to fetch the page ID via the Steam AppID, then pulling the wikitext and parsing it manually sounds like the most reliable approach given the current API limitations. I’ll follow those steps and handle the extraction with regex. Appreciate the clear example!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Found PCGamingWiki useful? Please consider making a Donation or visiting our Patreon.
  • Who's Online   0 Members, 0 Anonymous, 548 Guests (See full list)

    • There are no registered users currently online
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    1.9k
    Total Topics
    9.5k
    Total Posts
×
×
  • Create New...