Curiator JavaScript API v0.1

The Curiator Javascript API lets you embed Curiator content in your own web pages. It is a free service, available for any web site that is free to consumers. The Curiator Javascript API is written as a jQuery plugin and is a work in progress, so if you have suggestions or requests, please feel free to reach out to .


API Key

Applications that use our API need to use an assigned API key. Using an API key enables you to monitor your application's API usage, and ensures that Curiator can contact you about your application if necessary. An API key can only be used on the domain it is registered for.

IP limit

If you call the Curiator API from a server as a REST API (eg. via curl), we recommend you restrict the use of the API key to your server IP(s). This is to prevent unauthorized use of your API key.

Getting Started

You can download a Zip with working samples from GitHub
(on your right), or you can start from scratch:

  1. Download the API jQuery plugin script:
    jquery.curiator.min.js.
  2. Download the javascript libraries our API depends on:
    jQuery library
    JSON library
  3. Get an API key (below) and go wild.

Download ZIP from GitHub

This archive contains all API files and working samples.

Our GitHub repository:
https://github.com/curiator/javascript-API


Your API Keys

You have no API keys for this account.
 

Create API Key

Example

The easiest way to get started is with a simple example. The following web page displays all artwork images of an artist.

<!DOCTYPE html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/json2/20150503/json2.min.js"></script>

<script src="//curiator.com/static/js/jquery.curiator.min.js"></script>

<script>
$(document).ready(function() {
var apiKey = 'xxxxxxx';

$('#my-div').curiatorGet({
	'key': apiKey,
	'path': '/artist',
	'username': 'takashi-murakami',
	'size': 's'
}, function(data) {
	var html = [];
	for (var i = 0; i < data.length; ++i) {
		html.push('<img src="' + data[i]['src'] + '" />');
	}

	$('#my-div').html(html.join('<br />'));
});
});
</script>
</head>


<body>
<h1>Artist images:</h1>
<div id="my-div"></div>
</body>
</html>

Documentation

Get user data by username

If no username is defined, the user will be set to the currently logged in user.

see on github
$('#my-div').curiatorGet({
	'key': apiKey,
	'path': '/profile',
	'username': 'jennie',
}, function(data) {
	//console.log(data);
});
Property
Type
Description
Allowed values
Default value
key
string
Your API key.
path
string
The path to the requested resource.
username
string
The user's username. username can be found on the user's collection eg.: curiator.com/jennie


Get user artwork collection by username.

This call returns what you see in someone's collection. If no username is defined, the user will be set to the currently logged in user.

see on github
$('#my-div').curiatorGet({
	'key': apiKey,
	'path': '/profile/collection',
	'username': 'jennie',
	'size': 's',
	'limit': 10
}, function(data) {
	var html = [];
	for (var i = 0; i < data.length; ++i) {
		html.push('<img src="' + data[i]['src'] + '" />');
	}

	$('#my-div').html(html.join('<br />'));
});
Property
Type
Description
Allowed values
Default value
key
string
Your API key.
path
string
The path to the requested resource.
size
string
The image size returned.
  • 's' (150 px x 150 px)
  • 'm' (max. 250 px wide)
  • 'l' (max. 730 px wide)
  • 'x' (max. 1000 px wide)
's'
limit
number
The max. number of images returned.
1-100
30
username
string
The user's username. username can be found on the user's collection eg.: curiator.com/jennie


Get artworks by artist username

This call returns what you see on the artist page.

see on github
$('#my-div').curiatorGet({
	'key': apiKey,
	'path': '/artist',
	'username': 'takashi-murakami',
	'size': 's',
	'limit': 10
}, function(data) {
	var html = [];
	for (var i = 0; i < data.length; ++i) {
		html.push('<img src="' + data[i]['src'] + '" />');
	}

	$('#my-div').html(html.join('<br />'));
});
Property
Type
Description
Allowed values
Default value
key
string
Your API key.
path
string
The path to the requested resource.
size
string
The image size returned.
  • 's' (150 px x 150 px)
  • 'm' (max. 250 px wide)
  • 'l' (max. 730 px wide)
  • 'x' (max. 1000 px wide)
's'
limit
number
The max. number of images returned.
1-100
30
username
string
The artist username. username can be found on the artist page eg.: curiator.com/art/takashi-murakami


Get artist profile by artist username

This call returns what you see on the artist page.

$('#my-div').curiatorGet({
	'key': apiKey,
	'path': '/artist/profile',
	'username': 'takashi-murakami',
	'size': 'l'
}, function(data) {
	var html = [];
	html.push('<img src="' + data['src'] + '" />');
	html.push('<br/><br/>');
	html.push('Name: ' + data['artist_name']);
	html.push('Country: ' + data['country']);
	$('#my-div').html(html.join('<br />'));
});
Property
Type
Description
Allowed values
Default value
key
string
Your API key.
path
string
The path to the requested resource.
size
string
The image size returned.
  • 's' (150 px x 150 px)
  • 'm' (max. 250 px wide)
  • 'l' (max. 730 px wide)
  • 'x' (max. 1000 px wide)
's'
username
string
The artist username. username can be found on the artist page eg.: curiator.com/art/takashi-murakami