GSM Location Code
API
URL: http://gsmloc.org/api
The API has a number of different calls. Calls are differentiated by the "action" param. The list below shows the parameters for each call, and an example request response where applicable.
required params in red.
- add: For adding new cellspots to database.
Data must be POSTed -- GET requests will not insert data.- nid1
- nid1 value from GSM Cell ID
- nid2
- nid2 value from GSM Cell ID
- lac
- lac value from GSM Cell ID
- cid
- cid value from GSM Cell ID
- lat
- decimal latitude
- long
- decimal longitude
- signal
- signal strength value, as a percent from 1->100
- timestamp
- timestamp value, seconds since unix epoch
- get: For retrieving data from API.
- nid1
- nid1 value from GSM Cell ID
- nid2
- nid2 value from GSM Cell ID
- lac
- lac value from GSM Cell ID
- cid
- cid value from GSM Cell ID
- format
- One of: text, xml, js. Default is text. Determines type of response.
Responses include a centroid for the points collected for the cell, and a bounding box of the points collected for the cell.
Example Response:
format=text4,5 3,4,5,6
format=js{'centroid': [4,5],'bbox': [3,4,5,6]}format=xml<Point> <lat>4</lat><lon>5</lon> <bounds>3,4,5,6</bounds> </Point>
- get_statistics: Retrieve current statistics about GSMLoc database.
- get_comments: Get comments which have been left at a certain cell location.
- nid1
- nid1 value from GSM Cell ID
- nid2
- nid2 value from GSM Cell ID
- lac
- lac value from GSM Cell ID
- cid
- cid value from GSM Cell ID
Upload your locations! Try this python script: stumblestore. It requires a bluetooth GPS, and a symbian phone which can run Python.
API:
- upload.cgi: Post data as a file or as a string as variable named 'upload', and it will be processed.
Data format:
nid1,nid2,lac,cid,signal,lon,lat,timestampExample:
234,15,205,56467333,4,5143.5707N,00114.3111W,1146460505.0
More to come!