Spock API, Version 2, May 2008

The Spock API is a standards-based method for obtaining Spock people search results. The Spock API is read-only, and returns results in XML over HTTP (REST). Results can include text, URLs, and pictures. You can search by name, tags, or for specific profile IDs.

The previous version 1 of the API is deprecated. In version 2 we merged profile.xml and search.xml into one call, and removed some crufty options.

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.

Inputs

FieldDefinitionValuesDefault
api_key (required)Provided by Spock.StringN/A
id Spock IDs of the people to display, or to constrain the search to.Comma-separated list of strings, maximum of 10No filter
query Freeform query string. StringNo filter
name_query Limit search results to individuals with a specific name.StringNo filter
tag_query Limit search results to individuals with a specific tag or set of tags.StringNo filter
location_query Limit search results by location.StringNo 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)0
source Limits search results to individuals of this source.String in [fstr, hi5, lspc, mspc, wiki, celebrity, business, long_tail]No filter
limit Limits the number of results returned.Integer in [1, 10]10
offset Determines which result to begin with (zero-based). E.g., setting offset to 2 would exclude the first two results.Integer in [0, 100]0
show_age Show birth and death dates, if available.1 (Yes) or 0 (No)0
show_blurb Determines if the bio is returned.1 (Yes) or 0 (No)0
show_gender Determines if the gender is returned.1 (Yes) or 0 (No)0
show_location Determines if the location is returned.1 (Yes) or 0 (No)0
show_names Determines whether to return the top-voted name.1 (Yes) or 0 (No)0
show_picture Determines whether to return the top-voted picture.1 (Yes) or 0 (No)0
show_related_people Determines number of related people returned in descending vote score order.Integer in [0, 4]0
show_tags Determines number of tags returned in descending vote score order.Integer in [0, 7]0
show_websites Determines number of websites returned in descending vote score order.Integer in [0, 10]0

Example

This example API call searches for "spock team". Ignore the sig parameter; it is only used in example API calls.

http://www.spock.com/api/2/search.xml?api_key=115c5ab1fb7dec3a8ce457fee8e6f0eb&a mp;query=spock-team&show_blurb=1&show_gender=1&show_names=4&show _picture=1&show_related_people=10&show_tags=10&show_websites=10& sig=4a9451360bcbaee8e4efced7bdcf243e

Query Builder

Build your own API query using the Query Builder.

Code Samples

This sample code does a search using the Spock API and prints out Spock ID/URLs and blurbs: