API

Dmitry Mozzherin edited this page Jun 14, 2013 · 31 revisions

Search by GNI UUID

Resource URI:

http://gni.globalnames.org/name_strings/aefc0ec7-f875-5b83-9cb7-ff71cc790994.xml (xml output)

http://gni.globalnames.org/name_strings/aefc0ec7-f875-5b83-9cb7-ff71cc790994.json (json output)

Search for a name

Resource Uri:

http://gni.globalnames.org/name_strings.xml (xml output)

http://gni.globalnames.org/name_strings.json (json output)

http://gni.globalnames.org/name_strings (html output)

Parameters:

search_term

name pattern you want to search for

search term may include following options:

Examples: “Parus major” “gen:Parus sp:major” “can:Parus maj*” “gen:Parus yr:1822” “au:Lang* yr:1888”

Modifier Meaning Explanation Examples
* wild card Search by part of a word planta*
exact: exact match Search for exact match of a literal string exact:Parus major
ns: name string Search for literal string from its beginning (other modifiers will be ignored) ns:parus maj*
can: canonical form Search name without authors (other modifiers will be ignored) can:parus major
uni: uninomial Search for higher taxa uni:parus
gen: genus Search by genus epithet of species name gen:parus
sp: species Search by species epithet sp:major
ssp: subspecies Search by infraspecies epithet ssp:major
au: author Search by author word au:Shipunov
yr: year Search by year yr:2005

Note: can, uni, gen, sp, ssp, au, yr work only for parsed names

Notes:

  • some search terms need to be url-escaped
  • searches with wildcards cannot be shorter than 3 characters

per_page (default is 30)

number of items per one page (numbers larger than 1000 will be decreased to 1000)

page (default is 1)

page number you want to see.

Search will return ‘next_page’ field if more data exist for the search

callback (optional, takes a string)

For jsonp callback function

Examples

valid
http://gni.globalnames.org/name_strings.xml?search_term=ani*
http://gni.globalnames.org/name_strings.json?search_term=ani*
http://gni.globalnames.org/name_strings.xml?search_term=ani%25
http://gni.globalnames.org/name_strings.xml?search_term=ama*&per_page=3&page=21
http://gni.globalnames.org/name_strings.xml?search_term=animalia&per_page=3&page=21
invalid
-  search string is too short:
http://gni.globalnames.org/name_strings.xml?search_term=a*&per_page=3&page=21

Name Details

Resource Uri:

http://gni.globalnames.org/name_strings/{id}.xml

http://gni.globalnames.org/name_strings/{id}.json

http://gni.globalnames.org/name_strings/{id}

Parameters:

all_records (takes 0, or 1, default is 1)

if all_records is 1, GNI returns all records from all repositories for the name string

callback (optional, takes a string)

For jsonp callback function

Examples:

http://gni.globalnames.org/name_strings/1265133.json?all_records=false
http://gni.globalnames.org/name_strings/1265133.json?all_records=0
http://gni.globalnames.org/name_strings/1265133.xml
http://gni.globalnames.org/name_strings/1265133

Parsing Scientific Names

Resource Uri:

http://gni.globalnames.org/parsers.xml

http://gni.globalnames.org/parsers.json

Parameters:

names (scientific names separated by ‘|’)

callback (optional, takes a string)

For jsonp callback function

Examples

http://gni.globalnames.org/parsers.xml?names=Plantago+minor|Homo+sapiens
http://gni.globalnames.org/parsers.json?names=Plantago+minor|Homo+sapiens&callback=displayNames