This service matches words against a database of all family names that appear in CrossRef metadata - that is to say, all (or perhaps nearly all) family names that appear in the scholarly record, about two million family names.
$ curl -d "In March 1953, Watson and Crick deduced the double helix structure of DNA." http://names.crrd.dyndns.org/detect
{
"word_count" : 13,
"names" : [
{"name":"March", "occurrences":3175, "offset":3, "ambiguous":true},
{"name":"Watson", "occurrences":34374, "offset":15, "ambiguous":false},
{"name":"Crick", "occurrences":755, "offset":26, "ambiguous":false},
{"name":"Double", "occurrences":279, "offset":44, "ambiguous":true},
{"name":"Helix", "occurrences":24, "offset":51, "ambiguous":true}
]
}
The "ambiguous" flag indicates whether or not names also have meaning in English. Such names are ambiguous because they could be names or words with meaning depending on context.
Try it now:
This service can provide possible completions for a partial name. A list of the 20 most common family names matching a start string is returned:
$ curl -d "jo" http://names.crrd.dyndns.org/complete
[
{"name":"Jones","occurrences":153712,"ambiguous":true},
{"name":"Johnson","occurrences":148135,"ambiguous":true},
{"name":"Johnston","occurrences":31159,"ambiguous":true},
{"name":"Jordan","occurrences":19679,"ambiguous":true},
{"name":"Johansson","occurrences":18351,"ambiguous":false},
{"name":"Joshi","occurrences":16654,"ambiguous":false},
{"name":"John","occurrences":14862,"ambiguous":true},
{"name":"Joseph","occurrences":14163,"ambiguous":true},
{"name":"Jong","occurrences":12137,"ambiguous":true},
{"name":"Jonsson","occurrences":6984,"ambiguous":false},
{"name":"Jo","occurrences":6617,"ambiguous":false},
{"name":"Jorgensen","occurrences":6461,"ambiguous":false},
{"name":"Johansen","occurrences":6438,"ambiguous":false},
{"name":"Joo","occurrences":6421,"ambiguous":false},
{"name":"Joyce","occurrences":6274,"ambiguous":true},
{"name":"Johns","occurrences":6180,"ambiguous":true},
{"name":"Johnstone","occurrences":6102,"ambiguous":false},
{"name":"Jonas","occurrences":5822,"ambiguous":false},
{"name":"Joly","occurrences":3486,"ambiguous":false},
{"name":"Johnsen","occurrences":3462,"ambiguous":false}
]
By default 20 matches are returned, but a different limit can be specified (upto 100):
$ curl -d "jo" http://names.crrd.dyndns.org/complete?limit=10
Want to consume the requests above directly in client-side Javascript? No problem! Specify a "callback" and "q" (query) parameter with any request, using GET instead of POST.
$ curl "http://names.crrd.dyndns.org/complete?q=jo&callback=on_names&limit=5"
on_names([
{"name":"Jones","occurrences":153712,"ambiguous":true},
{"name":"Johnson","occurrences":148135,"ambiguous":true},
{"name":"Johnston","occurrences":31159,"ambiguous":true},
{"name":"Jordan","occurrences":19679,"ambiguous":true},
{"name":"Johansson","occurrences":18351,"ambiguous":false}
]);
Here's a jQuery example (jQuery assigns the callback parameter itself):
$.ajax({url: "http://names.crrd.dyndns.org/complete?q=jo&limit=10",
dataType: "JSONP",
success: function(data) { /* do something */ } });