Smarterer API

search tests

Search for Smarterer tests containing a particular word, phrase or tag.

To perform a search, either a general query using the q parameter should be used or the individual field operators (but not both). If the general q query parameters is used in conjunction with the field parameters, the field parameters will be ignored. When mixing search field parameters, all values will be matched (e.g. searching name=X&description=Y will only return results if both X matches in name and Y matches in description)

The search API will only return a maximum of 100 results per request but results will be paged and additional pages can be requested using the p parameter.

If no test matches the given search term, an empty list is returned.

URLs

Parameters

parameterdescription
q
optional
A query to search against all test fields. This can include advanced search operators such as phrase search. Without operators the default behavior is to search against all fields in tests including name, description, and categories.
name
optional
Search only using test names.
description
optional
Search using test descriptions.
categories
optional
Search against tags and categories.
p
optional
Request a particular page from a search result set. Values outside the current search result page set set will return an empty list. If omitted, the default page number is 1.
details
optional
if set to true (details=true), returns the full detailed view of each test including description and syllabus if available. The default value is false (no details are returned per test).

API Response

Example for /api/search/tests?q=python


{
    "page": 1, 
    "results": [
        {
            "icon": "http://s0.smrtrr.com/test_logos/icon_python.png", 
            "in_nursery": false, 
            "name": "Python", 
            "primary_tags": [
                "Skills", 
                "Programming"
            ], 
            "take_test_url": "http://smarterer.com/tests/python", 
            "url_slug": "python"
        }, 
        {
            "icon": "http://s0.smrtrr.com/test_logos/y2e4ytjjytq5ngq.png", 
            "in_nursery": true, 
            "name": "Python Workshop", 
            "primary_tags": [
                "Skills", 
                "Programming"
            ], 
            "take_test_url": "http://smarterer.com/tests/python-workshop", 
            "url_slug": "python-workshop"
        }, 
        {
            "icon": "http://s0.smrtrr.com/test_logos/twistedlogofull.png", 
            "in_nursery": true, 
            "name": "Twisted", 
            "primary_tags": [
                "Skills", 
                "Programming"
            ], 
            "take_test_url": "http://smarterer.com/tests/twisted", 
            "url_slug": "twisted"
        }, 
        {
            "icon": "http://s0.smrtrr.com/test_logos/zwy3ymqzzdy5mjg.png", 
            "in_nursery": true, 
            "name": "Linux Sys Admin (AWS)", 
            "primary_tags": [
                "Skills", 
                "Programming"
            ], 
            "take_test_url": "http://smarterer.com/tests/linux-sys-admin-aws", 
            "url_slug": "linux-sys-admin-aws"
        }, 
        {
            "icon": "http://s0.smrtrr.com/test_logos/mtg0mjlmmjqzmmj.png", 
            "in_nursery": true, 
            "name": "GameMaker", 
            "primary_tags": [
                "Skills", 
                "Programming"
            ], 
            "take_test_url": "http://smarterer.com/tests/gamemaker", 
            "url_slug": "gamemaker"
        }, 
        {
            "icon": "http://s0.smrtrr.com/test_logos/njvmzgq1zjfjmji.png", 
            "in_nursery": false, 
            "name": "Django", 
            "primary_tags": [
                "Skills", 
                "Programming"
            ], 
            "take_test_url": "http://smarterer.com/tests/django", 
            "url_slug": "django"
        }
    ], 
    "time": "0.000", 
    "total_found": 6, 
    "total_pages": 1
}
    

Response Structure

The response is JSON containing the following:
  • page: The current page of results.
  • time: seconds to perform this particular search
  • total_found: total tests matching the current search terms.
  • total_pages: total number of pages for the current search term.
  • results: A list of the matching tests.
    • icon: Fully qualified url to a logo image for this test.
    • in_nursery: Whether the test is considered 'immature'
    • name: The name of the test
    • primary_tags: an array of the top level tags for this test (usually two or three tags).
    • take_test_url: The url to take this particular test.
    • url_slug: The unique url_slug for this test.