Is there a way to automate the process of ordering from Lego's online Pick-a-Brick? I'd like to be able to go from a .csv with part IDs to a filled cart on their site, or even all the way through to a placed order. Are there any options short of using a web testing/automation framework to drive the site?

  • 1
    Considering LEGO tends to change the design of their web pages from time to time, I'm sure even a web automation will prove difficult, but I don't see any other way.
    – Joubarc
    Commented Nov 2, 2011 at 5:07

1 Answer 1


I believe that many AFOL user groups had previously been able to buy in bulk from LEGO, but I don't know if that's still an option with the release of pick-a-brick - however as Joubarc points out there are often limits on the number of different elements, as well as a group limit on the number of bricks. Couple that with the fact that the process often takes months to deliver, and it's not an easy option.

Another option would be to take it offline: the LEGO catalogue often lists Pick-a-Brick elements and has a postal order form, so you could format that up in your spreadsheet application of choice and mail it in.

Doing a quick snoop around the network traffic when adding items from Pick-a-Brick shows that currently it uses a fairly simple post to submit the details to the basket:

ba     0
bricks 4239601,1          <- ElementId,quantity
cat    UK
id     4239601,1          <- ElementId,quantity
sid    0.4886243118128015

So something could possibly be created, but as Joubarc points out, there's no guarantee that the site would continue this way.

  • 1
    Cubs do indeed have this option, but there are conditions which limit its usage. In particular, there may be a limit in terms of number of different elements, so if you have to compromise between all members of the club to select the elements you'll order, it means most of the time you may not be able to get exactly what you want. And of course, while the club may be able to send a csv file (I'm not even sure about that), they'll have their own internal process to deal with. Ha, and it takes months, too, so it's a very diffrent route from the PaB.
    – Joubarc
    Commented Nov 2, 2011 at 8:52
  • +1 for the postal form idea; I hadn't even thought of that. Another limitation with the BulkLUG route is the restriction that you aren't to resell the parts.
    – retracile
    Commented Nov 2, 2011 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.