Dataset Bricklink
Published 14th March 2011
Updated 2nd March 2012
Resources 467652

 

Bricklink is an unofficial lego marketplace. Essentially it is the EBay for lego, where you can buy or sell anything to do with Lego. The lego community maintain a number of fantastic resources that catalogue all of the Lego products, often down to the detail of the number, colour and type of each part in a lego set. The catalogue that powers the Bricklink website is available for download and reuse and has been used to create this dataset.

Currently the dataset consists of descriptions of over 9000 Lego sets and over 23,000 Lego parts. A number of the lego sets have detailed inventories including number, type and colour of parts. There are also links to sets, instructions and part images.

 

Explore the dataset
Default APIs

SPARQL Endpoint

Use the SPARQL 1.1 query language to perform structured queries against a dataset. Useful for performing precise queries against a dataset whose structure you understand.

Sample queries

Change <http://data.kasabi.com/dataset/bricklink/set/MYSET/inventory> to have your set id.

Query: 
select ?partid ?quantity where { <http://data.kasabi.com/dataset/bricklink/set/MYSET/inventory> <http://purl.org/dc/terms/hasPart> ?part . ?part <http://data.kasabi.com/dataset/bricklink/schema/item> ?partid . ?part <http://www.w3.org/1999/02/22-rdf-syntax-ns#value> ?quantity . }
Login to test this query using our experimental API explorer Permalink to this sample query

This query simply returns a list of lego sets, including their URI, name and identifier where the sets are all in a specific category. In this case its the "Space" category which applies to the Lego Classic space theme.

Query: 
PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX bricklink: <http://data.kasabi.com/dataset/bricklink/schema/> SELECT ?set ?id ?label WHERE { ?set a bricklink:Set; bricklink:category ?category; dcterms:identifier ?id; rdfs:label ?label. ?category skos:prefLabel "Space". }
Login to test this query using our experimental API explorer Permalink to this sample query

This query returns a list of the categories in the system that have Lego Sets in them, along with a count of how many sets there are. The results are returned in descending order, so the category with the most sets is returned first.

Query: 
PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX bricklink: <http://data.kasabi.com/dataset/bricklink/schema/> SELECT ?category (count(?set) as ?count) WHERE { ?set bricklink:category ?category; a bricklink:Set. ?category skos:prefLabel ?label; a skos:Concept. } GROUP BY ?category ORDER BY DESC(?count)
Login to test this query using our experimental API explorer Permalink to this sample query
Create a sample query

Search API

Perform a free-text search against the text fields indexed in a dataset. Useful when you want to quickly query a dataset but don't know, or need to know its structure. There is also a solr search endpoint allowing more complex queries.

Lookup API

Retrieve a description of a single resource. Useful for fetching the key properties and relationships of a single entity.

Reconciliation API

Useful for resolving names, labels or codes against a dataset in Kasabi to find links to more data. This API is compatible with the Google Refine tool.

How to Attribute This Dataset

Kasabi provides a quick and easy way to attribute a dataset from any webpage. We think attribution is an important community norm.

To directly embed an attribution message in a webpage, add a script tag that invokes our Attribution API as follows

<script
     type="text/javascript"
     src="http://api.kasabi.com/dataset/bricklink/attribution">
</script>

If you need more flexible options, then read the Attribution API documentation

External Sources

The following external sources were used in creating or compiling this dataset
  • http://bricklink.com
Contributed APIs

No Contributed APIs available