APIs based on user tokens are insecure and will eventually be removed.

backpack.tf is rolling out a new set of web APIs based on OAuth. Web APIs based on user token authentication will be removed at some point in the near future. You are encouraged to update your app to use the new OAuth endpoints as soon as they become available. Please read the OAuth docs for more information.

Get price subscriptions GET /api/subscriptions/prices/v1

View your price subscriptions.

This API requires an access token.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • subscriptions - Items subscribed to for price alerts.
    • subscription
      • item_name - Name of the item you subscribed to.
      • appid - Subscribed item's game's id (440 for TF2).

Create price subscription PUT /api/subscriptions/prices/v1

Subscribe to an item for price changes.

This API requires an access token.

Returns 403 Forbidden if your alert cap is met. Returns 400 Bad Request if a subscription for the given item already exists.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
  • item_name - Fully qualified case-sensitive item name. You will receive price notifications only for changes to exactly this item (e.g. Massed Flies Team Captain, not Unusual Team Captain). It must be exactly the same as the name you would see on the site, so a unique Ham Shank would be Ham Shank, not Unique Ham Shank.
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • subscribed - Set if the request succeeded.

Remove price subscription DELETE /api/subscriptions/prices/v1

Remove an existing price subscription.

This API requires an access token.

Returns 404 Not Found if not subscribed to this item for price changes.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
  • item_name - Fully qualified case-sensitive item name. You will receive price notifications only for changes to exactly this item (e.g. Massed Flies Team Captain, not Unusual Team Captain). It must be exactly the same as the name you would see on the site, so a unique Ham Shank would be Ham Shank, not Unique Ham Shank.
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • unsubscribed - Set if the request succeeded.

Get listing subscriptions GET /api/subscriptions/listings/v1

View your listing subscriptions.

This API requires an access token.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • subscriptions - Items subscribed to for listing alerts.
    • subscription
      • item_name - Name of the item you subscribed to.
      • intent - Either 0 (buy orders) or 1 (sell orders).
      • appid - Subscribed item's game's id (440 for TF2).
      • blanket? - If set, this this is a blanket listing alert.
      • price? - Only set if blanket is not set.
        • currency - Currency key for this subscription. One of the currencies returned by IGetCurrencies.
        • min - Low-end price of the subscription.
        • max - High-end price of the subscription.

Create listing subscription PUT /api/subscriptions/listings/v1

Subscribe to an item's Classifieds section.

This API requires an access token.

Returns 403 Forbidden if your alert cap is met. Returns 400 Bad Request if a subscription for the given item already exists.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
  • item_name - Fully qualified case-sensitive item name. You will receive notifications only for listings posted with this exact item name (e.g. Massed Flies Team Captain, not Unusual Team Captain). It must be exactly the same as the name you would see on the site, so a unique Ham Shank would be Ham Shank, not Unique Ham Shank. Custom names (name tags) are not considered and thus not a problem.
  • intent - Either 0 (buy orders) or 1 (sell orders) to subscribe to.
  • blanket? - If set, this subscription will be a blanket listing alert. This means you will receive notifications for all listings posted that match the specified item. Either blanket or price must be set. Please do not create blanket listings for extremely common items like keys, instead (re)create listing subscriptions with a relevant price range +/- some error should the market change radically.
  • currency? - If not using a blanket price, the currency key (e.g. metal) to be used. See IGetCurrencies.
  • min - Low-end price. Decimal numbers are accepted (e.g. 1.33.) You will only receive notifications for items listed for [min, max].
  • max - High-end price. Decimal numbers are accepted (e.g. 1.33.)
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • subscribed - Set if the request succeeded.

Remove listing subscription DELETE /api/subscriptions/listings/v1

Remove an existing listing subscription.

This API requires an access token.

Returns 404 Not Found if not subscribed to this item's Classifieds section.

Documentation

Input
  • token - Your backpack.tf account's access token. (XXXXXXXX)
  • item_name - Fully qualified case-sensitive item name. You will receive notifications only for listings posted with this exact item name (e.g. Massed Flies Team Captain, not Unusual Team Captain). It must be exactly the same as the name you would see on the site, so a unique Ham Shank would be Ham Shank, not Unique Ham Shank. Custom names (name tags) are not considered and thus not a problem.
  • intent - Either 0 (buy orders) or 1 (sell orders) to unsubscribe to.
Output
  • message - If the status code is not 2xx, this contains the reason for failure.
  • unsubscribed - Set if the request succeeded.