Golang and steamAPI

Hi everyone!
Tell me please how i can create simple golang app to connect for steam store and get info and price about some game or product in selected game?

And simple example in doc.go file

But i’m not sure what methods i need to use after connect?
Thanks a lot!

It does not look like that API provides information from the Steam store. What do you mean product in selected game? Do you mean item trading?

1 Like

Yes i’m sorry
item trading
or game cost

What exactly are you wanting to do?

If you are wanting to probe the steam market for item pricing for the purpose of trading, it is against the steam TOs to use bots on the steam market.

Could you not pull data about game prices etc from steamdb.info?

I need get info about games and price
List of all games i’m getting from request http://api.steampowered.com/ISteamApps/GetAppList/v2
Now i need find cost of game by id
I found urlhttps://store.steampowered.com/api/appdetails?appids=gameid
But the responce very biggest json - i need something simple so a can not to create biggest struct on golang
just getting price in usd or eur

There are many different prices for a given appid, from the base game to dlc and packages. Are you just wanting the base game pricing?

You have to do a few tricks to get the correct pricing with the steam api depending on what pricing data your looking for.

1 Like

Yeah i need just base game pricing
i found some solution to using
request like
But response json look like this

“237110”: {
“success”: true,
“data”: {
“price_overview”: {
“currency”: “USD”,
“initial”: 1999,
“final”: 1999,
“discount_percent”: 0

in go struct it look like this

type AutoGenerated struct {
Num237110 struct {
Success bool json:"success"
Data struct {
PriceOverview struct {
Currency string json:"currency"
Initial int json:"initial"
Final int json:"final"
DiscountPercent int json:"discount_percent"
} json:"price_overview"
} json:"data"
} json:"237110"

But how correctly define universal struct on golang for this json?

Check out this example: https://play.golang.org/p/SL61Uqxc1ZI

Do note, as you are looking for base game pricing, you are going to have to determine the type of appid (game, dlc, mod, video, etc)

1 Like

Thanks a lot!!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.