Jump to content

Issue with the New Limitation on the Classifieds Search API


Brom127
 Share

Recommended Posts

So there seems to be a new restriction on the Classifieds Search API that prevents people from paginating endlessly (in numbers, you can't skip more than 600 listings).

The issue is that to update the prices for my bot I use this API but without the name parameter, so that I group a lot of items together, instead of making a request for every single item. I do it like that to reduce the load on myself and the website, since items with - say 5 listings - would be grouped together and require way fewer requests. 

This means that I can only use parameters that are not the items name to reduce the size of resulting listings (e.g. only cosmetics, only certain quality, no killstreaks, only craftables, no australiums, certain price range, etc...). 

But all that is not enough (most of the time it is, but not always) to bring the total size of listings to below 600. 

 

An example: 

Looking for only unique miscs, that are craftable, not killstreak and only at the 1.44 ref price point results in well above 1700 buy and 1500 sell listings at the time of writing (600 is the maximum allowed). A Request could look like this:

https://backpack.tf/api/classifieds/search/v1?key=XXX&page_size=30&offers=1&slot=misc&quality=6&tradable=1&craftable=1&killstreak_tier=0&numeric=price&comparison=range&low=1.43&high=1.45

 

Now I could of course just search for each item individually, and that would solve the problem, however I am reluctant to do so since it would be inefficient (see above). Though if no solutions presents itself here, I will just do that.

Other solutions I could think of would be to increase the maximum skippable listings, or create new parameter on the classifieds api that would only result in listings created by bots being shown (I only compete with bots). That would require the actual api code to be changed though, so that seems unlikely.

 

Does anyone have any bright ideas to solve this?

Link to comment
Share on other sites

13 minutes ago, Mengh. said:

First, delete that link - your API Key is in the embedded URL even though you changed the display text of the URL.

Edited that for you. However its a good idea to change api key and regenerate user token

Link to comment
Share on other sites

There are a couple of solutions that you can go with.

 

You've said that you only compete with bots, however, should you wish to consider competing with users for the advantages of simplicity, you can rely on Nicklason's Prices.tf api.

 

If you really need to go with a custom solution in which you only consider the listings of bots to undercut bot sellers and overcut bot buyers, there are a couple of things you can go with:

  • Using class filters
  • Filtering by bot using the steamid query parameter (apply further filters on this and cache listings made by a bot; short-circuit to using that pricing when needed for an item but otherwise, do a normal search for that item)
  • Requesting on only the items you are specifically banking when searching by item name (caps the number of requests you need to make at the number of items you are banking multiplied by some scale factor as you will always receive the lowest seller and highest buyer on the first page and bots should be within the first couple of pages)

 

Link to comment
Share on other sites

13 hours ago, Mengh. said:
  • Using class filters
  • Filtering by bot using the steamid query parameter (apply further filters on this and cache listings made by a bot; short-circuit to using that pricing when needed for an item but otherwise, do a normal search for that item)
  • Requesting on only the items you are specifically banking when searching by item name (caps the number of requests you need to make at the number of items you are banking multiplied by some scale factor as you will always receive the lowest seller and highest buyer on the first page and bots should be within the first couple of pages)

 

 

so i thought a bit about your ideas

  • the class filter is problematic in that I can't really search for multi- and all-class items since then theres the original problem again. I guess I could search for single-class items with that filter and with the name parameter for all others, but this feels like a weird solution. It could work though, so I'll keep it in mind.
  • filtering by steamid wouldn't work, because that would need constant updating whenever theres a new bot
  • the last idea is the obivous solution and I might end up actually going for this, however I would be unhappy with it since I am actually banking pretty much all unique and (non-killstreak) strange items, so thats a lot of items ;)
  • I like the prices.tf thing. I have known about it before and dismissed it because I was unhappy with some of the prices, but I will have another, closer look at it
Link to comment
Share on other sites

2 hours ago, Zeus_Junior said:

Undocumented class filter is “multi”. Shows multi/all class, all class only one is not available

 

What exactly do you mean by "all class only one is not available"? That single-class items do not show up?

Link to comment
Share on other sites

4 hours ago, Brom127 said:

 

What exactly do you mean by "all class only one is not available"? That single-class items do not show up?

Meaning multi- (like the team captain) and allclass (like the antlers) both show up when searching for multi.

It is not possible to search for only all class hats, single class hats do not return when searching for multi

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...