API Function - Get Part

Back to API list

Use this service to get details about a part, such as its name, number of sets it appears in, which colors it appears in, etc. Relationships provide a list of printed parts, different molds etc. External IDs provide a list of the part ids for other systems where they are different to Rebrickable, such as Bricklink, Peeron, LDraw or LEGO element IDs. If the field rebrickable_part_id exists, that means this part is not used in any Rebrickable inventories and you should use the specified part instead.

URL /api/get_part
Method GET
Parameters key - API Key
format - How to display output data. Valid values: xml, json
callback - Optional JSONP callback function name
part_id - The Part ID to look up
inc_rels - Optional flag (1 or 0) to include Part Relationships in return data (may be a lot of data for some parts)
inc_ext - Optional flag (1 or 0) to include external Part IDs (may be a lot of data for some parts due to LEGO element ids)
inc_colors - Optional flag (1 or 0) to include available part colors which can be slow for common parts (default 1).
Returns

Output data with fields:

  • part_id - Part ID
  • name - Part Name
  • year1 - Year the part first appeared in sets
  • year2 - Year the part was last seen in sets
  • category - Part category/type description
  • part_type_id - Part Type ID (matches get_part_types)
  • rebrickable_part_ids - If this field is returned, it indicates the equivalent Part ID(s) used by Rebrickable.
  • colors - Array of colors the part appears in.
  • external_part_ids - Array of related Part IDs used by external systems.
  • related_parts - Array of part relationships such as mold variants, printed parts, etc.
  • part_url - URL to the Part Details page.
  • part_img_url - URL of the main part image (tries to use most common color).
  • Error Codes:

  • INVALIDKEY - The API Key is invalid
  • NOPART - The part could not be found
  • INVALIDFORMAT - Only xml or json is supported for this call.
  • Test Values

    API Key:
    Format:
    Part ID:
    Include Relationships?:
    Include External IDs?:
    Include Part Colors?:
    Test

    Test Results