Discussion Forum: Thread 339242

 Author: Speed_Bricks View Messages Posted By Speed_Bricks
 Posted: May 5, 2023 04:44
 Subject: Excessive Data Returned by Price Guide API
 Viewed: 73 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

Speed_Bricks (75)

Location:  United Kingdom, England
Member Since Contact Type Status
Jan 26, 2020 Contact Member Seller
Buying Privileges - OKSelling Privileges - OK
Store: Speed Bricks
Hello everyone,

I've been using the Bricklink API to retrieve pricing information for different
parts, and I'm having an issue with the "Price Guide" API endpoint.
The endpoint returns a lot of data, including the minimum price, maximum price,
average price, and a list of all the sales records, which can be a lot of data
to process for parts that have been sold frequently.

Ideally, I would like to retrieve just the total quantity sold and the average
price for a part, without having to parse through all the sales records.

Is there a way to retrieve just the total quantity sold and the average price
for a part, without having to parse through all the sales records? This would
greatly simplify my code and make it more efficient.

Thank you for any help you can provide.
 Author: hpoort View Messages Posted By hpoort
 Posted: May 5, 2023 12:46
 Subject: Re: Excessive Data Returned by Price Guide API
 Viewed: 39 times
 Topic: Help
Cancel Message
Cancel
Reply to Message
Reply
BrickLink
ID Card

hpoort (416)

Location:  Netherlands, Groningen
Member Since Contact Type Status
Oct 11, 2014 Contact Member Buyer
Buying Privileges - OK
In Help, Speed_Bricks writes:
  Hello everyone,

I've been using the Bricklink API to retrieve pricing information for different
parts, and I'm having an issue with the "Price Guide" API endpoint.
The endpoint returns a lot of data, including the minimum price, maximum price,
average price, and a list of all the sales records, which can be a lot of data
to process for parts that have been sold frequently.

Ideally, I would like to retrieve just the total quantity sold and the average
price for a part, without having to parse through all the sales records.

Is there a way to retrieve just the total quantity sold and the average price
for a part, without having to parse through all the sales records? This would
greatly simplify my code and make it more efficient.

Thank you for any help you can provide.

In the API, no.

An alternative: For most common parts, you could use Studio and access the JSON-data
it caches for each part. Caching is refreshed daily when you run Studio. One
file for each part, containing info about all available colors.

See the %AppData%\..\Local\Stud.io\BLBrickMetaInfo\ folder.