API Documentation

Using backpack.tf data on your projects couldn't be easier.


IGetUsers Returns profile information for a list of 64-bit Steam IDs


Example

Parameters

  • steamids
    • Comma-delimited list of 64 bit Steam IDs to return profile information for. Up to 100 Steam IDs can be requested.
  • format (optional)
    • Output format. json (default) or vdf.

Example JSON Return Data

{
	"response": {
		"success": 1,
		"current_time": 1346178821, // current server time
		"players": [
			{
				"steamid": "76561197960435530", // 64bit SteamID of the user
				"success": 1,
				"backpack_value": 3351.91,	// Player's last backpack value in refined
				"backpack_update": 1346163657,	// Player's last backpack update date in unix format 
				"name": "Robin",		// Player's last updated name
				"stats_tf_reputation": 1237,	// If set, player's reputation on stats.tf network
				"stats_tf_supporter": 1		// Has player joined the stats.tf steam group?
				"steamrep_scammer": true,	// If set, is the player a tagged scammer on steamrep ?
				"ban_economy": true		// If set, is the player banned from steam trading?
			},
			[...]
		]
	}
}

IGetPrices Returns price information for all priced items


Requirements

  • You will need to register for a backpack.tf API key to use this service. Get your key.

Limitations

  • You may only request the prices once every 5 minutes. If you request before 5 minutes has passed since your last request, you will receive a 403 error. You should be caching these prices on your side, a 1 hour delay before fetching new prices should be sufficient for anyone's needs.

Example

  • http://backpack.tf/api/IGetPrices/v3/?format=json&key=apikey

Parameters

  • key (required)
    • Your backpack.tf API key.
  • format (optional)
    • Output format. json (default), jsonp (requires callback query string) or vdf.
  • names (optional)
    • If you set names to 1, the API will add item names to the returned output.

Example JSON Return Data (this is far from complete, just an example on how to use the data):

{
	"response": {
		"success": 1,
		"current_time": 1362339098, // this will return the time when cache was generated
		"prices": {
			"35": { // defindex
				"11": { // quality
					"0": { // price index ( crate # or unusual effect, 0 when not used )
						"current": { // current price
							"currency": "keys",
							"value": 39,
							"value_high": 41,
							"date": 1357515306 // date when the price was updated
						},
						"previous": { // previous price
							"currency": "keys",
							"value": 37,
							"value_high": 39
						}
					}
				},
				"3": { // quality
					"0": { // price index
						"current": {
							"currency": "metal",
							"value": 0.33,
							"value_high": 0.66
						}
					}
				}
			},
			"5002": { // refined metal, useful for converting usd prices into metal
				"6": {
					"0": {
						"current": {
							"currency": "usd",
							"value": 0.39,
							"value_high": 0.42,
							"date": 1358090106
						}
					}
				}
			},							
			"5022": { // one of the crate defindex
				"6": {
					"1": { // crate #1
						"current": {
							"currency": "metal",
							"value": 1.33,
							"value_high": 1.55,
							"date": 1357515175
						}
					}
				}
			}
		}
	}
}

Note: Quality 600 is being used for uncraftable items.


Projects that use backpack.tf data