Leaderboard


Request Details

Item Value
Description Returns leaderboard status
Method GET
Endpoint https://api.crowdtwist.com/v2/leaderboard?api_key=[apikey]&start=[start]&finish=[finish]&period=[period]


Request

Field Name Sample Value Required Format Notes
URL PARAMETERSnone      
QUERY STRING PARAMETERS      
api_key QWERTYUIOP Yes String  
start 10 Yes Number  
finish 20 Yes Number  
period all-time Yes String weekly, monthly, all-time


Successful Response

Field Name Sample Value Required Format Description
display_name Alice No String  
username alice No String  
total_points 42200      
rank 1      


Error Response

Field Name Sample Value Required Format Description
error param_error Yes String A machine readable code that describes the error.
message Missing the user_id parameter Yes String A short, descriptive sentence detailing the error.


Error Response Codes

Error Message
input_error The input provided in invalid or formatted incorrectly.
internal_error Something went wrong on our end.
page_not_found The requested page does not exist or has been removed.
param_error A missing or invalid parameter is included in the request.


Sample Request

curl -X GET
https://api.crowdtwist.com/v2/leaderboard?api_key=QWERTYUIOP&start=100&finish=200&period=all-time
curl -X GET
https://api.crowdtwist.com/v2/leaderboard?api_key=QWERTYUIOP&start=100&finish=200&period=all-time


Sample Successful Response: Status Code 200

[
  {
    "display_name": "Gary H",
    "username": "gary",
    "total_points": 5251,
    "rank": 100
  },
  {
    "display_name": "Billy T",
    "username": "billy",
    "total_points": 5251,
    "rank": 101
  },
  {
    "display_name": "Sally S",
    "username": "sally",
    "total_points": 5251,
    "rank": 102
  },
  {
    "display_name": "Kristy",
    "username": "kristy",
    "total_points": 5251,
    "rank": 103
  },
  {
    "display_name": "Same",
    "username": "sam",
    "total_points": 5251,
    "rank": 104
  },
  {
    "display_name": "Roger",
    "username": "roger",
    "total_points": 5251,
    "rank": 105
  }
]
[
  {
    "display_name": "Gary H",
    "username": "gary",
    "total_points": 5251,
    "rank": 100
  },
  {
    "display_name": "Billy T",
    "username": "billy",
    "total_points": 5251,
    "rank": 101
  },
  {
    "display_name": "Sally S",
    "username": "sally",
    "total_points": 5251,
    "rank": 102
  },
  {
    "display_name": "Kristy",
    "username": "kristy",
    "total_points": 5251,
    "rank": 103
  },
  {
    "display_name": "Same",
    "username": "sam",
    "total_points": 5251,
    "rank": 104
  },
  {
    "display_name": "Roger",
    "username": "roger",
    "total_points": 5251,
    "rank": 105
  }
]

Sample Error Response: Status Code 400

{
  "error": "param_error",     
  "message": "Missing the #user_id parameter." 
}
{
	"error": "param_error",     
	"message": "Missing the #user_id parameter." 
}