API Function - Search

Back to API list

Get a list of Sets/MOCs/Parts that match the search criteria. Max entries returned is 1000.

URL /api/search
Method GET
Parameters key - API Key
format - How to display output data. Valid values: xml, json, csv, tsv
callback - Optional JSONP callback function name
type - Filter on only S=Sets, M=MOCs, P=Parts.
query - General search query. Search terms are additive.
theme1 - Set Filter: Theme Level 1
theme2 - Set Filter: Theme Level 2
theme3 - Set Filter: Theme Level 3
min_pieces - Set Filter: List sets with >= this number of parts.
max_pieces - Set Filter: List sets with <= this number of parts.
min_year - Set Filter: List sets released >= this year.
max_year - Set Filter: List sets released <= this year.
part_type_id - Part Filter: Only list parts with this type/category ID.
part_color - Part Filter: Only list parts that appear in this color.

Output data with fields:

  • set_id - Set ID.
  • year - Set: Year released.
  • pieces - Set: Number of parts in the set.
  • theme1 - Set: Theme category level 1.
  • theme2 - Set: Theme category level 2.
  • theme3 - Set: Theme category level 3.
  • accessory - Set: Does this set have accessory/supplemental parts.
  • kit - Set: Is this set a kit (set of sets).
  • descr - Set: Description.
  • url - Set: Rebrickable URL for the set.
  • part_id - Part: Part ID.
  • descr - Part: Part description.
  • part_type - Part: Part type description.
  • part_type_id - Part: Part type ID.
  • num_parts - Part: Number of times this part appears in all sets.
  • num_sets - Part: Number of sets this part appears in.
  • num_colors - Part: Number of colors this part appears in.
  • min_year - Part: First year this part appeared.
  • max_year - Part: Last year this part appeared.
  • url - Part: Rebrickable URL for the part.
  • img_url - Part: URL of the part image
  • img_tn - Set: URL of the thumbnail set image
  • img_sm - Set: URL of the small set image
  • img_big - Set: URL of the big set image
  • Error Codes:

  • INVALIDKEY - The API Key is invalid
  • Test Values

    API Key:
    Theme 1:
    Theme 2:
    Theme 3:
    Min Parts:
    Max Parts:
    Min Year:
    Max Year:
    Part Type ID:
    Part Color:

    Test Results