OnDemand Users - Please read this important announcement!

GeoTagger API

The GeoTagger offers output in 4 formats:

The purpose of the GeoTagger API is to take a document, either by passing a URL via the 'url' parameter, or passing a string via the 'doc' parameter, and return the geographic references contained in that document.

The GeoTagger offers a number of different 'actions' for the JSON output. These actions allow you to choose what level of information is available in your output.

To form a request URL:

Examples of Usage

Request Parameters

version:
Required
default value: input other than the allowed value raises an error message
allowed values: 1.0.0
usage: The requestor must specify the API version they wish to use. The API requires a valid version parameter.
doc:
Required
default value: ''
allowed values: string
usage: The 'doc' parameter allows you to send a body of text you wish to be parsed by the GeoTagger. One of doc or url is required.
url:
Required
default value: ''
allowed values: string
usage: The 'url' parameter allows you to send a URL you wish to be parsed. It will be requested from a server, using the User-Agent provided as a parameter, and then parsed in the same way as a 'doc' request.
action:
Optional
default value: 'getLocationReferences'
allowed values: 'getLocationReferences', 'getDocumentReferences', 'getEnhancedLocationReferences', 'getEnhancedLocationExtracts'
usage: The 'action' parameter determines the type of data returned by the JSON output format.
useragent:
Optional
default value: Mozilla/5.0 (MetaCarta GeoTagger Web Service; support@metacarta.com)
allowed values: string
usage: The User-Agent used when requesting a page from a remote webserver.
mime:
Optional
default value: text/plain
allowed values: string
usage: The mime type of the content. "text/html" will turn on DOM traversal when possible, returning XPath for references.
mingeoconfidence:
Optional
default value: 0.0
allowed values: float
usage: Defines the minimum confidence for returned results. If results do not exceed this confidence, they are not returned.
bbox:
Optional
default value: -180,-90,180,90
allowed values: a comma separated string of minlon,minlat,maxlon,maxlat
usage: Defines the query's geographic extent. Results outside this extent are dropped from the response.
width:
Optional
default value: 512
allowed values: positive integer
usage: Determines the width of the image returned by the PNG GeoTagger output.
height:
Optional
default value: 383
allowed values: positive integer
usage: Determines the height of the image returned by the PNG GeoTagger output.