Sets API Reference

Using the Quizlet API you are able to view, add, edit, and delete sets. You can also add, edit, or delete a single term in an existing set. Viewing multiple sets is also possible.

This page only lists successful responses. For information about possible error responses, read the API Introduction.

Viewing a Single Set

MethodURIDescription
GEThttps://api.quizlet.com/2.0/sets/SET_IDReturns the set details, including all the terms.
GEThttps://api.quizlet.com/2.0/sets/SET_ID/termsReturns just the terms.

Permissions

  • Retrieving public sets requires using only a Client ID.
  • Retrieving private sets requires a read-scoped access token authorized by a user that is able to view the set.

For sets that are protected with a password, see the accessing password-protected sets section.

Expand request fields

Optional Parameters

ParameterTypeDescriptionDefault
modified_sincetimestamp If you specify this timestamp and the set has not changed, then a 304 Not Modified response will be returned with no content. -

Expand response fields

Set object

FieldTypeDescription
id integer Quizlet's unique ID for a set.
title string The title of the set, as supplied by the set's creator.
url string The public URL of the Quizlet set. If the set's title changes, the URL will change, but old URLs will properly make 301 Redirects. This string cannot contain HTML.
created_by string The username of the person who created this set. Usernames are currently limited at 25 characters and cannot contain HTML. You can make a link to the user's account by inserting their username link this: http://quizlet.com/users/USERNAME/
created_date timestamp The date/time at which the set was created. Dates are UNIX timestamps.
modified_date timestamp The date/time at which the set was last modified. Dates are UNIX timestamps.
term_count integer The number of term/definition pairs in the set.
has_images boolean True/false depending on if the set has any images.
visibility string The visibility level of this set, one of "public", "only_me", "classes", "password".
editable string The type of control about editing, one of "only_me", "classes", "password".
has_access boolean True/false depending on if the current user has access to use this set (or if using a public call, whether this is a public set).
subjects[] array Deprecated. Returns [].
description string The description of the set, as supplied by the set's creator.
has_discussion boolean true or false depending on whether discussion is enabled for this set.
lang_terms string The language code for the terms side of the card. See languages for the possible codes.
lang_definitions string The language code for the definitions. See languages for the possible codes.
terms[] array All the term objects for the set.

Term object

FieldTypeDescription
id integer The term unique identifier.
term string The actual term (front side of the card).
definition string The definition of the term.
image object An object representing the image for the term.
If there is no image associated with this term object, this will be null.

Image object

FieldTypeDescription
url string The URL linking to the associated image.
width integer The width of the image, in pixels.
height integer The height of the image, in pixels.

Image sizes

By default, the image URL provided is the "medium" size with a maximum side of 240 pixels. This is indicated in the URL with a suffix of _m.jpg.

You can change the image URL suffix to access the other sizes. The table below shows the different size available. For the examples below, we are using the fake filename of orange_picture.jpg (note in the response you would actually get the URL of orange_picture_m.jpg because the medium size is the default).

Size Dimensions Suffix Example
Thumbnail 100 pixels on longest side _t orange_picture_t.jpg
Small Square 75x75 pixels _s orange_picture_s.jpg
Medium (default) 240 pixels on longest side _m orange_picture_m.jpg
Large 500 pixels on longest side none orange_picture.jpg
Very Large 1024 pixels on longest side _b orange_picture.jpg

Images may come from different domains such as o.quizlet.com or farm1.staticflickr.com, but the size suffix (e.g. _m.jpg, etc) is standardized.

Example output

Output for https://api.quizlet.com/2.0/sets/6009523 (Note: for brevity, only the first three terms are displayed below):

Header
HTTP/1.1 200 OK
Content-Type: application/javascript
Body
{
  "id": 6009523,
  "url": "http:\/\/quizlet.com\/6009523\/french-animals-30-flash-cards\/",
  "title": "french animals 3.0",
  "created_by": "catchdave",
  "term_count": 13,
  "created_date": 1310497102,
  "modified_date": 1310497363,
  "has_images": true,
  "subjects": [
    "french",
    "animals"
  ],
  "visibility": "public",
  "editable": "only_me",
  "has_access": true,
  "has_discussion": true,
  "description": "",
  "lang_terms": "en",
  "lang_definitions": "en",
  "terms": [
    {
      "id": 190713940,
      "term": "une grenouille",
      "definition": "a frog",
      "image": {
        "url": "http:\/\/farm1.staticflickr.com\/74\/179791578_70992b1821.jpg",
        "width": 180,
        "height": 240
      }
    },
    {
      "id": 190713941,
      "term": "un crapaud",
      "definition": "a toad",
      "image": {
        "url": "http:\/\/farm4.staticflickr.com\/3267\/2874355931_da7c0bbdaa.jpg",
        "width": 240,
        "height": 213
      }
    },
    {
      "id": 190713942,
      "term": "un poisson",
      "definition": "a fish (no image)",
      "image": null
    },
    ...
  ]
}

Example output when specifying modified_since

Header
HTTP/1.1 304 Not Modified

No Body Content

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Accessing Password-Protected Sets

MethodURIDescription
POSThttps://api.quizlet.com/2.0/sets/SET_ID/passwordSubmits the password for a password-protected set

Permissions

Sets on Quizlet may have a password that is required to view and/or edit them. Once a user has entered in the correct password once, they do not need to re-enter it again (unless the owner changes the permissions or password).

Trying to view or edit a set that is password protected with a user that has not previously entered the correct password will receive a 403 - Forbidden response.

Expand request fields

To submit a password for a set, simply post the password to the /2.0/sets/SET_ID/password endpoint.

Every set that is returned from the API has three fields that will help you determine whether you need to enter a password:

  • has_access - If this is false, then the current user does not already have access to this set.
  • visibility - If this is set to "password", this means a password is required to view this set.
  • editable - If this is set to "password", this means a password is required to edit this set.

When has_access is true, this means the user already has access to the set.

Required Parameters

ParameterTypeDescription
passwordstringThe password for the set

Successful Password Response

Header
HTTP/1.1 204 No Content

No Body Content

Incorrect Password Response

Header
HTTP/1.1 401 Unauthorized
{
	"http_code": 401,
	"error": "invalid_access",
	"error_title": "Not Allowed",
	"error_description": "Password did not match"
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Viewing Multiple Sets

MethodURIDescription
GEThttps://api.quizlet.com/2.0/users/USERNAME/favoritesReturns all sets favorited by the user.
GEThttps://api.quizlet.com/2.0/users/USERNAME/setsReturns all sets created by the user.
GEThttps://api.quizlet.com/2.0/classes/CLASS_ID/setsReturns all sets that are in the class.
GEThttps://api.quizlet.com/2.0/setsReturns multiple unrelated sets.

Permissions

Permissions are the same for viewing a single set.

Expand request fields

The preferred method to retrieve multiple sets at once is to use one of:

  • https://api.quizlet.com/2.0/users/USERNAME/favorites - to view a user's favorited sets
  • https://api.quizlet.com/2.0/users/USERNAME/sets - to view a user's created sets
  • https://api.quizlet.com/2.0/classes/CLASS_ID/sets - to view sets in a class

For cases where the above three endpoints are not ideal, you can use the https://api.quizlet.com/2.0/sets endpoint with a set_ids filter.

Required Parameters

ParameterTypeDescription
set_idsstringComma-separated list of set ids to return.
Only required for https://api.quizlet.com/2.0/sets

Optional Parameters

ParameterTypeDescriptionDefault
modified_sincetimestampLimits results to sets that have been modified since the specified Unix timestamp.-

Expand response fields

An array of set objects is returned.

Set object

For full details of the set object, see the viewing a single set.

Example output

Output for https://api.quizlet.com/2.0/sets?set_ids=415,6009523 (Note: for brevity, only a few terms are displayed):

Header
HTTP/1.1 200 OK
Content-Type: application/javascript
Body
[
	{
	  "id": 6009523,
	  "url": "http:\/\/quizlet.com\/6009523\/french-animals-30-flash-cards\/",
	  "title": "french animals 3.0",
	  "created_by": "catchdave",
	  "term_count": 13,
	  "created_date": 1310497102,
	  "modified_date": 1310497363,
	  "has_images": true,
	  "subjects": [
	    "french",
	    "animals"
	  ],
	  "visibility": "public",
	  "editable": "only_me",
	  "has_access": true,
	  "has_discussion": true,
	  "description": "",
	  "terms": [
	    {
	      "id": 190713940,
	      "term": "une grenouille",
	      "definition": "a frog",
	      "image": {
	        "url": "http:\/\/farm1.staticflickr.com\/74\/179791578_70992b1821.jpg",
	        "width": 180,
	        "height": 240
	      }
	    },
	    ...
	  ]
	},
	{
	  "id": 415,
	  "url": "http:\/\/quizlet.com\/415\/four-one-five-flash-cards\/",
	  "title": "four one five",
	  "created_by": "jalenack",
	  "term_count": 50,
	  "created_date": 1144296408,
	  "modified_date": 1316216163,
	  "has_images": false,
	  "subjects": [
	    "unitedstates",
	    "states",
	    "geography",
	    "capitals"
	  ],
	  "visibility": "only_me",
	  "editable": "only_me",
	  "has_access": true,
	  "has_discussion": true,
	  "description": "List of the U.S. states and their capitals",
	  "terms": [
	    {
	      "id": 15407,
	      "term": "Montgomery",
	      "definition": "Alabama",
	      "image": null
	    },
	    ...
	}
]

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Adding Sets

MethodURIDescription
POSThttps://api.quizlet.com/2.0/setsAdds a new set

Permissions

  • Creating a set requires a write_set-scoped access token authorized by a user.
  • The authenticated user must be a Quizlet Plus user if you want to add images to a set.

You can create new sets by specifying at least two terms. You can use the edit endpoint to add or remove terms to the set at a later point.

To add images to a set, you need to upload images first. When you upload images you get back image identifier(s) which you submit in the images[] parameter. See the example in uploading images.

You can tell if a user is a PLUS member by checking account_type = "plus" when viewing the user.

Expand request fields

Required Parameters

ParameterTypeDescription
titlestringThe title of the set
terms[]arrayThe text of a new term. Specify as many terms[] parameters as needed.
definitions[]arrayThe text of a new definition. The number of definitions[] must match that of terms[].
lang_termsstringLanguage of the terms. See the list of possible languages.
lang_definitionsstringLanguage of the definitions. See the list of possible languages.

Optional Parameters

ParameterTypeDescriptionDefault
images[]array The identifier of the image for a term. If present, the number of images[] must match that of terms[]. Specify empty identifiers for terms that have no image. You get image identifiers when you upload images. -
descriptionstringA text description of the set.-
subjects[]arrayDeprecated. An array which will be ignored.-
allow_discussionboolean0 or 1. Flag of whether users are allowed to use the discussion box on this set1
visibility "public", "only_me", "classes", "password" Define who is allowed to view/use this set.
  • If set to classes, the parameter classes becomes mandatory.
  • If set to password, the parameter password becomes mandatory.
"public"
editable "only_me", "classes", "password" Define who is allowed to edit this set.
  • If set to classes, the parameter classes becomes mandatory.
  • If set to password, the parameter password becomes mandatory.
"only_me"
classes[]arrayOnly required when visibility="classes" or editable="classes".
An array of class IDs (integers) that this set is visible and/or editable for.
-
passwordstringOnly required when visibility="password" or editable="password".
The password required to view and/or edit this set.
-

Successful Response

Header
HTTP/1.1 201 Created
Location: https://api.quizlet.com/2.0/sets/NEW_SET_ID
Body
{
	"url": "http://quizlet.com/NEW_SET_ID/NEW_SET_URL_TITLE/",
	"term_count": TERM_COUNT,
	"set_id": NEW_SET_ID
}

An example

In the below example you can see a command-line CURL request to create a new set. Below the request you can see the Quizlet API response, including the success HTTP response code (201) and the API location of where the newly created set is.

curl -H "Authorization: Bearer MY_ACCESS_TOKEN" -i -X POST -F "whitespace=1" \
	-F "terms[]=lait" -F "definitions[]=milk" -F "terms[]=petits pois" \
	-F "definitions[]=peas" -F "title=My first set via the API" \
	-F "lang_terms=fr" -F "lang_definitions=en" \
	https://api.quizlet.com/2.0/sets

HTTP/1.1 201 Created
Location: http://api.quizlet.com/2.0/sets/5559169
Date: Tue, 26 Jul 2011 21:52:19 GMT
Server: Apache
Content-Length: 100
Content-Type: application/json
{
	"url": "https:\/\/quizlet.com\/5559169\/my-first-set-via-the-api-flash-cards\/",
	"term_count": 2,
	"set_id": 5559169
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Editing Sets

MethodURIDescription
PUThttps://api.quizlet.com/2.0/sets/SET_IDEdits an existing set

Permissions

  • Requires a write_set-scoped access token authorized by a user with edit permissions on the set.
  • The authenticated user must be a Quizlet Plus user if you want to add images to a set.

Modifying images in a set

To add images to an existing set, you need to upload images first. When you upload images you get back image identifiers which you submit in the images[] parameter.

If you want to modify a set, but do not want to change the images, you can simply leave off the images[] parameter alltogether. However, if you want to modify/delete/add images to a set, the images[] parameter should be set per term as follows:

  1. If you want to add or replace an image, then specify the new "image identifier".
  2. If you are not changing an image at all, then leave it blank.
  3. To delete an image the specify the word "delete" (without the quotes).

Expand request fields

Required Parameters

There are no specific required parameters - but if you do not send any parameters at all, the response will be 400-level error (as there is nothing to update).

Optional Parameters

ParameterTypeDescription
titlestringThe title of the set.
descriptionstringA text description of the set.
term_ids[]arrayThe array of term ids. For new terms, use a zero value (e.g. "term_ids[]=0"). For already-existing terms, use the term id from the term you're editing (e.g. "term_ids[]=818192"). If you don't want to replace all the terms at once, then use editing terms instead.
terms[]arrayA replacement array of terms. If you don't want to replace all the terms at once, then use editing terms instead.
definitions[]arrayA replacement array of definitions. If present, the length of this array must match the terms array. If you don't want to replace all the definitions at once, then use editing terms instead.
images[]arrayA replacement array of image identifiers. If present, the length of this array must match the terms array. See the notes above for details about replacing images. If you don't want to replace all the images at once, then use editing terms instead.
subjects[]arrayDeprecated. An array which will be ignored.
allow_discussionboolean0 or 1. Flag of whether users are allowed to use the discussion box on this set.
visibility "public", "only_me", "classes", "password" Define who is allowed to view/use this set.
  • If set to classes, the parameter classes becomes mandatory.
  • If set to password, the parameter password becomes mandatory.
editable "only_me", "classes", "password" Define who is allowed to edit this set.
  • If set to classes, the parameter classes becomes mandatory.
  • If set to password, the parameter password becomes mandatory.
classes[]arrayOnly required when visibility="classes" or editable="classes".
An array of class IDs (integers) that this set is visible and/or editable for.
passwordstringOnly required when visibility="password" or editable="password".
The password required to view and/or edit this set.
lang_termsstringLanguage of the terms. See the list of possible languages.
lang_definitionsstringLanguage of the definitions. See the list of possible languages.

How editing sets works

When you add a terms (and optionally definition and/or image) array using this endpoint, you will replace all the terms in the set with what you posted. Furthermore, if you want to change terms or definitions, you must submit at least all three of term_ids[], terms[] and definitions[] and they MUST be the same size and in the same order.

If you want to add, edit, or delete one or more individual terms, then see editing terms below.

Successful Response

Header
HTTP/1.1 200 OK
Body
{
	"url": "http://quizlet.com/SET_ID/SET_URL_TITLE/",
	"term_count": TERM_COUNT
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Editing Single Terms

MethodURIDescription
POSThttps://api.quizlet.com/2.0/sets/SET_ID/termsAdds a new term
PUThttps://api.quizlet.com/2.0/sets/SET_ID/terms/TERM_IDEdits an existing term
DELETEhttps://api.quizlet.com/2.0/sets/SET_ID/terms/TERM_IDDeletes an existing term

Permissions

  • Requires a write_set-scoped access token authorized by a user with edit permissions on the set.

Expand request fields

You can add, edit and delete individual terms in a set by using the three endpoints outlined above.

When editing an existing term, you must specify at least one parameter but you do not need to specify both.

Required Parameters

ParameterTypeDescription
termstringThe actual term (front side of card).
definitionstringThe definition of the term.
imagestringThe identifier of the image for the term. You get image identifiers when you upload images.

Successful Add Response

Header
HTTP/1.1 201 Created
Location: https://api.quizlet.com/2.0/sets/SET_ID/terms/TERM_ID

No Body Content

Successful Edit or Delete Response

Header
HTTP/1.1 204 No Content

No Body Content

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Deleting Sets

MethodURIDescription
DELETEhttps://api.quizlet.com/2.0/sets/SET_IDDeletes a set

Permissions

  • Requires a write_set-scoped access token authorized by the creator of the set.

No parameters are required.

Successful Response

Header
HTTP/1.1 204 No Content

No Body Content

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.
Create Set