The Quizlet Blog

Archive for the 'The Quizlet API' Category

FAQ: The Quizlet Flashcards API

Monday, June 29th, 2009

The Quizlet API lets developers interested in building a flashcard application use Quizlet’s vast content database of about 30 million flashcards. As the #1 flashcard library on the Internet, Quizlet has more flashcards in more subjects than anyone else, all easily searchable and downloadable. The Quizlet API lets you search for and download Quizlet flashcard sets for use in your own application. Check out what the API can do by going to the Flashcards API developer documentation.

Things you might build with the Quizlet API:

  1. Mobile applications (iPhone, Android, WebOS, Blackberry, etc.)
  2. Desktop applications (plug Quizlet into your desktop application)
  3. A screensaver
  4. A learning game
  5. A mashup with other datatypes (Youtube videos, Flickr images, etc)
  6. Your own crazy idea!

The Quizlet API is free to developers, and requires a free developer key to use. Use of the API requires your consent to our API terms of service and Branding and Attribution guidelines.

To obtain a developer key,

  1. Register for a regular Quizlet account
  2. Sign up for a developer key

Already have a key? Make sure you’re logged in, then access your API dashboard.

We can’t wait to see what you build!

FAQ: API Terms of Service

Monday, June 29th, 2009

Last modified June 30, 2009

The following Terms of Service (ToS) for the Quizlet API is subject to change at any time and for any reason, without notice, and we expect it to evolve as the API evolves. If you’re going to invest time in using this API we strongly recommend you read it and keep current with any changes. If you disagree with any of the terms of this agreement, we do not grant you a license to use the Quizlet API.

API USE

Compliance with Terms. You may use the Quizlet API, and the data, content, and information made available through the Quizlet API (”API Data”), in connection with a website or software application developed by You only in accordance with the terms and conditions of this Agreement, the Quizlet Terms of Service, the Quizlet API documentation and specifications and the developer credentials assigned to you by Quizlet. Quizlet may monitor Your use of the Quizlet API to ensure quality, improve Quizlet products and services, and verify Your compliance with these terms. You shall not interfere with such monitoring or otherwise obscure from Quizlet Your use of the Quizlet API.

Attribution and Branding. Your Application shall provide proper attribution to Quizlet as specified in the Quizlet API Brand Guidelines, which may be modified by Quizlet at any time. Quizlet grants You a non-exclusive license to use the Quizlet Brand assets solely in connection with their display on or through the API implementation as delivered by Quizlet. Quizlet may terminate Your license to use the Quizlet Brand at any time for any reason.

Caching. Since Quizlet data is constantly being updated, your Quizlet API implementation may cache Quizlet data for a maximum of 48 hours, after which it must be deleted off your servers. For implementations where users may not have a constantly accessible internet connection, such as some mobile devices, you must use commercially reasonable efforts to delete cached data as soon as practicable.

Usage and Quotas. Quizlet may, in its sole discretion, set a quota of operations on Your Quizlet API usage. You shall not attempt to circumvent automated use-quota restrictions. Quizlet is committed to open access to our API for commercial and non-commercial purposes. However, providing the API does have real costs for Quizlet. For uses of Quizlet API over a certain rate or for certain types of commercial applications, Quizlet reserves the right to charge fees for future use of or access to the Quizlet API.

PROHIBITIONS

Your Quizlet API implementation will not, and You will not encourage or create functionality for Your users or other third parties to:

  1. interfere or attempt to interfere in any manner with the proper workings of the Quizlet API, or create or distribute any API implementation that adversely affects the functionality or performance of Quizlet or services provided by Quizlet;
  2. sell, lease, lend, convey, redistribute, or sublicense to any third party all or any portion of the Quizlet API or Quizlet API Data;
  3. modify or replace the text, images, or other content of the Quizlet API data;
  4. use the Quizlet API intentionally to encourage or promote copyright infringement or the exploitation of copyright-infringing materials;
  5. misrepresent your identity when registering for use of the Quizlet API, use the developer credentials licensed to a different individual or entity, create multiple developer accounts, or mask Your usage of the Quizlet API;
  6. build an implementation which solely showcases the content of a single Quizlet user, if You are not that user.

ADDITIONAL LEGAL PROVISIONS

  1. Compliance with Laws. You are responsible for complying with all applicable laws, rules and regulations, all third-party rights and all Quizlet policies. You shall not use the Quizlet API in a manner that violates such laws, rules and regulations, third parties’ rights or any Quizlet policies or in a manner that is deceptive, unethical, false or misleading.
  2. No Implied Rights. Except as expressly granted herein, neither party through this Agreement grants the other party any intellectual property rights or other propriety rights. Quizlet retains all intellectual property rights (including all patent, trademark, copyright, trade secret, and other proprietary rights) in and to the Quizlet data and intellectual property. All license rights granted herein are not sublicensable, transferable or assignable.
  3. Non-exclusive. This Agreement is a non-exclusive agreement. You acknowledge that Quizlet may be developing and may develop products or services that may compete with your (or any other) Quizlet API implementation.
  4. Publicity. You agree that Quizlet may use Your company, organization, or product name and/or logo in presentations, marketing materials, website listings, and other marketing-related activities. You may not issue any public announcement regarding Your use of the Quizlet API without Quizlet’s prior review and approval.
  5. Confidentiality. You shall not disclose Your developer credentials to any third party except Your agent(s) using such information solely on Your behalf in accordance with this Agreement. You shall not disclose Quizlet Confidential Information to any third party without Quizlet’s prior written consent.
  6. Indemnification. You shall indemnify, defend and hold Quizlet, its agents, affiliates, and licensors harmless from any claim, costs, losses, damages, liabilities, judgments and expenses (including reasonable fees of attorneys and other professionals), arising out of or in connection with any claim, action or proceeding (any and all of which are “Claims”) by a third party arising out of Your use of the Quizlet API in any manner that breaches this Agreement or otherwise arising out of materials or technology contributed by You and not by Quizlet.
  7. Termination. Any licenses contained in this Agreement will terminate automatically without notice if You fail to comply with any provision of this Agreement. Quizlet reserves the right to terminate this Agreement or discontinue your use of the Quizlet API or any portion or feature thereof for any or no reason and at any time. Upon any termination or notice of any discontinuance, You shall immediately stop and thereafter desist from using the Quizlet API and delete all API Data in Your possession or control (including, without limitation, from Your servers).
  8. Modification. Quizlet may modify any of the terms and conditions contained in this Agreement at any time and in its sole discretion by posting a change notice to Your account, changing these terms and conditions, emailing to the email address of Your account or account associated with Your developer credentials or otherwise notifying You. IF ANY MODIFICATION IS UNACCEPTABLE TO YOU, YOUR ONLY RECOURSE IS TO TERMINATE THIS AGREEMENT. YOUR CONTINUED USE OF THE QUIZLET API, CONTINUED POSSESSION OF A COPY OF NON-PUBLIC QUIZLET API DOCUMENTATION AND SPECIFICATIONS OR CONTINUED DEVELOPMENT FOLLOWING POSTING OF A CHANGE NOTICE OR NEW AGREEMENT ON OUR SITE WILL CONSTITUTE BINDING ACCEPTANCE OF THE CHANGE.
  9. Disclaimer and Limitation of Liability. QUIZLET DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, FOR NONINFRINGEMENT, MERCHANTABILITY AND FITNESS FOR ANY PURPOSE. QUIZLET SHALL HAVE NO DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, EXEMPLARY, PUNITIVE, OR OTHER LIABILITY WHETHER IN CONTRACT, TORT OR ANY OTHER LEGAL THEORY, UNDER THIS AGREEMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH LIABILITY AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. IN THE EVENT THAT THE FOREGOING IS NOT ENFORCEABLE, QUIZLET’S AGGREGATE LIABILITY UNDER THIS AGREEMENT IS LIMITED TO FIVE HUNDRED DOLLARS ($500.00).
  10. Release. You hereby release and covenant not to sue Quizlet and its corporate affiliates and any of their officers, directors, employees, agents, shareholders, licensors, licensees, assigns or successors, for any and all damages, liabilities, causes of action, judgments, and claims (a) pertaining to any intellectual property You develop that is based on, uses, or relates to the Quizlet API; and (b) which otherwise may arise in connection with Your use of, reliance on, or reference to the Quizlet API. If You have a dispute with one or more Quizlet account owners, You release Quizlet and its corporate affiliates and any of their officers, directors, employees, agents, shareholders, licensors, licensees, assigns or successors, for any and all damages, liabilities, causes of action, judgments, and claims arising out of or in any way connected with such disputes. If You are a California resident, You waive California Civil Code 1542 which says: “A general release does not extend to claims which the creditor does not know or suspect to exist in his favor at the time of executing the release, which if known by him must have materially affected his settlement with the debtor.”

FAQ: API Branding and Attribution

Monday, June 29th, 2009

Attribution

Use of the Quizlet API requires the use of Quizlet branding. You must use one of the methods below when displaying Quizlet content.

Powered by Quizlet.com

Attribution Rules

  1. Quizlet API users may only use the Quizlet badges above. When Quizlet content is embedded in a web browser, the badge must link to http://quizlet.com/. It may be left unlinked in non-web applications.
  2. Do not change the mark in any way. Do not remove, obstruct, distort, or alter any element of a Quizlet trademark. This includes modifying the Quizlet wordmark.
  3. Make sure the Quizlet badge is full and clearly visible, never altered or partially covered.
  4. Don’t display the Quizlet badge as the most prominent element on your web page.
  5. Do not use the Quizlet badge in ways that (1) imply an association with or endorsement of any other product, service, event, sponsorship, or organization; (2) can be reasonably interpreted to suggest editorial content was authored by Quizlet; or (3) represent the views or opinions of Quizlet or Quizlet personnel without prior written permission from Quizlet. All of the aforementioned usages must be approved via written permission.
  6. Do not adopt marks, logos, slogans, or designs that are confusingly similar to the Quizlet trademarks or imitate Quizlet’s trade dress, including the look and feel of Quizlet web design properties, Quizlet brand packaging, distinctive color combinations, typography, graphic designs, product icons, or imagery associated with Quizlet.
  7. Do not register the Quizlet trademarks as second-level domain names or incorporate Quizlet trademarks into your own product name, service names, trademarks, logos, or company names.
  8. Never display a Quizlet trademark in a manner that is misleading, unfair, defamatory, infringing, libelous, disparaging, obscene or otherwise objectionable to Quizlet.
  9. Never display a Quizlet trademark on any web site or user interface that contains or displays adult content, promotes gambling, promotes violence, contains hate speech, involves the sale of tobacco or alcohol to persons under twenty-one years of age, violates other applicable laws or regulations or is otherwise objectionable.

FAQ: Flashcard API Developer Documentation

Tuesday, June 16th, 2009

Using this simple JSON API, you can find and download flashcard sets on Quizlet. For now, this API only returns publicly available sets, and cannot incorporate user credentials to view privately created sets. Results are regular JSON encoded UTF-8 strings, so pass\u00e9 represents passé. All the data you need (including terms inside a set via the extended=on parameter) is available via this API.

Remember, to use this API, you must agree to API terms of service and the API Branding Guidelines.

The API developer dashboard lets you obtain a developer key or see usage statistics for your application. You must be a registered Quizlet user to access this page.

This page documents version 1.0 of the Quizlet API.

The base URL for Quizlet’s Set API is
http://quizlet.com/api/1.0/sets

 

Request Parameters

Parameter Type / Options Description Default
dev_key string required The developer key you acquired here. None
q string required Defines the query used to search the Quizlet database. Any public set with a matching title or subjects will be returned. This search is case-insensitive.

You can use special prefixes to return sets that match things other than the title or subjects.

  • term:” gets all sets that have a term inside them that equals the query. For example, use “term:California” to get all sets that define California. Additionally, you can find sets that specify a term/definition pair (such as California and Sacramento). Use the query “term:california=sacramento” to find those sets.
  • creator:” The Quizlet username of a user. Use a query like “creator:jalenack” to return jalenack’s public sets.
  • ids:” A comma-separated list of set ID numbers (one or more). You might know set id numbers from previous searches or from the regular website, where an id can be pulled out of a set url: http://quizlet.com/415/ us-capitals-flash-cards.

You can combine prefixes and keyword searches, much the way you might query for “capitals site:quizlet.com” on Google. So to search for a set with “capitals” in its title which contains a “California” term and that was created by “jalenack”, you can use “capitals creator:jalenack term:california”; Multiple search types are considered an “AND” operation, meaning a result must match all conditions. Also, because the “term” prefix can include any characters, you should put it last.

None
callback string optional A javascript function name for use inside a web application, using the JSON-P method. callback=foo will wrap the response in the foo function: foo({...data...}) None
sort “most_studied”, “alphabetical”, “most_recent” optional Determines how to sort the results. “most_studied”
whitespace “on”, “off” optional Add this parameter (&whitespace=on) to properly indent and space the results for easier human reading of the raw results. This can make testing/debugging easier, and has no effect on the results. Without this parameter, Quizlet will minimize whitespace and network traffic. “off”
page integer optional The page offset. By default, search returns the first page of results, but you can get any page up to the maximum total_pages returned in any result set. 1 (one)
per_page integer optional The number of results to show per page. Minimum: 1 / Maximum: 50. 30
time_format “unix”, “fuzzy_date” optional Determines the formatting of timestamp types (currently only created). The default is a unix timestamp for maximum flexibility. Use “fuzzy_date” to display a human-friendly date that switches to “ago” (such as “3 days ago”) time if it’s recent or regular dates if it’s not. “unix”
extended “on”, “off” optional Adds the set description (description) and all the set’s terms (terms) to the set data displayed. You might do an initial search without extended=on, then use the ids: query prefix (on the q parameter) in a separate request to only get extended data on certain ids. “off”

Response Data

When you call the Quizlet Sets API, you will always receive a JSON object. This object will always contain a response_type which tells you if your query executed successfully. Its value can be either “ok” or “error”:

error

Key Value Description
response_type “error” If you get an “error” response_type, the query you specified could not be processed.
short_text string A short error message. This is the title of the message.
response_type string A more descriptive error message, usually one or two sentences.

ok

Key Value Description
response_type “ok” An “ok” response means there is useful data in the response. Yay!
total_results integer The number of sets matching your search.
page integer Shows which page of results you are viewing. 30 results are shown per page by default (adjust the per_page parameter to change that).
total_pages integer The total number of pages this result can display.
total_pages integer The number of pages this result has.
sets array An array of Set objects, as described below.

Set objects

A user creates a set to study a specific set of terms. A set is like a deck of flashcards. For example, a set titled “U.S. State Capitals” might have 50 terms, one for each state/capital pair. Use the extended=on parameter to download the full data of individual sets.

Key Value Description
id integer Quizlet’s universal ID for a set.
title string The title of the set, as supplied by the set’s creator. Be careful, this value is not html escaped.
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.
creator 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/user/**username here**/
created timestamp The time at which the set was created. By default, it is an integer unix timestamp. Use the time_format parameter to change how this value displays.
term_count integer The number of term/definition pairs in the set.
description string extended=on required The description of the set, as supplied by the set’s creator. Be careful, this value is not html escaped.
terms array extended=on required All the term/definition pairs for the set. The first item of each array is the term, and the second is the definition (i.e. ["term123","definition123"]). Be careful, these values are not html escaped.

Examples

Let’s try a simple search for “geography”:

Request

http://quizlet.com/api/1.0/sets?dev_key=a123&q=geography

Response

{
  "response_type": "ok",
  "total_results": 861,
  "page": 1,
  "total_pages": 18,
  "data": [
    {
      "id": 415,
      "title": "U.S. State Capitals",
      "creator": "jalenack",
      "created": 1144296408,
      "term_count": 49
    },
    {
      "id": 2285,
      "title": "World Capitals",
      "creator": "tenunda",
      "created": 1170106817,
      "term_count": 193
    },
    {
      "id": 277655,
      "title": "World Geography exam review",
      "creator": "aw1231",
      "created": 1210683453,
      "term_count": 41
    }
    ...more results...
  ]
}

Now something a little more complex. Let’s get the most recent sets by the user “jalenack” (including terms and definitions), and wrapped with a JSON-P callback processData().

Request

http://quizlet.com/api/1.0/sets?dev_key=a123&q=creator:jalenack&extended=on&sort=most_recent&callback=processData

Response

processData({
  "response_type": "ok",
  "total_results": 82,
  "page": 1,
  "total_pages": 2,
  "sets": [
    {
      "id": 732159,
      "title": "Demo Set",
      "url": "http:\/\/quizlet.com\/732159\/demo-set-flash-cards\/",
      "creator": "jalenack",
      "created": 1234641691,
      "term_count": 8,
      "description": "For showing Quizlet to others",
      "terms": [
        [
          "Mountain View",
          "Where is Google located?"
        ],
        [
          "Cambridge",
          "Where is MIT located?"
        ],
        [
          "Andrew Sutherland",
          "Who founded Quizlet?"
        ],
        [
          "California",
          "What state is below Oregon?"
        ],
        [
          "Barack Obama",
          "Who is the president of the USA?"
        ],
        [
          "Four",
          "What is two plus two?"
        ],
        [
          "Ten",
          "How many fingers do you have?"
        ],
        [
          "Quizlet",
          "What is this website called?"
        ]
      ]
    },
    {
      "id": 629186,
      "title": "XKCD metric speeds",
      "url": "http:\/\/quizlet.com\/629186\/xkcd-metric-speeds-flash-cards\/",
      "creator": "jalenack",
      "created": 1231145530,
      "term_count": 11,
      "description": "Via http:\/\/xkcd.com\/526\/",
      "terms": [
        [
          "5 kph",
          "walking"
		],
		...more results...
	   ]
	 }
  ]
});

Twitter Updates

Follow Quizlet on Twitter