Spock API Version 1 (Deprecated)
The Spock Profile API is a standards-based method for obtaining Spock people search results. To obtain access to the Spock API, users must obtain an API Key.
The Spock Profile API is read-only, and returns results in XML. Results can include text, URLs, and pictures. The API provides two options for querying the data:
- search.xml: This query method finds a set of Spock IDs given a set of criteria.
- person.xml: This query method allows for request of detailed information for one or more people.
Use
To execute a query the API must be supplied with an API Key and any non-required fields can be left blank. Allowed fields for use in generating a query are provided in the tables below.
Search API
Inputs
The API must be supplied with at least one of the following: a general query string, a name query, a tag query, or a location query. Additional fields are described below:
| Field | Definition | Values | Default |
|---|
api_key (required) | Provided by Spock. | String | N/A |
query | Free form query string. | String | No filter |
name_query | Limit search results to individuals with a specific name. | String | No filter |
tag_query | Limit search results to individuals with a specific tag or set of tags. | String | No filter |
location_query | Limit search results by location. | String | No filter |
age_low | Limits search results to exclude individuals below a certain age. | Integer in [13, 80] | No filter |
age_high | Limits search results to exclude individuals above a certain age. | Integer in [13, 80] | No filter |
gender | Limits search results based on gender. | m (male), f (female) | No filter |
require_picture | Indicates if pictures are required for results. | 1 (Yes) or 0 (No). | No filter (0) |
limit | Limits the number of results returned. | Integer. Maximum = 10 | 10 |
offset | Determines which result to begin with (zero-based). E.g., setting offset to 2 would excludes the first two results. | Integer | 0 |
Example
http://www.spock.com/api/1/search.xml?api_key=115c5ab1fb7dec3a8ce457fee8e6f0eb&query=George-Bush&sig=32bde31ef7b54e9af5f7e066348d4caePeople API
Inputs
To execute a query, the API must be supplied with a Spock ID or list of Spock IDs. The query can be used to define what information is returned. Allowed fields are provided in the table below:
| Field | Definition | Values | Default |
|---|
api_key (required) | Provided by Spock. | String | N/A |
id (required) | Spock IDs of the people to display. (Maximum of 10.) | String (comma-separated list) | N/A |
blurb | Determines if the user bio is returned. | 0 or 1 | 0 |
gender | Determines if the user gender is returned. | 0 or 1 | 0 |
location | Determines if the user location is returned. | 0 or 1 | 0 |
names | Determines the number of user name variants returned. | Integer (0-12) | 0 |
pictures | Determines number of pictures returned in descending vote score order. | Integer (0-12) | 0 |
picture_sizes | Determines the sizes of pictures returned. | String. Can be one or more of: small_height (120×60)small_width (60×120)medium_height (200×100)medium_width (120×240)large (600×400) Arguments are comma-separated (e.g. small_height,small_width). | Blank. No image URLs are returned if you leave this blank, so you probably want to specify one. |
related_people | Determines number of related people returned in descending vote score order. | Integer (0-12) | 0 |
tags | Determines number of tags returned in descending vote score order. | Integer (0-12) | 0 |
websites | Determines number of websites returned in descending vote score order | Integer (0-12) | 0 |
Example
http://www.spock.com/api/1/person.xml?api_key=115c5ab1fb7dec3a8ce457fee8e6f0eb&a mp;blurb=1&gender=1&id=sam%2Cwayne&names=4&picture_sizes=small_h eight&pictures=1&related_people=10&sig=98c0f4b1246d435a7a4facec337ab 2bb&tags=10&websites=10