Difference between revisions of "API"
(→Payload) |
(→API key) |
||
(74 intermediate revisions by 5 users not shown) | |||
Line 5: | Line 5: | ||
This wiki page describes all available API functions.<br> | This wiki page describes all available API functions.<br> | ||
− | Please contact <u>[mailto: | + | Please contact <u>[mailto:hello@opencellid.org Unwired Labs]</u> if you have any suggestions for improvement or bugs to report. |
==API key== | ==API key== | ||
− | Most of the API calls require an API key. This API key can be obtained by registering <u>[http://opencellid.org/ | + | Most of the API calls require an API key. This API key can be obtained by registering <u>[http://opencellid.org/ here]</u>.<br> |
All uploaded data will be stored along with this API key. This offers many functions, including the deletion of data from users that provide incorrect data.<br> | All uploaded data will be stored along with this API key. This offers many functions, including the deletion of data from users that provide incorrect data.<br> | ||
It also allows the identification of users that are violating the community server usage policy. | It also allows the identification of users that are violating the community server usage policy. | ||
− | In the examples below "apiKey" is used for this parameter. | + | Some smartphone apps also require an API key, for example the <u>[https://play.google.com/store/apps/details?id=info.zamojski.soft.towercollector Tower Collector]</u>. |
+ | |||
+ | For those who prefer contributing data to OpenCellID completely anonymously we recommend using the <u>[https://play.google.com/store/apps/details?id=de.enaikoon.android.inviu.opencellid OpenCellID client]</u> which does not require an API key for uploading data. | ||
+ | |||
+ | In the examples below "apiKey" is used as a place holder for this parameter. | ||
=="changeable" attribute== | =="changeable" attribute== | ||
Line 27: | Line 31: | ||
==Filtering of data== | ==Filtering of data== | ||
− | The following filters are currently applied to all incoming data.<br> | + | The following filters are currently applied to all incoming data and decide if a measurement is suspicious or valid.<br> |
Suspect data is inserted into a database table with suspect data which can be re-examined at a later stage if required. | Suspect data is inserted into a database table with suspect data which can be re-examined at a later stage if required. | ||
Line 34: | Line 38: | ||
! scope="col" | Parameter | ! scope="col" | Parameter | ||
! scope="col" | Rules | ! scope="col" | Rules | ||
+ | |- | ||
+ | | title=Parameter | act | ||
+ | | tilte="Rules" | must be one of supported type:<br>1xRTT, CDMA, eHRPD, IS95A, IS95B, EVDO_0, EVDO_A, EVDO_B, UMTS, HSPA+, HSDPA, HSUPA, HSPA, LTE, LTECATM, NR, NBIOT, EDGE, GPRS, GSM | ||
|- | |- | ||
| title="Parameter" | MCC | | title="Parameter" | MCC | ||
Line 39: | Line 46: | ||
|- | |- | ||
| title="Parameter" | MCC | | title="Parameter" | MCC | ||
− | | title="Rules" | must be in the range | + | | title="Rules" | must be in the range of 100 to 999 |
|- | |- | ||
− | | title="Parameter" | MNC | + | | title="Parameter" | MNC/SID |
| title="Rules" | must be known in the database | | title="Rules" | must be known in the database | ||
|- | |- | ||
| title="Parameter" | MNC | | title="Parameter" | MNC | ||
− | | title="Rules" | must be | + | | title="Rules" | must be in the range of 0 to 999 for GSM, UMTS, LTE, NR and NBIOT |
|- | |- | ||
− | | title="Parameter" | | + | | title="Parameter" | MNC/SID |
− | | title="Rules" | must be | + | | title="Rules" | must be in the range of 0 to 32767 for CDMA |
+ | |- | ||
+ | | title="Parameter" | LAC/TAC/NID | ||
+ | | title="Rules" | must be in the range of 1 to 65535 for all radios except NR, 0 to 16777215 for NR. | ||
|- | |- | ||
| title="Parameter" | CID | | title="Parameter" | CID | ||
− | | title="Rules" | must be | + | | title="Rules" | must be in the range of 1 to 65535 for GSM |
+ | |- | ||
+ | | title="Parameter" | CID | ||
+ | | title="Rules" | must be in the range of 1 to 268435455 for UMTS and LTE, 1 to 68719476735 for NR | ||
+ | |- | ||
+ | | title="Parameter" | CID/BID | ||
+ | | title="Rules" | must be in the range 1 to 65535 for CDMA | ||
|- | |- | ||
| title="Parameter" | longitude | | title="Parameter" | longitude | ||
Line 70: | Line 86: | ||
| title="Parameter" | latitude | | title="Parameter" | latitude | ||
| title="Rules" | must be != 0 | | title="Rules" | must be != 0 | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
|- | |- | ||
− | | title=Parameter | | + | ! scope="col" | Parameters |
− | | tilte="Rules" | | + | ! scope="col" | Rules |
+ | |- | ||
+ | | title=Parameter | MCC,MNC,LAC,CID,longitude,latitude | ||
+ | | tilte="Rules" | must have unique coordinates for the cell | ||
+ | |- | ||
+ | | title="Parameter" | MCC,longitude,latitude | ||
+ | | title="Rules" | must have coordinates in the home country | ||
+ | |- | ||
+ | | title="Parameter" | MCC,MNC,LAC,CID,longitude,latitude | ||
+ | | title="Rules" | must be closer than 150 km away from the cell (only in case of precise cells) | ||
|} | |} | ||
− | + | The following filters are currently applied to optional fields in all incoming data.<br> | |
− | + | If an optional field has invalid value, then only the value is rejected. | |
− | The following | + | |
{| class="wikitable sortable" style="font-size: 85%; text-align: left;" | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
|- | |- | ||
− | ! scope="col" | | + | ! scope="col" | Parameter |
− | ! scope="col" | | + | ! scope="col" | Rules |
− | + | ||
|- | |- | ||
− | | title= | + | | title=Parameter | measured_at |
− | | | + | | tilte="Rules" | must be in one of supported date formats:<br>- timestamp (milliseconds since 1/1/1970 00:00:00 GMT),<br>- "yyyy-MM-dd HH:mm:ss",<br>- "yyyyMMddHHmmss",<br>- "yyyy-MM-dd HH:mm:ss.SSSZ",<br>- "yyyy-MM-dd" |
− | + | ||
|- | |- | ||
− | | title=" | + | | title="Parameter" | signal |
− | | title=" | + | | title="Rules" | |
− | | | + | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
|- | |- | ||
− | + | ! scope="col" | Technology | |
− | + | ! scope="col" | Rules | |
− | + | ||
|- | |- | ||
− | | title=" | + | | title="Technology" | GSM |
− | | title=" | + | | title="Rules" | RSSI in dBm in the range of -51 to -113 or ASU in the range of 0 to 31 |
− | + | ||
|- | |- | ||
− | | title=" | + | | title="Technology" | UMTS |
− | | title=" | + | | title="Rules" | RSCP in dBm in the range of -25 to -121 or ASU in the range of -5 to 91 |
− | + | ||
|- | |- | ||
− | | title=" | + | | title="Technology" | LTE |
− | | title=" | + | | title="Rules" | RSRP in dBm in the range of -45 to -137 or ASU in the range of 0 to 95 |
− | | title=" | + | |- |
+ | | title="Technology" | NR | ||
+ | | title="Rules" | RSRP in dBm in the range of -44 to -140 or ASU in the range of 0 to 97 | ||
+ | |- | ||
+ | | title="Technology" | CDMA | ||
+ | | title="Rules" | RSSI in dBm in the range of -75 to -100 or ASU in the range of 1 to 16 | ||
+ | |} | ||
+ | |- | ||
+ | | title="Parameter" | rating | ||
+ | | title="Rules" | must be in metres in the range of 0 to 35000 | ||
+ | |- | ||
+ | | title="Parameter" | speed | ||
+ | | title="Rules" | must be in metres/second in the range of 0 to 300 | ||
+ | |- | ||
+ | | title="Parameter" | direction | ||
+ | | title="Rules" | must be in the range of 0 to 360 | ||
+ | |- | ||
+ | | title="Parameter" | ta | ||
+ | | title="Rules" | only for GSM and LTE; must be in the range of 0 to 63 | ||
+ | |- | ||
+ | | title="Parameter" | psc | ||
+ | | title="Rules" | only for UMTS; must be in the range of 0 to 511 | ||
+ | |- | ||
+ | | title="Parameter" | pci | ||
+ | | title="Rules" | only for LTE; must be in the range of 0 to 503 | ||
+ | |- | ||
+ | | title="Parameter" | txp | ||
+ | | title="Rules" | must be in the range of -200 to 100 | ||
+ | |- | ||
+ | | title="Parameter" | tsrf | ||
+ | | title="Rules" | must be in the range of -100 to 100 | ||
|} | |} | ||
− | == | + | ==Payload legend== |
− | + | A typical payload for API requests and Measurement submissions may include some or all of the following parameters: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
{| class="wikitable sortable" style="font-size: 85%; text-align: left;" | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
Line 150: | Line 191: | ||
| title="Data type" | integer | | title="Data type" | integer | ||
| title="Description" | Mobile country code | | title="Description" | Mobile country code | ||
− | | title="Optional" | no | + | | title="Optional" | no<br>(except CDMA) |
|- | |- | ||
| title="Parameter" | <mnc> | | title="Parameter" | <mnc> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Mobile network code | + | | title="Description" | Mobile network code or system identifier |
− | | title="Optional" | no | + | | title="Optional" | no<br>(except CDMA if sid is provided) |
|- | |- | ||
| title="Parameter" | <lac> | | title="Parameter" | <lac> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Local area code | + | | title="Description" | Local area code, tracking area code or network id |
− | | title="Optional" | no | + | | title="Optional" | no<br>(except CDMA if nid is provided or LTE or NR if tac is provided) |
|- | |- | ||
| title="Parameter" | <cellid> | | title="Parameter" | <cellid> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Cell tower id | + | | title="Description" | Cell tower id or base station id |
− | | title="Optional" | no | + | | title="Optional" | no<br>(except CDMA if bid is provided) |
|- | |- | ||
| title="Parameter" | <signal> | | title="Parameter" | <signal> | ||
Line 194: | Line 235: | ||
| title="Parameter" | <act> | | title="Parameter" | <act> | ||
| title="Data type" | string | | title="Data type" | string | ||
− | | title="Description" | Network access type; currently supported: 1xRTT, CDMA, eHRPD, EVDO_0, EVDO_A, EVDO_B, UMTS, HSPA+, HSDPA, HSUPA, HSPA, LTE, | + | | title="Description" | Network access type; currently supported:<br>1xRTT, CDMA, eHRPD, IS95A, IS95B, EVDO_0, EVDO_A, EVDO_B, UMTS, HSPA+, HSDPA, HSUPA, HSPA, TDSCDMA, LTE, LTECATM, NR, NBIOT, EDGE, GPRS, GSM<br> |
{| class="wikitable sortable" style="font-size: 85%; text-align: left;" | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
|- | |- | ||
Line 244: | Line 285: | ||
| title="Type" | HSPA | | title="Type" | HSPA | ||
| title="Description" | = "HSDPA/HSUPA" = High Speed Packet Access (both downlink and uplink) | | title="Description" | = "HSDPA/HSUPA" = High Speed Packet Access (both downlink and uplink) | ||
+ | |- | ||
+ | | title="Technology" | UMTS | ||
+ | | title="Type" | TDSCDMA | ||
+ | | title="Description" | = "TDSCDMA" = Time Division Synchronous Code Division Multiple Access (TD-SCDMA) | ||
|- | |- | ||
| title="Technology" | LTE | | title="Technology" | LTE | ||
| title="Type" | LTE | | title="Type" | LTE | ||
| title="Description" | Long term evolution | | title="Description" | Long term evolution | ||
+ | |- | ||
+ | | title="Technology" | LTE | ||
+ | | title="Type" | LTECATM | ||
+ | | title="Description" | Long term evolution CAT-M network | ||
+ | |- | ||
+ | | title="Technology" | NR | ||
+ | | title="Type" | NR | ||
+ | | title="Description" | New Radio (5G) | ||
+ | |- | ||
+ | | title="Technology" | NBIOT | ||
+ | | title="Type" | NBIOT | ||
+ | | title="Description" | Narrowband IoT | ||
|- | |- | ||
| title="Technology" | iDEN | | title="Technology" | iDEN | ||
Line 261: | Line 318: | ||
| title="Description" | GPRS access | | title="Description" | GPRS access | ||
|} | |} | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <ta> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Timing advance; only for GSM and LTE | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <psc> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Primary scrambling code; only for UMTS and TDSCDMA | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <tac> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Tracking area code; only for LTE or NR | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <pci> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Physical cell Id; only for LTE or NR | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <sid> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | System identifier; only for CDMA | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <nid> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Network id; only for CDMA | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <bid> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Base station id; only for CDMA | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <devn> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | Device name as concatenated strings with the manufacturer and the model name; max 50 characters | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <txp> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | TX power in dBm | ||
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <tsrf> | ||
+ | | title="Data type" | integer | ||
+ | | title="Description" | Temperature in the RF module; in degrees Celsius; only with <txp> parameter | ||
| title="Optional" | yes | | title="Optional" | yes | ||
|} | |} | ||
+ | |||
+ | |||
+ | ==Error codes== | ||
+ | |||
+ | The following error codes might be returned by OpenCellID services: | ||
+ | |||
+ | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
+ | |- | ||
+ | ! scope="col" | Error code | ||
+ | ! scope="col" | HTTP code | ||
+ | ! scope="col" | Description | ||
+ | |- | ||
+ | | title="Error code" | 1 | ||
+ | | title="HTTP code" | 200 | ||
+ | | title="Description " | Cell not found | ||
+ | |- | ||
+ | | title="Error code" | 2 | ||
+ | | title="HTTP code" | 401 | ||
+ | | title="Description " | Invalid API key | ||
+ | |- | ||
+ | | title="Error code" | 3 | ||
+ | | title="HTTP code" | 400 | ||
+ | | title="Description " | Invalid input data | ||
+ | |- | ||
+ | | title="Error code" | 4 | ||
+ | | title="HTTP code" | 403 | ||
+ | | title="Description " | Your API key must be white listed in order to run this operation. This service is free of charge as long as your application contributes to the OpenCellID project. Should your application meet this requirement, please contact [email protected] for the authorisation of your API key.<br><br>For further details please visit:<br>http://wiki.opencellid.org/wiki/Commercial_users<br>http://wiki.opencellid.org/wiki/Request_whitelisting<br><br>You can alternatively download the entire database here:<br>http://opencellid.org/downloads/ | ||
+ | |- | ||
+ | | title="Error code" | 5 | ||
+ | | title="HTTP code" | 500 | ||
+ | | title="Description " | Internal server error | ||
+ | |- | ||
+ | | title="Error code" | 6 | ||
+ | | title="HTTP code" | 503 | ||
+ | | title="Description " | Too many requests. Try later again. | ||
+ | |- | ||
+ | | title="Error code" | 7 | ||
+ | | title="HTTP code" | 429 | ||
+ | | title="Description " | Daily limit 1000 requests exceeded for your API key.<br><br>For further details please visit:<br>http://wiki.opencellid.org/wiki/Commercial_users<br><br>You can alternatively download the entire database here:<br>http://opencellid.org/downloads/ | ||
+ | |} | ||
+ | |||
+ | ==Adding a single measurement== | ||
+ | |||
+ | GET/POST request to | ||
+ | <pre> | ||
+ | http://<WebServiceURL>/measure/add | ||
+ | </pre> | ||
+ | |||
+ | ===Parameters=== | ||
+ | <WebServiceURL>: the URL to the web service | ||
+ | |||
+ | ===Payload=== | ||
+ | key=<apiKey>&lat=<lat>&lon=<lon>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&signal=<signal>&measured_at=<measured_at>&rating=<rating>&speed=<speed>&direction=<direction>&act=<act>&ta=<ta>&psc=<psc>&tac=<tac>&pci=<pci>&sid=<sid>&nid=<nid>&bid=<bid>&devn=<devn>&txp=<txp>&tsrf=<tsrf> | ||
+ | |||
+ | Where | ||
+ | |||
===Response=== | ===Response=== | ||
Line 270: | Line 433: | ||
The request is handled by de.enaikoon.gpssuite.web.measure.NewMeasureController.<br> | The request is handled by de.enaikoon.gpssuite.web.measure.NewMeasureController.<br> | ||
The parameters are read into a map and then parsed into a de.enaikoon.m2m.gsmcellmanagment.model.CellMeasurement, and persisted by de.enaikoon.m2m.gsmcellmanagment.dao.mongodb.GsmCellDao (see the Spring common-business.xml configuration) which saves data via a Mongo driver.<br> | The parameters are read into a map and then parsed into a de.enaikoon.m2m.gsmcellmanagment.model.CellMeasurement, and persisted by de.enaikoon.m2m.gsmcellmanagment.dao.mongodb.GsmCellDao (see the Spring common-business.xml configuration) which saves data via a Mongo driver.<br> | ||
− | The user is deduced from the API key which is a string unique to each user. User ID is persisted as a field in the same object. Suspect measurements are saved into a special collection: CellMeasurementSuspect. | + | The user is deduced from the API key which is a string unique to each user. User ID is persisted as a field in the same object. Suspect measurements are saved into a special collection: CellMeasurementSuspect. This collection currently cannot be accessed. The suspect data is rechecked every now and then after the filters have been updated in order to check if some initially supsect data can be recovered. |
===Example=== | ===Example=== | ||
− | <u>http:// | + | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10&direction=90&act=GPRS</u><br> |
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=GPRS&ta=3</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=HSPA+&psc=3</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=LTE&pci=3</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&tac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=LTE&pci=3</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=1xRTT</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&sid=10&nid=11&bid=12&rating=10.1&direction=90.3&speed=12.3&act=1xRTT</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&sid=10&nid=11&bid=12&rating=10.1&direction=90.3&speed=12.3&act=eHRPD</u><br> | ||
+ | <u>http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&act=GSM&devn=Samsung%20GT-S5830L&txp=-45&tsrf=22</u> | ||
===Time needed for processing newly uploaded measurements=== | ===Time needed for processing newly uploaded measurements=== | ||
Line 300: | Line 471: | ||
CSV file of the following format: | CSV file of the following format: | ||
<pre> | <pre> | ||
− | mcc,mnc,lac,cellid,lon,lat,signal,measured_at,rating,speed,direction,act | + | mcc,mnc,lac,cellid,lon,lat,signal,measured_at,rating,speed,direction,act,ta,psc,tac,pci,sid,nid,bid |
− | + | 100,2,434,9200,9.436598,52.892139,4,1389472208000,5.4,0,0,GPRS,3,,,,,, | |
− | + | 100,2,434,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,HSPA+,,4,,,,, | |
+ | 100,2,434,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,LTE,,,,4,,, | ||
+ | 100,2,,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,LTE,,,434,4,,, | ||
+ | 100,2,432,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,LTE,,,432,4,,, | ||
+ | 100,1234,432,9201,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,eHRPD,,,,,,, | ||
+ | 100,1234,432,9201,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,eHRPD,,,,,1234,432,9201 | ||
+ | 100,,,,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,1xRTT,,,,,1234,432,9201 | ||
+ | ,,,,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,eHRPD,,,,,1234,432,9201 | ||
... | ... | ||
</pre> | </pre> | ||
Column names recognised:<br> | Column names recognised:<br> | ||
− | mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act | + | mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act, ta, psc, tac, pci, sid, nid, bid |
Maximum file size:<br> | Maximum file size:<br> | ||
Line 313: | Line 491: | ||
Supplemented by the parameter ''key=<apiKey>'' as form POST field, which is the user's API key. | Supplemented by the parameter ''key=<apiKey>'' as form POST field, which is the user's API key. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Response=== | ===Response=== | ||
Line 456: | Line 499: | ||
===cURL command=== | ===cURL command=== | ||
− | < | + | <syntaxhighlight lang="bash"> |
− | curl -F "key= | + | curl -F "key=apiKey" -F "datafile=@/path/to/file/mydata.csv;type=text/plain" http://opencellid.org/measure/uploadCsv |
− | </ | + | </syntaxhighlight> |
===Time needed for processing newly uploaded measurements=== | ===Time needed for processing newly uploaded measurements=== | ||
Line 477: | Line 520: | ||
Minimal csv file looks as follows:<br> | Minimal csv file looks as follows:<br> | ||
<pre> | <pre> | ||
− | mcc,mnc,lac,cellid,lon,lat | + | mcc,mnc,lac,cellid,lon,lat |
262,2,434,9200,9.436598,52.892139 | 262,2,434,9200,9.436598,52.892139 | ||
</pre> | </pre> | ||
Line 483: | Line 526: | ||
<b>What does "Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key" mean?</b><br> | <b>What does "Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key" mean?</b><br> | ||
This means that the user must send his data (apiKey and csv file) in the same way as from the following form:<br> | This means that the user must send his data (apiKey and csv file) in the same way as from the following form:<br> | ||
− | < | + | <syntaxhighlight lang="html5"> |
− | <form method="post" action="http://opencellid.org/measure/uploadCsv" | + | <form method="post" action="http://opencellid.org/measure/uploadCsv" enctype="multipart/form-data"> |
− | enctype="multipart/form-data"> | + | apiKey: <input type="text" name="key" /> |
− | + | CSV (max 2MB): <input type="file" name="datafile" /> | |
− | <input type="text" name="key" | + | <input type="submit" name="upload" value="Upload"/> |
− | CSV (max 2MB): | + | </form> |
− | <input type="file" name="datafile" | + | </syntaxhighlight> |
− | <input type="submit" name="upload" value="Upload"/> </form> | + | |
− | </ | + | |
<b>What does the following error mean?</b><br> | <b>What does the following error mean?</b><br> | ||
− | <?xml version="1.0" encoding="UTF-8"? | + | <syntaxhighlight lang="xml"> |
− | <rsp stat="fail"><err info=" cell not found" code="1"/></rsp> | + | <?xml version="1.0" encoding="UTF-8"?> |
+ | <rsp stat="fail"><err info="cell not found" code="1"/></rsp> | ||
+ | </syntaxhighlight> | ||
This error message means that no cell was found for the given user criteria (mcc-mnc-lac-cid combination was not found in database). | This error message means that no cell was found for the given user criteria (mcc-mnc-lac-cid combination was not found in database). | ||
+ | |||
+ | <b>Can I upload CDMA using mcc-mnc-lac-cellid parameters?</b><br> | ||
+ | Yes, you can use mnc as sid, lac as nid and cellid as bid. | ||
==Uploading measurements from a JSON file== | ==Uploading measurements from a JSON file== | ||
Line 510: | Line 556: | ||
===Payload=== | ===Payload=== | ||
− | JSON file (send in | + | JSON file (send in ''datafile'' parameter) of the following format: |
− | <syntaxhighlight lang=" | + | <syntaxhighlight lang="javascript"> |
{ | { | ||
"measurements": [ | "measurements": [ | ||
Line 518: | Line 564: | ||
"lon": 9.436598, | "lon": 9.436598, | ||
"lat": 52.892139, | "lat": 52.892139, | ||
− | "mcc": | + | "mcc": 100, |
"mnc": 2, | "mnc": 2, | ||
"lac": 434, | "lac": 434, | ||
"cellid": 9200, | "cellid": 9200, | ||
− | "measured_at": | + | "measured_at": 1389472224000, |
− | "signal": - | + | "signal": -80, |
"rating": 5.4, | "rating": 5.4, | ||
"speed": 2.32, | "speed": 2.32, | ||
"direction": 93.22, | "direction": 93.22, | ||
− | "act": "EDGE" | + | "act": "EDGE", |
+ | "ta": 3 | ||
}, | }, | ||
{ | { | ||
"lon": 9.441658, | "lon": 9.441658, | ||
"lat": 52.890351, | "lat": 52.890351, | ||
− | "mcc": | + | "mcc": 100, |
"mnc": 2, | "mnc": 2, | ||
− | "lac": | + | "lac": 3, |
"cellid": 9200, | "cellid": 9200, | ||
"measured_at": 1389472225000, | "measured_at": 1389472225000, | ||
− | "signal": - | + | "signal": -80, |
+ | "speed": 11.21, | ||
+ | "act": "HSDPA", | ||
+ | "psc": 2 | ||
+ | }, | ||
+ | { | ||
+ | "lon": 9.441658, | ||
+ | "lat": 52.890351, | ||
+ | "mcc": 100, | ||
+ | "mnc": 2, | ||
+ | "lac": 321, | ||
+ | "cellid": 9200, | ||
+ | "measured_at": 1389472226000, | ||
+ | "signal": -80, | ||
"rating": 11.21, | "rating": 11.21, | ||
− | "act": " | + | "act": "LTE", |
+ | "pci": 2 | ||
+ | }, | ||
+ | { | ||
+ | "lon": 9.441658, | ||
+ | "lat": 52.890351, | ||
+ | "mcc": 100, | ||
+ | "mnc": 2, | ||
+ | "tac": 321, | ||
+ | "cellid": 9200, | ||
+ | "measured_at": 1389472227000, | ||
+ | "signal": -80, | ||
+ | "act": "LTE" | ||
+ | }, | ||
+ | { | ||
+ | "lon": 9.441658, | ||
+ | "lat": 52.890351, | ||
+ | "mcc": 100, | ||
+ | "mnc": 12345, | ||
+ | "lac": 1, | ||
+ | "cellid": 2, | ||
+ | "measured_at": 1389472228000, | ||
+ | "signal": -80, | ||
+ | "act": "eHRPD" | ||
+ | }, | ||
+ | { | ||
+ | "lon": 9.441658, | ||
+ | "lat": 52.890351, | ||
+ | "mcc": 100, | ||
+ | "sid": 12345, | ||
+ | "nid": 1, | ||
+ | "bid": 2, | ||
+ | "measured_at": 1389472229000, | ||
+ | "signal": -80, | ||
+ | "act": "EVDO_0" | ||
} | } | ||
] | ] | ||
Line 545: | Line 639: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Field names recognised:<br> | |
− | mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act | + | mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act, ta, psc, tac, pci, sid, nid, bid |
Maximum file size:<br> | Maximum file size:<br> | ||
Line 552: | Line 646: | ||
Supplemented by the parameter ''key=<apiKey>'' as form POST field, which is the user's API key. | Supplemented by the parameter ''key=<apiKey>'' as form POST field, which is the user's API key. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Response=== | ===Response=== | ||
− | Upon successful insert, HTTP 200 is returned with | + | Upon successful insert, HTTP 200 is returned with ''application/json'' content type and following json document as a content: ''{"code":0,"status":"OK"}'' |
===Business logic=== | ===Business logic=== | ||
Line 696: | Line 654: | ||
===cURL command=== | ===cURL command=== | ||
− | < | + | <syntaxhighlight lang="bash"> |
− | curl -F "key= | + | curl -F "key=apiKey" -F "datafile=@/path/to/file/mydata.json;type=text/plain" http://opencellid.org/measure/uploadJson |
− | </ | + | </syntaxhighlight> |
===Time needed for processing newly uploaded measurements=== | ===Time needed for processing newly uploaded measurements=== | ||
Line 714: | Line 672: | ||
===FAQ=== | ===FAQ=== | ||
<b>What does "optional" mean?</b><br> | <b>What does "optional" mean?</b><br> | ||
− | "optional" means that this field is not required in the | + | "optional" means that this field is not required in the json file.<br> |
− | Minimal | + | Minimal json file looks as follows:<br> |
− | < | + | <syntaxhighlight lang="javascript"> |
− | + | { | |
− | 262,2,434,9200 | + | "measurements": [ |
− | </ | + | { |
+ | "lon": 9.436598, | ||
+ | "lat": 52.892139, | ||
+ | "mcc": 262, | ||
+ | "mnc": 2, | ||
+ | "lac": 434, | ||
+ | "cellid": 9200 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
<b>What does "Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key" mean?</b><br> | <b>What does "Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key" mean?</b><br> | ||
− | This means that the user must send his data (apiKey and | + | This means that the user must send his data (apiKey and json file) in the same way as from the following form:<br> |
− | < | + | <syntaxhighlight lang="html5"> |
− | <form method="post" action="http://opencellid.org/measure/ | + | <form method="post" action="http://opencellid.org/measure/uploadJson" enctype="multipart/form-data"> |
− | enctype="multipart/form-data"> | + | apiKey: <input type="text" name="key" /> |
− | + | JSON (max 2MB): <input type="file" name="datafile" /> | |
− | <input type="text" name="key" | + | <input type="submit" name="upload" value="Upload"/> |
− | + | </form> | |
− | <input type="file" name="datafile" | + | </syntaxhighlight> |
− | <input type="submit" name="upload" value="Upload"/> </form> | + | |
− | </ | + | |
<b>What does the following error mean?</b><br> | <b>What does the following error mean?</b><br> | ||
− | <?xml version="1.0" encoding="UTF-8"? | + | <syntaxhighlight lang="xml"> |
− | <rsp stat="fail"><err info=" cell not found" code="1"/></rsp> | + | <?xml version="1.0" encoding="UTF-8"?> |
+ | <rsp stat="fail"><err info="cell not found" code="1"/></rsp> | ||
+ | </syntaxhighlight> | ||
This error message means that no cell was found for the given user criteria (mcc-mnc-lac-cid combination was not found in database). | This error message means that no cell was found for the given user criteria (mcc-mnc-lac-cid combination was not found in database). | ||
+ | |||
+ | <b>Can I upload CDMA using mcc-mnc-lac-cellid parameters?</b><br> | ||
+ | Yes, you can use mnc as sid, lac as nid and cellid as bid. | ||
==Uploading measurements from CLF3 file== | ==Uploading measurements from CLF3 file== | ||
Line 753: | Line 724: | ||
<pre> | <pre> | ||
//mcc+mnc;cellid;lac;rnc;lat;lon;ratio;data;rfu | //mcc+mnc;cellid;lac;rnc;lat;lon;ratio;data;rfu | ||
− | 26202;07812;03101; | + | 26202;07812;03101;0;45.894375;31.51312;0;City Square;0 |
</pre> | </pre> | ||
− | Columns are semicolon separated and have following strict order:<br> | + | Columns are semicolon separated and have the following strict order:<br> |
mcc+mnc, lac, cellid, rnc, lat, lon, ratio, data, rfu | mcc+mnc, lac, cellid, rnc, lat, lon, ratio, data, rfu | ||
− | There is no header | + | There is no header in CLF3 files. |
+ | Therefore the columns must be provided in the order given above and all values must be there.<br> | ||
+ | |||
+ | You can add comments to CLF3 files.<br> | ||
+ | Comments in CLF3 start with // and extend to the end of the physical line. | ||
Maximum file size:<br> | Maximum file size:<br> | ||
Line 764: | Line 739: | ||
Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key | Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key | ||
− | |||
− | |||
{| class="wikitable sortable" style="font-size: 85%; text-align: left;" | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
Line 793: | Line 766: | ||
| title="Column name" | rnc | | title="Column name" | rnc | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Radio network controller | + | | title="Description" | Radio network controller;<br>provide "0", (zero, without the quotation marks) or an empty string in case there is no rnc value. |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
Line 854: | Line 827: | ||
'''XML:'''<br>Content-Type: text/xml;charset=utf-8 | '''XML:'''<br>Content-Type: text/xml;charset=utf-8 | ||
+ | |||
+ | '''AT:'''<br>Content-Type: text/plain;charset=utf-8 | ||
===Payload=== | ===Payload=== | ||
− | key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&format=<format> | + | key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&radio=<radio>&format=<format> |
Where | Where | ||
Line 880: | Line 855: | ||
| title="Parameter" | <mnc> | | title="Parameter" | <mnc> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Mobile network code | + | | title="Description" | Mobile network code or system identifier |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
| title="Parameter" | <lac> | | title="Parameter" | <lac> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Local area code | + | | title="Description" | Local area code, tracking area code or network id |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
| title="Parameter" | <cellid> | | title="Parameter" | <cellid> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Cell | + | | title="Description" | Cell id or base station id |
| title="Optional" | no | | title="Optional" | no | ||
+ | |- | ||
+ | | title="Parameter" | <radio> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | You can specifiy GSM, UMTS, LTE, NBIOT, NR or CDMA as the radio of returned cell. Otherwise first matched cell will be returned. | ||
+ | | title="Optional" | yes | ||
|- | |- | ||
| title="Parameter" | <format> | | title="Parameter" | <format> | ||
| title="Data type" | string | | title="Data type" | string | ||
− | | title="Description" | You can specifiy xml or json as output. Default is xml. | + | | title="Description" | You can specifiy xml, at or json as output. Default is xml. |
| title="Optional" | yes | | title="Optional" | yes | ||
|} | |} | ||
===Response=== | ===Response=== | ||
+ | |||
+ | ====XML==== | ||
Upon successful request, HTTP 200 is returned with XML of the following format: | Upon successful request, HTTP 200 is returned with XML of the following format: | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<rsp stat="ok"> | <rsp stat="ok"> | ||
− | <cell lat="52.891587" lon="9.438145" mcc="262" mnc="2" lac="434" cellid="9200" averageSignalStrength=" | + | <cell lat="52.891587" |
+ | lon="9.438145" | ||
+ | mcc="262" | ||
+ | mnc="2" | ||
+ | lac="434" | ||
+ | cellid="9200" | ||
+ | averageSignalStrength="-81" | ||
+ | range="123" | ||
+ | samples="13" | ||
+ | changeable="1" | ||
+ | radio="GSM"/> | ||
</rsp> | </rsp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
− | < | + | <syntaxhighlight lang="xml"> |
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <rsp stat="ok"> | ||
+ | <cell lat="51.206" | ||
+ | lon="20.424" | ||
+ | mcc="260" | ||
+ | mnc="2" | ||
+ | lac="52712" | ||
+ | cellid="59350690" | ||
+ | averageSignalStrength="-96" | ||
+ | range="1234" | ||
+ | samples="5" | ||
+ | changeable="1" | ||
+ | radio="UMTS" | ||
+ | rnc="905" | ||
+ | cid="40610"/> | ||
+ | </rsp> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | <syntaxhighlight lang="xml"> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <rsp stat="ok"> | ||
+ | <cell lat="51.90994" | ||
+ | lon="19.505" | ||
+ | mcc="260" | ||
+ | mnc="6" | ||
+ | lac="12" | ||
+ | cellid="864246" | ||
+ | averageSignalStrength="-100" | ||
+ | range="12345" | ||
+ | samples="4" | ||
+ | changeable="1" | ||
+ | radio="LTE" | ||
+ | tac="12"/> | ||
+ | </rsp> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | <syntaxhighlight lang="xml"> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <rsp stat="ok"> | ||
+ | <cell lat="42.46" | ||
+ | lon="-73.245" | ||
+ | mcc="310" | ||
+ | mnc="119" | ||
+ | lac="48" | ||
+ | cellid="4127" | ||
+ | averageSignalStrength="-90" | ||
+ | range="123" | ||
+ | samples="5" | ||
+ | changeable="1" | ||
+ | radio="CDMA" | ||
+ | sid="119" | ||
+ | nid="48" | ||
+ | bid="4127"/> | ||
+ | </rsp> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ====JSON==== | ||
+ | <syntaxhighlight lang="javascript"> | ||
{ | { | ||
− | "lon": | + | "lon": -73.245, |
− | "lat": | + | "lat": 42.46, |
− | "mcc": | + | "mcc": 310, |
− | "mnc": | + | "mnc": 119, |
− | "lac": | + | "lac": 48, |
− | "cellid": | + | "cellid": 4127, |
− | "averageSignalStrength": | + | "averageSignalStrength": -90, |
− | "samples": | + | "range": 123, |
− | "changeable": true | + | "samples": 5, |
+ | "changeable": true, | ||
+ | "radio": "CDMA", | ||
+ | "sid": 119, | ||
+ | "nid": 48, | ||
+ | "bid": 4127 | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
+ | |||
+ | ====AT==== | ||
+ | <syntaxhighlight lang="text"> | ||
+ | +Location:42.46,-73.245,1483228800 | ||
+ | </syntaxhighlight> | ||
===Business logic=== | ===Business logic=== | ||
Line 928: | Line 990: | ||
===Example=== | ===Example=== | ||
− | <u>http:// | + | <u>http://opencellid.org/cell/get?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511</u><br> |
+ | <u>http://opencellid.org/cell/get?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&radio=UMTS</u><br> | ||
+ | <u>http://opencellid.org/cell/get?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&format=json</u> | ||
===Availability=== | ===Availability=== | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
+ | <!-- | ||
==Getting the raw measurements used to compute the position of a cell== | ==Getting the raw measurements used to compute the position of a cell== | ||
Line 946: | Line 1,011: | ||
===Payload=== | ===Payload=== | ||
− | key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&limit=<limit>&offset=<offset>&format=<format> | + | key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&radio=<radio>&limit=<limit>&offset=<offset>&format=<format> |
Where | Where | ||
Line 969: | Line 1,034: | ||
| title="Parameter" | <mnc> | | title="Parameter" | <mnc> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Mobile network code | + | | title="Description" | Mobile network code or system identifier |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
| title="Parameter" | <lac> | | title="Parameter" | <lac> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Local area code | + | | title="Description" | Local area code, tracking area code or network id |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
| title="Parameter" | <cellid> | | title="Parameter" | <cellid> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Cell | + | | title="Description" | Cell id or base station id |
| title="Optional" | no | | title="Optional" | no | ||
+ | |- | ||
+ | | title="Parameter" | <radio> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | You can specifiy GSM, UMTS, LTE, NR, NBIOT or CDMA as the radio of returned data. Otherwise first matched cell will be returned with its measurements. | ||
+ | | title="Optional" | yes | ||
|- | |- | ||
| title="Parameter" | <limit> | | title="Parameter" | <limit> | ||
Line 1,001: | Line 1,071: | ||
===Response=== | ===Response=== | ||
+ | |||
+ | ====XML==== | ||
Upon successful request, HTTP 200 is returned with XML in the following format:<br> | Upon successful request, HTTP 200 is returned with XML in the following format:<br> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<rsp stat="ok"> | <rsp stat="ok"> | ||
− | <cell | + | <cell lat="42.47" |
− | + | lon="-73.24" | |
− | mcc=" | + | mcc="310" |
− | mnc=" | + | mnc="119" |
− | lac=" | + | lac="48" |
− | cellid=" | + | cellid="4217" |
− | + | averageSignalStrength="-91" | |
− | + | range="123" | |
− | samples | + | samples="2" |
− | + | changeable="1" | |
− | + | radio="CDMA" | |
− | + | sid="119" | |
− | + | nid="48" | |
− | + | bid="4217"> | |
− | + | <measure id="53cfd12ee4b033313ec44a01" | |
− | + | lat="42.469" | |
− | + | lon="-73.24" | |
− | + | mcc="310" | |
− | + | mnc="119" | |
− | + | lac="48" | |
− | + | cellid="4217" | |
− | <measure id=" | + | created_at="1400128406300" |
− | lat=" | + | measured_at="1400127406300" |
− | lon=" | + | signal="-90" |
− | mcc=" | + | rating="10.1" |
− | mnc=" | + | speed="20.2" |
− | lac=" | + | direction="30.0" |
− | cellid=" | + | radio="CDMA" |
− | created_at=" | + | sid="119" |
− | measured_at=" | + | nid="48" |
− | signal=" | + | bid="4217"/> |
− | rating=" | + | <measure id="53cfd177e4b033313ec44e51" |
− | speed=" | + | lat="42.471" |
− | direction="0"/> | + | lon="-73.24" |
− | <measure id=" | + | mcc="310" |
− | lat=" | + | mnc="119" |
− | lon=" | + | lac="48" |
− | mcc=" | + | cellid="4217" |
− | mnc=" | + | created_at="1400128493848" |
− | lac=" | + | measured_at="1400127493848" |
− | cellid=" | + | signal="-92" |
− | created_at=" | + | rating="20.0" |
− | measured_at=" | + | speed="40.0" |
− | signal=" | + | direction="40.0" |
− | rating="0" | + | radio="CDMA" |
− | speed="0" | + | sid="119" |
− | direction="0"/> | + | nid="48" |
+ | bid="4217"/> | ||
</cell> | </cell> | ||
</rsp> | </rsp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ====JSON==== | |
− | < | + | <syntaxhighlight lang="javascript"> |
{ | { | ||
"cell": { | "cell": { | ||
− | "lon": | + | "lon": 20.42, |
− | "lat": | + | "lat": 51.2, |
− | "mcc": | + | "mcc": 260, |
"mnc": 2, | "mnc": 2, | ||
− | "lac": | + | "lac": 52702, |
− | "cellid": | + | "cellid": 59350690, |
− | "averageSignalStrength": | + | "averageSignalStrength": -90, |
+ | "range": 123, | ||
"samples": 2, | "samples": 2, | ||
− | "changeable": true | + | "changeable": true, |
+ | "radio": "UMTS", | ||
+ | "rnc": 905, | ||
+ | "cid": 40610 | ||
}, | }, | ||
"measurements": [ | "measurements": [ | ||
{ | { | ||
− | "id": " | + | "id": "52d3db7ccd214d12357b9fee", |
− | "lon": | + | "lon": 20.42, |
− | "lat": | + | "lat": 51.2, |
− | "mcc": | + | "mcc": 260, |
"mnc": 2, | "mnc": 2, | ||
− | "lac": | + | "lac": 52702, |
− | "cellid": | + | "cellid": 59350690, |
− | "created_at": | + | "created_at": 1399614776134, |
− | "measured_at": | + | "measured_at": 1398477214000, |
− | "signal": | + | "signal": -90, |
"rating": 10.1, | "rating": 10.1, | ||
"speed": 20.4, | "speed": 20.4, | ||
"direction": 90.8, | "direction": 90.8, | ||
− | "radio": " | + | "radio": "UMTS", |
+ | "rnc": 905, | ||
+ | "cid": 40610 | ||
}, | }, | ||
{ | { | ||
− | "id": " | + | "id": "52d3db7ccd214d12357b9ff2", |
− | "lon": | + | "lon": 20.42, |
− | "lat": | + | "lat": 51.2, |
− | "mcc": | + | "mcc": 260, |
"mnc": 2, | "mnc": 2, | ||
− | "lac": | + | "lac": 52702, |
− | "cellid": | + | "cellid": 59350690, |
− | "created_at": | + | "created_at": 1380559325000, |
− | "measured_at": | + | "measured_at": 1379477219000, |
− | "signal": | + | "signal": -90, |
− | " | + | "radio": "UMTS", |
− | " | + | "rnc": 905, |
− | " | + | "cid": 40610, |
− | " | + | "psc": 2 |
} | } | ||
] | ] | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
===Business logic=== | ===Business logic=== | ||
Line 1,111: | Line 1,190: | ||
===Example=== | ===Example=== | ||
− | <u>http://www.opencellid.org/cell/getMeasures?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&limit=10&offset=1</u> | + | <u>http://www.opencellid.org/cell/getMeasures?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&limit=10&offset=1</u><br> |
+ | <u>http://www.opencellid.org/cell/getMeasures?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&radio=UMTS&limit=10&offset=1&format=json</u> | ||
===Availability=== | ===Availability=== | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
==Getting the number of all measures used to compute the position of a cell== | ==Getting the number of all measures used to compute the position of a cell== | ||
Line 1,129: | Line 1,209: | ||
===Payload=== | ===Payload=== | ||
− | key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&format=<format> | + | key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&radio=<radio>&format=<format> |
Where | Where | ||
Line 1,152: | Line 1,232: | ||
| title="Parameter" | <mnc> | | title="Parameter" | <mnc> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Mobile network code | + | | title="Description" | Mobile network code or system identifier |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
| title="Parameter" | <lac> | | title="Parameter" | <lac> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Local area code | + | | title="Description" | Local area code, tracking area code or network id |
| title="Optional" | no | | title="Optional" | no | ||
|- | |- | ||
| title="Parameter" | <cellid> | | title="Parameter" | <cellid> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Cell | + | | title="Description" | Cell id or base station id |
| title="Optional" | no | | title="Optional" | no | ||
+ | |- | ||
+ | | title="Parameter" | <radio> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | You can specifiy GSM, UMTS, LTE, NR, NBIOT or CDMA as the radio of returned data. Otherwise first matched cell will be returned with its measurements. | ||
+ | | title="Optional" | yes | ||
|- | |- | ||
| title="Parameter" | <format> | | title="Parameter" | <format> | ||
Line 1,172: | Line 1,257: | ||
===Response=== | ===Response=== | ||
+ | |||
+ | ====XML==== | ||
Upon successful request, HTTP 200 is returned with XML in the following format:<br> | Upon successful request, HTTP 200 is returned with XML in the following format:<br> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
Line 1,179: | Line 1,266: | ||
</rsp> | </rsp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ====JSON==== | |
− | < | + | <syntaxhighlight lang="javascript"> |
{ | { | ||
"count": 123 | "count": 123 | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
===Business logic=== | ===Business logic=== | ||
Line 1,190: | Line 1,277: | ||
===Example=== | ===Example=== | ||
− | <u>http://www.opencellid.org/cell/getMeasuresSize?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511</u> | + | <u>http://www.opencellid.org/cell/getMeasuresSize?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&radio=GSM</u><br> |
+ | <u>http://www.opencellid.org/cell/getMeasuresSize?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&format=json</u> | ||
===Availability=== | ===Availability=== | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
− | + | --> | |
==Getting the list of cells in a specified area== | ==Getting the list of cells in a specified area== | ||
Line 1,208: | Line 1,296: | ||
===Payload=== | ===Payload=== | ||
− | key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&limit=<limit>&offset=<offset>&format=<format> | + | key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&radio=<radio>&limit=<limit>&offset=<offset>&format=<format> |
Where | Where | ||
Line 1,251: | Line 1,339: | ||
| title="Parameter" | <mnc> | | title="Parameter" | <mnc> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Mobile network code; If you want to restrict the result | + | | title="Description" | Mobile network code or system identifier; If you want to restrict the result |
| title="Optional" | yes | | title="Optional" | yes | ||
|- | |- | ||
| title="Parameter" | <lac> | | title="Parameter" | <lac> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Local | + | | title="Description" | Local area code, tracking area code or network id; If you want to restrict the result |
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <radio> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | You can specifiy GSM, UMTS, LTE, NR, NBIOT or CDMA as the radio of returned cells. Otherwise cells with any radios will be returned. | ||
| title="Optional" | yes | | title="Optional" | yes | ||
|- | |- | ||
Line 1,290: | Line 1,383: | ||
lac="1434" | lac="1434" | ||
cellid="17275" | cellid="17275" | ||
− | averageSignalStrength=" | + | averageSignalStrength="-70" |
+ | range="123" | ||
samples="12" | samples="12" | ||
− | changeable="1"/> | + | changeable="1" |
+ | radio="GSM"/> | ||
<cell lat="52.9463072" | <cell lat="52.9463072" | ||
lon="9.258809" | lon="9.258809" | ||
Line 1,299: | Line 1,394: | ||
lac="1434" | lac="1434" | ||
cellid="17276" | cellid="17276" | ||
− | averageSignalStrength=" | + | averageSignalStrength="-98" |
+ | range="1234" | ||
samples="11" | samples="11" | ||
− | changeable="1"/> | + | changeable="1" |
+ | radio="LTE" | ||
+ | tac="1434"/> | ||
<cell lat="52.9367185" | <cell lat="52.9367185" | ||
lon="9.27343925" | lon="9.27343925" | ||
− | mcc=" | + | mcc="260" |
− | mnc=" | + | mnc="16256" |
lac="1434" | lac="1434" | ||
cellid="17272" | cellid="17272" | ||
− | averageSignalStrength=" | + | averageSignalStrength="-93" |
− | + | range="12345" | |
− | + | samples="12" | |
− | + | changeable="1" | |
− | + | radio="CDMA" | |
− | + | sid="16256" | |
− | + | bid="1434" | |
− | + | nid="17272"/> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</rsp> | </rsp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 1,338: | Line 1,432: | ||
lac: <b>1434</b><br/> | lac: <b>1434</b><br/> | ||
cellid: <b>17275</b><br/> | cellid: <b>17275</b><br/> | ||
− | averageSignalStrength: <b> | + | averageSignalStrength: <b>-73</b><br/> |
+ | range: <b>123</b><br/> | ||
samples: <b>12</b><br/> | samples: <b>12</b><br/> | ||
− | changeable: <b>1</b>]]> | + | changeable: <b>1</b><br/> |
+ | radio: <b>GSM</b><br/> | ||
+ | rnc: <b></b><br/> | ||
+ | cid: <b></b><br/> | ||
+ | tac: <b></b><br/> | ||
+ | sid: <b></b><br/> | ||
+ | nid: <b></b><br/> | ||
+ | bid: <b></b>]]> | ||
</description> | </description> | ||
<Point><coordinates>9.252112,52.9523755,0</coordinates></Point> | <Point><coordinates>9.252112,52.9523755,0</coordinates></Point> | ||
Line 1,347: | Line 1,449: | ||
<name></name> | <name></name> | ||
<description><![CDATA[lat: <b>52.9463072</b><br/> | <description><![CDATA[lat: <b>52.9463072</b><br/> | ||
− | lon: <b> | + | lon: <b>21.1525</b><br/> |
− | mcc: <b> | + | mcc: <b>260</b><br/> |
mnc: <b>2</b><br/> | mnc: <b>2</b><br/> | ||
lac: <b>1434</b><br/> | lac: <b>1434</b><br/> | ||
− | cellid: <b> | + | cellid: <b>17272</b><br/> |
− | averageSignalStrength: <b> | + | averageSignalStrength: <b>-83</b><br/> |
+ | range: <b>1234</b><br/> | ||
samples: <b>11</b><br/> | samples: <b>11</b><br/> | ||
− | changeable: <b>1</b>]]> | + | changeable: <b>1</b><br/> |
+ | radio: <b>LTE</b><br/> | ||
+ | rnc: <b></b><br/> | ||
+ | cid: <b></b><br/> | ||
+ | tac: <b>1434</b><br/> | ||
+ | sid: <b></b><br/> | ||
+ | nid: <b></b><br/> | ||
+ | bid: <b></b>]]> | ||
</description> | </description> | ||
− | <Point><coordinates> | + | <Point><coordinates>21.1525,52.9463072,0</coordinates></Point> |
</Placemark> | </Placemark> | ||
<Placemark> | <Placemark> | ||
<name></name> | <name></name> | ||
− | <description><![CDATA[lat: <b> | + | <description><![CDATA[lat: <b>53.9367185</b><br/> |
− | lon: <b> | + | lon: <b>12.27343925</b><br/> |
mcc: <b>262</b><br/> | mcc: <b>262</b><br/> | ||
− | mnc: <b> | + | mnc: <b>16256</b><br/> |
lac: <b>1434</b><br/> | lac: <b>1434</b><br/> | ||
cellid: <b>17272</b><br/> | cellid: <b>17272</b><br/> | ||
− | averageSignalStrength: <b> | + | averageSignalStrength: <b>-91</b><br/> |
− | samples: <b> | + | range: <b>12345</b><br/> |
− | changeable: <b>1</b>]]> | + | samples: <b>2</b><br/> |
+ | changeable: <b>1</b><br/> | ||
+ | radio: <b>CDMA</b><br/> | ||
+ | rnc: <b></b><br/> | ||
+ | cid: <b></b><br/> | ||
+ | tac: <b></b><br/> | ||
+ | sid: <b>16256</b><br/> | ||
+ | nid: <b>1434</b><br/> | ||
+ | bid: <b>17272</b>]]> | ||
</description> | </description> | ||
− | <Point><coordinates> | + | <Point><coordinates>12.27343925,53.9367185,0</coordinates></Point> |
</Placemark> | </Placemark> | ||
<Placemark> | <Placemark> | ||
<name></name> | <name></name> | ||
− | <description><![CDATA[lat: <b>52. | + | <description><![CDATA[lat: <b>52.1322157</b><br/> |
− | lon: <b> | + | lon: <b>21.065345</b><br/> |
− | mcc: <b> | + | mcc: <b>260</b><br/> |
mnc: <b>2</b><br/> | mnc: <b>2</b><br/> | ||
lac: <b>1434</b><br/> | lac: <b>1434</b><br/> | ||
− | cellid: <b> | + | cellid: <b>42042781</b><br/> |
− | averageSignalStrength: <b> | + | averageSignalStrength: <b>-89</b><br/> |
+ | range: <b>1231</b><br/> | ||
samples: <b>5</b><br/> | samples: <b>5</b><br/> | ||
− | changeable: <b>1</b>]]> | + | changeable: <b>1</b><br/> |
+ | radio: <b>UMTS</b><br/> | ||
+ | rnc: <b>641</b><br/> | ||
+ | cid: <b>34205</b><br/> | ||
+ | tac: <b></b><br/> | ||
+ | sid: <b></b><br/> | ||
+ | nid: <b></b><br/> | ||
+ | bid: <b></b>]]> | ||
</description> | </description> | ||
− | <Point><coordinates> | + | <Point><coordinates>21.065345,52.1322157,0</coordinates></Point> |
</Placemark> | </Placemark> | ||
</Document> | </Document> | ||
Line 1,391: | Line 1,517: | ||
====CSV==== | ====CSV==== | ||
− | <pre>lat,lon,mcc,mnc,lac,cellid,averageSignalStrength,samples,changeable | + | <pre>lat,lon,mcc,mnc,lac,cellid,averageSignalStrength,range,samples,changeable,radio,rnc,cid,tac,sid,nid,bid |
− | 52. | + | 52.275505,21.016382,260,2,45080,21728,-55,123,2,1,GSM,,,,,, |
− | 52. | + | 52.201454,21.065345,260,2,58140,42042781,-59,1234,3,1,UMTS,641,34205,,,, |
− | 52. | + | 52.207123,21.029972,260,6,58,119093,-80,122,2,1,LTE,,,58,,, |
− | 52. | + | 52.274612,21.034485,260,16256,45,22613,-98,134,2,1,CDMA,,,,16256,45,22613</pre> |
====JSON==== | ====JSON==== | ||
− | < | + | <syntaxhighlight lang="javascript"> |
{ | { | ||
− | "count": | + | "count": 3, |
− | " | + | "cells": [ |
{ | { | ||
− | + | "lon": 21.014, | |
− | "lon": | + | "lat": 52.278, |
− | "lat": 52. | + | "mcc": 260, |
− | "mcc": | + | |
"mnc": 2, | "mnc": 2, | ||
− | "lac": | + | "lac": 45080, |
− | "cellid": | + | "cellid": 22613, |
− | " | + | "averageSignalStrength": -70, |
− | " | + | "range": 123, |
− | " | + | "samples": 2, |
− | + | "changeable": true, | |
− | + | "radio": "GSM" | |
− | " | + | |
− | "radio": "GSM" | + | |
}, | }, | ||
{ | { | ||
− | + | "lon": 21.04, | |
− | "lon": | + | "lat": 52.2234, |
− | "lat": 52. | + | "mcc": 260, |
− | "mcc": | + | |
"mnc": 2, | "mnc": 2, | ||
− | "lac": | + | "lac": 58140, |
− | "cellid": | + | "cellid": 42042781, |
− | " | + | "averageSignalStrength": -90, |
− | " | + | "range": 125, |
− | " | + | "samples": 2, |
− | " | + | "changeable": true, |
− | " | + | "radio": "UMTS", |
− | " | + | "rnc": 641, |
− | "radio": " | + | "cid": 34205 |
+ | }, | ||
+ | { | ||
+ | "lon": 21.5604, | ||
+ | "lat": 52.284, | ||
+ | "mcc": 260, | ||
+ | "mnc": 2, | ||
+ | "lac": 581, | ||
+ | "cellid": 42048, | ||
+ | "averageSignalStrength": -90, | ||
+ | "range": 12345, | ||
+ | "samples": 9, | ||
+ | "changeable": true, | ||
+ | "radio": "LTE", | ||
+ | "tac": 581 | ||
} | } | ||
] | ] | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
===Business logic=== | ===Business logic=== | ||
Line 1,442: | Line 1,578: | ||
===Example=== | ===Example=== | ||
− | <u>http://www.opencellid.org/cell/getInArea?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&limit=4&offset=16&format=kml</u> | + | <u>http://www.opencellid.org/cell/getInArea?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&limit=4&offset=16&format=kml</u><br> |
+ | <u>http://www.opencellid.org/cell/getInArea?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&radio=CDMA&limit=4&offset=16&format=json</u> | ||
===Availability=== | ===Availability=== | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
==Getting the number of cells in a specified area== | ==Getting the number of cells in a specified area== | ||
Line 1,460: | Line 1,597: | ||
===Payload=== | ===Payload=== | ||
− | key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&format=<format> | + | key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&radio=<radio>&format=<format> |
Where | Where | ||
Line 1,503: | Line 1,640: | ||
| title="Parameter" | <mnc> | | title="Parameter" | <mnc> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Mobile network code; If you want to restrict the result | + | | title="Description" | Mobile network code or system identifier; If you want to restrict the result |
| title="Optional" | yes | | title="Optional" | yes | ||
|- | |- | ||
| title="Parameter" | <lac> | | title="Parameter" | <lac> | ||
| title="Data type" | integer | | title="Data type" | integer | ||
− | | title="Description" | Local | + | | title="Description" | Local area code, tracking area code or network id; If you want to restrict the result |
+ | | title="Optional" | yes | ||
+ | |- | ||
+ | | title="Parameter" | <radio> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | You can specifiy GSM, UMTS, LTE, NR or CDMA as the radio of returned data. Otherwise any cells will be returned. | ||
| title="Optional" | yes | | title="Optional" | yes | ||
|- | |- | ||
Line 1,527: | Line 1,669: | ||
</rsp> | </rsp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ====JSON==== | |
− | < | + | <syntaxhighlight lang="javascript"> |
{ | { | ||
"count": 123 | "count": 123 | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
===Business logic=== | ===Business logic=== | ||
Line 1,538: | Line 1,680: | ||
===Example=== | ===Example=== | ||
− | <u>http://www.opencellid.org/cell/getInAreaSize?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070</u> | + | <u>http://www.opencellid.org/cell/getInAreaSize?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070</u><br> |
+ | <u>http://www.opencellid.org/cell/getInAreaSize?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&radio=CDMA&format=json</u> | ||
===Availability=== | ===Availability=== | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
+ | <!-- | ||
==Deleting a measurement== | ==Deleting a measurement== | ||
Line 1,555: | Line 1,699: | ||
<WebServiceURL>: the URL to the web service | <WebServiceURL>: the URL to the web service | ||
− | <id>: ID of the | + | <id>: ID of the measurement to be deleted |
===Payload=== | ===Payload=== | ||
Line 1,593: | Line 1,737: | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
==Listing a user's measurements== | ==Listing a user's measurements== | ||
Line 1,606: | Line 1,750: | ||
===Payload=== | ===Payload=== | ||
− | key=< | + | key=<apiKey>&limit=<limit>&offset=<offset>&format=<format> |
Where | Where | ||
Line 1,641: | Line 1,785: | ||
===Response=== | ===Response=== | ||
− | Upon successful request, HTTP 200 is returned with one of the following output structures: | + | Upon successful request, HTTP 200 is returned with one of the following output structures, '''oldest''' entries first: |
====CSV (default)==== | ====CSV (default)==== | ||
<pre> | <pre> | ||
− | id,mcc,mnc,lac,cellid,lat,lon,created_at,measured_at,signal,rating,speed,direction | + | id,mcc,mnc,lac,cellid,lat,lon,created_at,measured_at,signal,rating,speed,direction,radio,ta,rnc,cid,psc,tac,pci,sid,nid,bid |
− | + | 127b4c71e4b041a566539fc5,260,2,38,17171,21.0132,52.235,1400589414253,1396096553493,-90,,,,GSM,3,,,,,,,, | |
− | + | 14b52ea2e4b564a972d12361,260,6,52712,59350690,20.424,51.206,1404382897375,1404382894835,-70,,,,UMTS,,905,40610,123,,,,, | |
+ | 14b52ea2e4b564a972c73b29,260,6,18512,30694,21.0132,52.21,1404382866577,1404381511123,-60,10.1,2.3,93.1,LTE,,,,,18512,,,, | ||
+ | 14b52ea2e4b564a972c82a67,260,6,18512,30694,21.0137,52.212,1404382867773,1404381512374,-60,10.2,2.5,93.2,LTE,2,,,,18512,3,,, | ||
+ | 15b52ea2e4b564a972d11114,310,119,48,4127,42.46,-73.245,1404382891235,1404382890121,-99,,,,CDMA,,,,,,,119,48,4127 | ||
</pre> | </pre> | ||
Line 1,654: | Line 1,801: | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<rsp stat="ok"> | <rsp stat="ok"> | ||
− | <measure id=" | + | <measure id="1213db7abcda4d36357b9f12" |
lat="52.892139" | lat="52.892139" | ||
lon="9.436598" | lon="9.436598" | ||
− | mcc="262" | + | mcc="262" |
− | mnc="2" | + | mnc="2" |
− | lac="434" | + | lac="434" |
− | cellid="9200" | + | cellid="9200" |
− | created_at="1311615996112" | + | created_at="1311615996112" |
− | measured_at="1311512208000" | + | measured_at="1311512208000" |
− | signal=" | + | signal="-94" |
− | rating="10" | + | rating="10.1" |
− | speed="10" | + | speed="10.2" |
− | direction="90"/> | + | direction="90.9" |
− | <measure id=" | + | radio="GSM" |
− | lat="52.96261" | + | ta="3" /> |
− | lon="9.241319" | + | <measure id="1213db7abcda4d36357b9f15" |
− | mcc="262" | + | lat="52.212" |
− | mnc="2" | + | lon="21.0137" |
− | lac="1434" | + | mcc="260" |
− | cellid="17271" | + | mnc="2" |
− | created_at=" | + | lac="52712" |
− | measured_at=" | + | cellid="59350690" |
− | signal=" | + | created_at="1311615996122" |
− | rating="20" | + | measured_at="1311511534000" |
− | speed="11" | + | signal="-83" |
− | direction="90"/> | + | rating="20.1" |
+ | speed="1.2" | ||
+ | direction="9.5" | ||
+ | radio="UMTS" | ||
+ | rnc="905" | ||
+ | cid="40610" | ||
+ | psc="102" /> | ||
+ | <measure id="14b12ca2e4b564a972c82321" | ||
+ | lat="52.96261" | ||
+ | lon="9.241319" | ||
+ | mcc="262" | ||
+ | mnc="2" | ||
+ | lac="1434" | ||
+ | cellid="17271" | ||
+ | created_at="1404382891235" | ||
+ | measured_at="1404382890121" | ||
+ | signal="-82" | ||
+ | rating="20.12" | ||
+ | speed="11.12" | ||
+ | direction="90.5" | ||
+ | radio="LTE" | ||
+ | tac="1434" | ||
+ | pci="2" /> | ||
+ | <measure id="15b52ea2e4b564a972d11114" | ||
+ | lat="42.46" | ||
+ | lon="-73.245" | ||
+ | mcc="310" | ||
+ | mnc="119" | ||
+ | lac="48" | ||
+ | cellid="4127" | ||
+ | created_at="1404382897375" | ||
+ | measured_at="1404382897221" | ||
+ | signal="-99" | ||
+ | rating="0.0" | ||
+ | speed="0.0" | ||
+ | direction="0.0" | ||
+ | radio="CDMA" | ||
+ | sid="119" | ||
+ | nid="48" | ||
+ | bid="4127" /> | ||
</rsp> | </rsp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 1,702: | Line 1,888: | ||
measured_at: <b>1311512208000</b><br/> | measured_at: <b>1311512208000</b><br/> | ||
signal: <b>4</b><br/> | signal: <b>4</b><br/> | ||
− | rating: <b>3</b><br/> | + | rating: <b>3.4</b><br/> |
speed: <b>0</b><br/> | speed: <b>0</b><br/> | ||
− | direction: <b>0</b>]]> | + | direction: <b>0</b><br/> |
+ | radio: <b>GSM</b><br/> | ||
+ | ta: <b>2</b><br/> | ||
+ | rnc: <b></b><br/> | ||
+ | cid: <b></b><br/> | ||
+ | psc: <b></b><br/> | ||
+ | tac: <b></b><br/> | ||
+ | pci: <b></b><br/> | ||
+ | sid: <b></b><br/> | ||
+ | nid: <b></b><br/> | ||
+ | bid: <b></b>]]> | ||
</description> | </description> | ||
<Point><coordinates>9.436598,52.892139,0</coordinates></Point> | <Point><coordinates>9.436598,52.892139,0</coordinates></Point> | ||
Line 1,714: | Line 1,910: | ||
mnc: <b>2</b><br/> | mnc: <b>2</b><br/> | ||
lac: <b>1434</b><br/> | lac: <b>1434</b><br/> | ||
− | cellid: <b> | + | cellid: <b>59350690</b><br/> |
lat: <b>52.96261</b><br/> | lat: <b>52.96261</b><br/> | ||
lon: <b>9.241319</b><br/> | lon: <b>9.241319</b><br/> | ||
Line 1,720: | Line 1,916: | ||
measured_at: <b>1311511534000</b><br/> | measured_at: <b>1311511534000</b><br/> | ||
signal: <b>3</b><br/> | signal: <b>3</b><br/> | ||
− | rating: <b>4</b><br/> | + | rating: <b>4.4</b><br/> |
− | speed: <b> | + | speed: <b>4.02</b><br/> |
− | direction: <b>0</b>]]> | + | direction: <b>0.56</b><br/> |
+ | radio: <b>UMTS</b><br/> | ||
+ | ta: <b></b><br/> | ||
+ | rnc: <b>905</b><br/> | ||
+ | cid: <b>40610</b><br/> | ||
+ | psc: <b>12</b><br/> | ||
+ | tac: <b></b><br/> | ||
+ | pci: <b></b><br/> | ||
+ | sid: <b></b><br/> | ||
+ | nid: <b></b><br/> | ||
+ | bid: <b></b>]]> | ||
</description> | </description> | ||
<Point><coordinates>9.241319,52.96261,0</coordinates></Point> | <Point><coordinates>9.241319,52.96261,0</coordinates></Point> | ||
Line 1,731: | Line 1,937: | ||
====JSON==== | ====JSON==== | ||
− | < | + | <syntaxhighlight lang="javascript"> |
{ | { | ||
"count": 2, | "count": 2, | ||
"measurements": [ | "measurements": [ | ||
{ | { | ||
− | "id": " | + | "id": "11123b7abcda1436357b9f12", |
"lon": 9.436598, | "lon": 9.436598, | ||
"lat": 52.892139, | "lat": 52.892139, | ||
Line 1,745: | Line 1,951: | ||
"created_at": 1311615996112, | "created_at": 1311615996112, | ||
"measured_at": 1311512208000, | "measured_at": 1311512208000, | ||
− | "signal": | + | "signal": -84, |
"rating": 10.3, | "rating": 10.3, | ||
"speed": 10.2, | "speed": 10.2, | ||
"direction": 90.08, | "direction": 90.08, | ||
− | "radio": "GSM" | + | "radio": "GSM", |
+ | "ta": 3 | ||
}, | }, | ||
{ | { | ||
− | "id": " | + | "id": "11123b7abcda1236357b9f15", |
"lon": 9.241319, | "lon": 9.241319, | ||
"lat": 52.96261, | "lat": 52.96261, | ||
Line 1,758: | Line 1,965: | ||
"mnc": 2, | "mnc": 2, | ||
"lac": 1434, | "lac": 1434, | ||
− | "cellid": | + | "cellid": 42119093, |
"created_at": 1311615996122, | "created_at": 1311615996122, | ||
"measured_at": 1311511534000, | "measured_at": 1311511534000, | ||
− | "signal": | + | "signal": -93, |
"rating": 20.13, | "rating": 20.13, | ||
"speed": 11.1, | "speed": 11.1, | ||
"direction": 90.01, | "direction": 90.01, | ||
− | "radio": " | + | "radio": "UMTS", |
+ | "rnc": 642, | ||
+ | "cid": 44981 | ||
} | } | ||
] | ] | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
+ | |||
+ | If you want the '''newest''' entries, use an <code>&offset=</code> to subtract most of the [[#Getting the number of measurements from a user|number of measurements from a user]]. | ||
===Business logic=== | ===Business logic=== | ||
Line 1,780: | Line 1,991: | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
==Getting the number of measurements from a user== | ==Getting the number of measurements from a user== | ||
Line 1,808: | Line 2,019: | ||
| title="Description" | API key assigned to the user | | title="Description" | API key assigned to the user | ||
| title="Optional" | no | | title="Optional" | no | ||
+ | |- | ||
+ | | title="Parameter" | <format> | ||
+ | | title="Data type" | string | ||
+ | | title="Description" | You can specifiy xml or json as output. Default is xml. | ||
+ | | title="Optional" | yes | ||
|} | |} | ||
===Response=== | ===Response=== | ||
+ | |||
+ | ====XML==== | ||
Upon successful request, HTTP 200 is returned with XML in the following format: | Upon successful request, HTTP 200 is returned with XML in the following format: | ||
Line 1,818: | Line 2,036: | ||
<measurements count="123"/> | <measurements count="123"/> | ||
</rsp> | </rsp> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ====JSON==== | ||
+ | <syntaxhighlight lang="javascript"> | ||
+ | { | ||
+ | "count": 5 | ||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 1,829: | Line 2,054: | ||
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | This feature is available free of charge in case your application contributes data to OpenCellID at the same time.<br> | ||
In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | In case you want to use this service without contributing to OpenCellID please refer to <u>[[Commercial_users|the commercial users guideline]]</u>.<br> | ||
− | An automated check for providing this service to white-listed apiKeys only | + | An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014 |
+ | |||
+ | ==Check the online status of OpenCellID== | ||
+ | GET/POST request to | ||
+ | <pre>http://<WebServiceURL>/ocid/status</pre> | ||
+ | |||
+ | ===Parameters=== | ||
+ | <WebServiceURL>: the URL to the web service | ||
+ | |||
+ | ===Response=== | ||
+ | Upon successful request, HTTP 200 is returned with JSON in the following format: | ||
+ | <syntaxhighlight lang="javascript"> | ||
+ | {"status":"ok"} | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===Business logic=== | ||
+ | The request is handled by de.enaikoon.gpssuite.web.ocid.StatusController | ||
+ | |||
+ | ===Example=== | ||
+ | <u>http://opencellid.org/ocid/status</u> | ||
+ | |||
+ | --> |
Latest revision as of 15:05, 14 July 2023
This wiki page describes all available API functions.
Please contact Unwired Labs if you have any suggestions for improvement or bugs to report.
API key
Most of the API calls require an API key. This API key can be obtained by registering here.
All uploaded data will be stored along with this API key. This offers many functions, including the deletion of data from users that provide incorrect data.
It also allows the identification of users that are violating the community server usage policy.
Some smartphone apps also require an API key, for example the Tower Collector.
For those who prefer contributing data to OpenCellID completely anonymously we recommend using the OpenCellID client which does not require an API key for uploading data.
In the examples below "apiKey" is used as a place holder for this parameter.
"changeable" attribute
The meaning of the "changeable" value returned by some methods is the following:
- some cell positions in the database are precise; for example, the GSM network provider O2 in Germany provides GPS information along with the Cell ID information and software is able to extract this information for OpenCellID.
- in this case, new measurements for the cell are stored and shown on the map; however, their GPS positions are not used for calculating the GPS position of the cell tower.
changeable=1:
the GPS position of the cell tower has been calculated from all available measurements
changeable=0:
the GPS position of the cell tower is precise; no measurements have been used to calculate it.
Filtering of data
The following filters are currently applied to all incoming data and decide if a measurement is suspicious or valid.
Suspect data is inserted into a database table with suspect data which can be re-examined at a later stage if required.
Parameter | Rules |
---|---|
act | must be one of supported type: 1xRTT, CDMA, eHRPD, IS95A, IS95B, EVDO_0, EVDO_A, EVDO_B, UMTS, HSPA+, HSDPA, HSUPA, HSPA, LTE, LTECATM, NR, NBIOT, EDGE, GPRS, GSM |
MCC | must be known in the database |
MCC | must be in the range of 100 to 999 |
MNC/SID | must be known in the database |
MNC | must be in the range of 0 to 999 for GSM, UMTS, LTE, NR and NBIOT |
MNC/SID | must be in the range of 0 to 32767 for CDMA |
LAC/TAC/NID | must be in the range of 1 to 65535 for all radios except NR, 0 to 16777215 for NR. |
CID | must be in the range of 1 to 65535 for GSM |
CID | must be in the range of 1 to 268435455 for UMTS and LTE, 1 to 68719476735 for NR |
CID/BID | must be in the range 1 to 65535 for CDMA |
longitude | must be float (not integer) |
longitude | must be in the range: (-180,0) U (0,180) |
longitude | must be != 0 |
latitude | must be float (not integer) |
latitude | must be in the range: (-90,0) U (0,90) |
latitude | must be != 0 |
Parameters | Rules |
---|---|
MCC,MNC,LAC,CID,longitude,latitude | must have unique coordinates for the cell |
MCC,longitude,latitude | must have coordinates in the home country |
MCC,MNC,LAC,CID,longitude,latitude | must be closer than 150 km away from the cell (only in case of precise cells) |
The following filters are currently applied to optional fields in all incoming data.
If an optional field has invalid value, then only the value is rejected.
Parameter | Rules | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
measured_at | must be in one of supported date formats: - timestamp (milliseconds since 1/1/1970 00:00:00 GMT), - "yyyy-MM-dd HH:mm:ss", - "yyyyMMddHHmmss", - "yyyy-MM-dd HH:mm:ss.SSSZ", - "yyyy-MM-dd" | ||||||||||||
signal |
| ||||||||||||
rating | must be in metres in the range of 0 to 35000 | ||||||||||||
speed | must be in metres/second in the range of 0 to 300 | ||||||||||||
direction | must be in the range of 0 to 360 | ||||||||||||
ta | only for GSM and LTE; must be in the range of 0 to 63 | ||||||||||||
psc | only for UMTS; must be in the range of 0 to 511 | ||||||||||||
pci | only for LTE; must be in the range of 0 to 503 | ||||||||||||
txp | must be in the range of -200 to 100 | ||||||||||||
tsrf | must be in the range of -100 to 100 |
Payload legend
A typical payload for API requests and Measurement submissions may include some or all of the following parameters:
Parameter | Data type | Description | Optional | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<apiKey> | string | API key assigned to the user submitting the measurement | no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<lat> | double | Latitude | no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<lon> | double | Longitude | no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<mcc> | integer | Mobile country code | no (except CDMA) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<mnc> | integer | Mobile network code or system identifier | no (except CDMA if sid is provided) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<lac> | integer | Local area code, tracking area code or network id | no (except CDMA if nid is provided or LTE or NR if tac is provided) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<cellid> | integer | Cell tower id or base station id | no (except CDMA if bid is provided) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<signal> | integer | Signal level: either in dBm or as defined in TS 27.007 8.5; both is accepted. | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<measured_at> | date | When the measurement was measured. Supported date formats: - timestamp (milliseconds since 1/1/1970 00:00:00 GMT) - "yyyy-MM-dd HH:mm:ss" - "yyyyMMddHHmmss" - "yyyy-MM-dd HH:mm:ss.SSSZ" - "yyyy-MM-dd" Time zone: UTC |
yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<rating> | double | GPS quality/accuracy information (metres) | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<speed> | double | Speed when creating the measurement, in metres/second | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<direction> | double | Heading direction when creating the measurement (0=north, 90=east) |
yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<act> | string | Network access type; currently supported: 1xRTT, CDMA, eHRPD, IS95A, IS95B, EVDO_0, EVDO_A, EVDO_B, UMTS, HSPA+, HSDPA, HSUPA, HSPA, TDSCDMA, LTE, LTECATM, NR, NBIOT, EDGE, GPRS, GSM
|
yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<ta> | integer | Timing advance; only for GSM and LTE | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<psc> | integer | Primary scrambling code; only for UMTS and TDSCDMA | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<tac> | integer | Tracking area code; only for LTE or NR | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<pci> | integer | Physical cell Id; only for LTE or NR | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<sid> | integer | System identifier; only for CDMA | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<nid> | integer | Network id; only for CDMA | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<bid> | integer | Base station id; only for CDMA | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<devn> | string | Device name as concatenated strings with the manufacturer and the model name; max 50 characters | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<txp> | integer | TX power in dBm | yes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<tsrf> | integer | Temperature in the RF module; in degrees Celsius; only with <txp> parameter | yes |
Error codes
The following error codes might be returned by OpenCellID services:
Error code | HTTP code | Description |
---|---|---|
1 | 200 | Cell not found |
2 | 401 | Invalid API key |
3 | 400 | Invalid input data |
4 | 403 | Your API key must be white listed in order to run this operation. This service is free of charge as long as your application contributes to the OpenCellID project. Should your application meet this requirement, please contact [email protected] for the authorisation of your API key. For further details please visit: http://wiki.opencellid.org/wiki/Commercial_users http://wiki.opencellid.org/wiki/Request_whitelisting You can alternatively download the entire database here: http://opencellid.org/downloads/ |
5 | 500 | Internal server error |
6 | 503 | Too many requests. Try later again. |
7 | 429 | Daily limit 1000 requests exceeded for your API key. For further details please visit: http://wiki.opencellid.org/wiki/Commercial_users You can alternatively download the entire database here: http://opencellid.org/downloads/ |
Adding a single measurement
GET/POST request to
http://<WebServiceURL>/measure/add
Parameters
<WebServiceURL>: the URL to the web service
Payload
key=<apiKey>&lat=<lat>&lon=<lon>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&signal=<signal>&measured_at=<measured_at>&rating=<rating>&speed=<speed>&direction=<direction>&act=<act>&ta=<ta>&psc=<psc>&tac=<tac>&pci=<pci>&sid=<sid>&nid=<nid>&bid=<bid>&devn=<devn>&txp=<txp>&tsrf=<tsrf>
Where
Response
Upon successful insert, HTTP 200 is returned with the string "Your measurement has been inserted."
Business logic
The request is handled by de.enaikoon.gpssuite.web.measure.NewMeasureController.
The parameters are read into a map and then parsed into a de.enaikoon.m2m.gsmcellmanagment.model.CellMeasurement, and persisted by de.enaikoon.m2m.gsmcellmanagment.dao.mongodb.GsmCellDao (see the Spring common-business.xml configuration) which saves data via a Mongo driver.
The user is deduced from the API key which is a string unique to each user. User ID is persisted as a field in the same object. Suspect measurements are saved into a special collection: CellMeasurementSuspect. This collection currently cannot be accessed. The suspect data is rechecked every now and then after the filters have been updated in order to check if some initially supsect data can be recovered.
Example
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10&direction=90&act=GPRS
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=GPRS&ta=3
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=HSPA+&psc=3
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=LTE&pci=3
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&tac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=LTE&pci=3
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&rating=10.1&direction=90.3&speed=12.3&act=1xRTT
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&sid=10&nid=11&bid=12&rating=10.1&direction=90.3&speed=12.3&act=1xRTT
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&sid=10&nid=11&bid=12&rating=10.1&direction=90.3&speed=12.3&act=eHRPD
http://opencellid.org/measure/add?key=xxx&lat=10.11&lon=11.12&mcc=100&mnc=10&lac=11&cellid=12&act=GSM&devn=Samsung%20GT-S5830L&txp=-45&tsrf=22
Time needed for processing newly uploaded measurements
After uploading new measurements to the OpenCellID community servers they are added to our waiting queues and processed in the background. We aim the real-time processing, but maximum time depends on traffic on OpenCellID servers. Current throughput of our servers is around 15000 measurements per second.
Measurements are processed in 3 steps:
- parsing and filtering raw data
- updating measurement statistics and storing measurements in the database
- updating existing cell towers information or adding new cell towers to the database
Our waiting queues for cell towers and for measurements are independent, so you can see your measurements in the OpenCellID database but related cell towers might be not updated yet. This means that if you upload a measurement of a cell tower that was not in the database before and the waiting queue for cell towers has some data to process, you have to expect some times (usually few minutes) until the queue delivers the newly uploaded cell tower information.
Uploading measurements from a CSV file
POST request to
http://<WebServiceURL>/measure/uploadCsv
Parameters
<WebServiceURL>: the URL to the web service
Payload
CSV file of the following format:
mcc,mnc,lac,cellid,lon,lat,signal,measured_at,rating,speed,direction,act,ta,psc,tac,pci,sid,nid,bid 100,2,434,9200,9.436598,52.892139,4,1389472208000,5.4,0,0,GPRS,3,,,,,, 100,2,434,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,HSPA+,,4,,,,, 100,2,434,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,LTE,,,,4,,, 100,2,,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,LTE,,,434,4,,, 100,2,432,9200,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,LTE,,,432,4,,, 100,1234,432,9201,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,eHRPD,,,,,,, 100,1234,432,9201,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,eHRPD,,,,,1234,432,9201 100,,,,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,1xRTT,,,,,1234,432,9201 ,,,,9.441658,52.890351,4,1389472225000,20.1,10.4,90.1,eHRPD,,,,,1234,432,9201 ...
Column names recognised:
mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act, ta, psc, tac, pci, sid, nid, bid
Maximum file size:
2 MB; upload multiple files if you want to upload more data.
Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key.
Response
Upon successful insert, HTTP 200 is returned with the string "0,OK".
Business logic
The request is handled by de.enaikoon.gpssuite.web.measure.NewMeasureController.
cURL command
curl -F "key=apiKey" -F "datafile=@/path/to/file/mydata.csv;type=text/plain" http://opencellid.org/measure/uploadCsv
Time needed for processing newly uploaded measurements
After uploading new measurements to the OpenCellID community servers they are added to our waiting queues and processed in the background. We aim the real-time processing, but maximum time depends on traffic on OpenCellID servers. Current throughput of our servers is around 15000 measurements per second.
Measurements are processed in 3 steps:
- parsing and filtering raw data
- updating measurement statistics and storing measurements in the database
- updating existing cell towers information or adding new cell towers to the database
Our waiting queues for cell towers and for measurements are independent, so you can see your measurements in the OpenCellID database but related cell towers might be not updated yet. This means that if you upload a measurement of a cell tower that was not in the database before and the waiting queue for cell towers has some data to process, you have to expect some times (usually few minutes) until the queue delivers the newly uploaded cell tower information.
FAQ
What does "optional" mean?
"optional" means that this field is not required in the csv file.
Minimal csv file looks as follows:
mcc,mnc,lac,cellid,lon,lat 262,2,434,9200,9.436598,52.892139
What does "Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key" mean?
This means that the user must send his data (apiKey and csv file) in the same way as from the following form:
<form method="post" action="http://opencellid.org/measure/uploadCsv" enctype="multipart/form-data"> apiKey: <input type="text" name="key" /> CSV (max 2MB): <input type="file" name="datafile" /> <input type="submit" name="upload" value="Upload"/> </form>
What does the following error mean?
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"><err info="cell not found" code="1"/></rsp>
This error message means that no cell was found for the given user criteria (mcc-mnc-lac-cid combination was not found in database).
Can I upload CDMA using mcc-mnc-lac-cellid parameters?
Yes, you can use mnc as sid, lac as nid and cellid as bid.
Uploading measurements from a JSON file
POST request to
http://<WebServiceURL>/measure/uploadJson
Parameters
<WebServiceURL>: the URL to the web service
Payload
JSON file (send in datafile parameter) of the following format:
{ "measurements": [ { "lon": 9.436598, "lat": 52.892139, "mcc": 100, "mnc": 2, "lac": 434, "cellid": 9200, "measured_at": 1389472224000, "signal": -80, "rating": 5.4, "speed": 2.32, "direction": 93.22, "act": "EDGE", "ta": 3 }, { "lon": 9.441658, "lat": 52.890351, "mcc": 100, "mnc": 2, "lac": 3, "cellid": 9200, "measured_at": 1389472225000, "signal": -80, "speed": 11.21, "act": "HSDPA", "psc": 2 }, { "lon": 9.441658, "lat": 52.890351, "mcc": 100, "mnc": 2, "lac": 321, "cellid": 9200, "measured_at": 1389472226000, "signal": -80, "rating": 11.21, "act": "LTE", "pci": 2 }, { "lon": 9.441658, "lat": 52.890351, "mcc": 100, "mnc": 2, "tac": 321, "cellid": 9200, "measured_at": 1389472227000, "signal": -80, "act": "LTE" }, { "lon": 9.441658, "lat": 52.890351, "mcc": 100, "mnc": 12345, "lac": 1, "cellid": 2, "measured_at": 1389472228000, "signal": -80, "act": "eHRPD" }, { "lon": 9.441658, "lat": 52.890351, "mcc": 100, "sid": 12345, "nid": 1, "bid": 2, "measured_at": 1389472229000, "signal": -80, "act": "EVDO_0" } ] }
Field names recognised:
mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act, ta, psc, tac, pci, sid, nid, bid
Maximum file size:
2 MB; upload multiple files if you want to upload more data.
Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key.
Response
Upon successful insert, HTTP 200 is returned with application/json content type and following json document as a content: {"code":0,"status":"OK"}
Business logic
The request is handled by de.enaikoon.gpssuite.web.measure.NewMeasureController.
cURL command
curl -F "key=apiKey" -F "datafile=@/path/to/file/mydata.json;type=text/plain" http://opencellid.org/measure/uploadJson
Time needed for processing newly uploaded measurements
After uploading new measurements to the OpenCellID community servers they are added to our waiting queues and processed in the background. We aim the real-time processing, but maximum time depends on traffic on OpenCellID servers. Current throughput of our servers is around 15000 measurements per second.
Measurements are processed in 3 steps:
- parsing and filtering raw data
- updating measurement statistics and storing measurements in the database
- updating existing cell towers information or adding new cell towers to the database
Our waiting queues for cell towers and for measurements are independent, so you can see your measurements in the OpenCellID database but related cell towers might be not updated yet. This means that if you upload a measurement of a cell tower that was not in the database before and the waiting queue for cell towers has some data to process, you have to expect some times (usually few minutes) until the queue delivers the newly uploaded cell tower information.
FAQ
What does "optional" mean?
"optional" means that this field is not required in the json file.
Minimal json file looks as follows:
{ "measurements": [ { "lon": 9.436598, "lat": 52.892139, "mcc": 262, "mnc": 2, "lac": 434, "cellid": 9200 } ] }
What does "Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key" mean?
This means that the user must send his data (apiKey and json file) in the same way as from the following form:
<form method="post" action="http://opencellid.org/measure/uploadJson" enctype="multipart/form-data"> apiKey: <input type="text" name="key" /> JSON (max 2MB): <input type="file" name="datafile" /> <input type="submit" name="upload" value="Upload"/> </form>
What does the following error mean?
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"><err info="cell not found" code="1"/></rsp>
This error message means that no cell was found for the given user criteria (mcc-mnc-lac-cid combination was not found in database).
Can I upload CDMA using mcc-mnc-lac-cellid parameters?
Yes, you can use mnc as sid, lac as nid and cellid as bid.
Uploading measurements from CLF3 file
POST request to
http://<WebServiceURL>/measure/uploadClf
Parameters
<WebServiceURL>: The URL to the web service
Payload
CLF version 3.0 file (to be sent in datafile parameter) of the following format:
//mcc+mnc;cellid;lac;rnc;lat;lon;ratio;data;rfu 26202;07812;03101;0;45.894375;31.51312;0;City Square;0
Columns are semicolon separated and have the following strict order:
mcc+mnc, lac, cellid, rnc, lat, lon, ratio, data, rfu
There is no header in CLF3 files.
Therefore the columns must be provided in the order given above and all values must be there.
You can add comments to CLF3 files.
Comments in CLF3 start with // and extend to the end of the physical line.
Maximum file size:
2 MB; upload multiple files if you want to upload more data.
Supplemented by the parameter key=<apiKey> as form POST field, which is the user's API key
Column name | Data type | Description | Optional |
---|---|---|---|
<mcc+mnc> | string | Mobile country code and mobile network code | no |
lac | integer | Local area code | no |
cellid | integer | Cell tower id | no |
rnc | integer | Radio network controller; provide "0", (zero, without the quotation marks) or an empty string in case there is no rnc value. |
no |
lat | double | Latitude | no |
lon | double | Latitude | no |
ratio | integer | Accuracy of the cell coordinates. Use -1 for the exact position. | yes |
data | string | Short cell description | yes |
rfu | string | Not really used; use 0 if unknown | yes |
Response
On successful insert return HTTP 200 with the string "0,OK".
Business logic
The request is handled by de.enaikoon.gpssuite.web.measure.NewMeasureController.
Time needed for processing newly uploaded measurements
After uploading new measurements to the OpenCellID community servers they are added to our waiting queues and processed in the background. We aim the real-time processing, but maximum time depends on traffic on OpenCellID servers. Current throughput of our servers is around 15000 measurements per second.
Measurements are processed in 3 steps:
- parsing and filtering raw data
- updating measurement statistics and storing measurements in the database
- updating existing cell towers information or adding new cell towers to the database
Our waiting queues for cell towers and for measurements are independent, so you can see your measurements in the OpenCellID database but related cell towers might be not updated yet. This means that if you upload a measurement of a cell tower that was not in the database before and the waiting queue for cell towers has some data to process, you have to expect some times (usually few minutes) until the queue delivers the newly uploaded cell tower information.
Getting cell position
GET/POST request to
http://<WebServiceURL>/cell/get
Parameters
<WebServiceURL>: the URL to the web service
Headers
JSON:
Content-Type: application/json;charset=UTF-8
XML:
Content-Type: text/xml;charset=utf-8
AT:
Content-Type: text/plain;charset=utf-8
Payload
key=<apiKey>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&cellid=<cellid>&radio=<radio>&format=<format>
Where
Parameter | Data type | Description | Optional |
---|---|---|---|
<apiKey> | string | API key assigned to the user | no |
<mcc> | integer | Mobile country code | no |
<mnc> | integer | Mobile network code or system identifier | no |
<lac> | integer | Local area code, tracking area code or network id | no |
<cellid> | integer | Cell id or base station id | no |
<radio> | string | You can specifiy GSM, UMTS, LTE, NBIOT, NR or CDMA as the radio of returned cell. Otherwise first matched cell will be returned. | yes |
<format> | string | You can specifiy xml, at or json as output. Default is xml. | yes |
Response
XML
Upon successful request, HTTP 200 is returned with XML of the following format:
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <cell lat="52.891587" lon="9.438145" mcc="262" mnc="2" lac="434" cellid="9200" averageSignalStrength="-81" range="123" samples="13" changeable="1" radio="GSM"/> </rsp>
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <cell lat="51.206" lon="20.424" mcc="260" mnc="2" lac="52712" cellid="59350690" averageSignalStrength="-96" range="1234" samples="5" changeable="1" radio="UMTS" rnc="905" cid="40610"/> </rsp>
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <cell lat="51.90994" lon="19.505" mcc="260" mnc="6" lac="12" cellid="864246" averageSignalStrength="-100" range="12345" samples="4" changeable="1" radio="LTE" tac="12"/> </rsp>
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <cell lat="42.46" lon="-73.245" mcc="310" mnc="119" lac="48" cellid="4127" averageSignalStrength="-90" range="123" samples="5" changeable="1" radio="CDMA" sid="119" nid="48" bid="4127"/> </rsp>
JSON
{ "lon": -73.245, "lat": 42.46, "mcc": 310, "mnc": 119, "lac": 48, "cellid": 4127, "averageSignalStrength": -90, "range": 123, "samples": 5, "changeable": true, "radio": "CDMA", "sid": 119, "nid": 48, "bid": 4127 }
AT
+Location:42.46,-73.245,1483228800
Business logic
The request is handled by de.enaikoon.gpssuite.web.cell.CellController.
It uses de.enaikoon.m2m.gsmcellmanagment.dao.mongodb.GsmCellDao to calculate the average cell measurement, and builds an XML string to return to the user.
Example
http://opencellid.org/cell/get?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511
http://opencellid.org/cell/get?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&radio=UMTS
http://opencellid.org/cell/get?key=xxx&mcc=260&mnc=2&lac=10250&cellid=26511&format=json
Availability
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.
In case you want to use this service without contributing to OpenCellID please refer to the commercial users guideline.
An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014
Getting the list of cells in a specified area
GET request to
http://<WebServiceURL>/cell/getInArea
Parameters
<WebServiceURL>: the URL to the web service
Payload
key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&radio=<radio>&limit=<limit>&offset=<offset>&format=<format>
Where
Parameter | Data type | Description | Optional |
---|---|---|---|
<apiKey> | string | API key assigned to the user | no |
<latmin> | double | Minimal bounding latitude | no |
<lonmin> | double | Minimal bounding longitude | no |
<latmax> | double | Maximal bounding latitude | no |
<lonmax> | double | Maximal bounding longitude | no |
<mcc> | integer | Mobile country code; If you want to restrict the result to a specific country | yes |
<mnc> | integer | Mobile network code or system identifier; If you want to restrict the result | yes |
<lac> | integer | Local area code, tracking area code or network id; If you want to restrict the result | yes |
<radio> | string | You can specifiy GSM, UMTS, LTE, NR, NBIOT or CDMA as the radio of returned cells. Otherwise cells with any radios will be returned. | yes |
<limit> | integer | A number defining maximum size of the returned list. Default and maximum value is 1000. | yes |
<offset> | integer | The field says to skip that many cells before beginning to return cells. Default is 0. | yes |
<format> | string | You can specify kml, xml, csv or json as output. Default is kml. In csv type of output, there is a first line defining the content of the list. |
yes |
For the total number of cells in a specified area, please use /cell/getInAreaSize (described below).
Response
Upon successful request, HTTP 200 is returned with one of the following output structures:
XML
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <cell lat="52.9523755" lon="9.252112" mcc="262" mnc="2" lac="1434" cellid="17275" averageSignalStrength="-70" range="123" samples="12" changeable="1" radio="GSM"/> <cell lat="52.9463072" lon="9.258809" mcc="262" mnc="2" lac="1434" cellid="17276" averageSignalStrength="-98" range="1234" samples="11" changeable="1" radio="LTE" tac="1434"/> <cell lat="52.9367185" lon="9.27343925" mcc="260" mnc="16256" lac="1434" cellid="17272" averageSignalStrength="-93" range="12345" samples="12" changeable="1" radio="CDMA" sid="16256" bid="1434" nid="17272"/> </rsp>
KML (default)
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <name>OpenCellID Cells</name> <description>List of available cells</description> <Placemark> <name></name> <description><![CDATA[lat: <b>52.9523755</b><br/> lon: <b>9.252112</b><br/> mcc: <b>262</b><br/> mnc: <b>2</b><br/> lac: <b>1434</b><br/> cellid: <b>17275</b><br/> averageSignalStrength: <b>-73</b><br/> range: <b>123</b><br/> samples: <b>12</b><br/> changeable: <b>1</b><br/> radio: <b>GSM</b><br/> rnc: <b></b><br/> cid: <b></b><br/> tac: <b></b><br/> sid: <b></b><br/> nid: <b></b><br/> bid: <b></b>]]> </description> <Point><coordinates>9.252112,52.9523755,0</coordinates></Point> </Placemark> <Placemark> <name></name> <description><![CDATA[lat: <b>52.9463072</b><br/> lon: <b>21.1525</b><br/> mcc: <b>260</b><br/> mnc: <b>2</b><br/> lac: <b>1434</b><br/> cellid: <b>17272</b><br/> averageSignalStrength: <b>-83</b><br/> range: <b>1234</b><br/> samples: <b>11</b><br/> changeable: <b>1</b><br/> radio: <b>LTE</b><br/> rnc: <b></b><br/> cid: <b></b><br/> tac: <b>1434</b><br/> sid: <b></b><br/> nid: <b></b><br/> bid: <b></b>]]> </description> <Point><coordinates>21.1525,52.9463072,0</coordinates></Point> </Placemark> <Placemark> <name></name> <description><![CDATA[lat: <b>53.9367185</b><br/> lon: <b>12.27343925</b><br/> mcc: <b>262</b><br/> mnc: <b>16256</b><br/> lac: <b>1434</b><br/> cellid: <b>17272</b><br/> averageSignalStrength: <b>-91</b><br/> range: <b>12345</b><br/> samples: <b>2</b><br/> changeable: <b>1</b><br/> radio: <b>CDMA</b><br/> rnc: <b></b><br/> cid: <b></b><br/> tac: <b></b><br/> sid: <b>16256</b><br/> nid: <b>1434</b><br/> bid: <b>17272</b>]]> </description> <Point><coordinates>12.27343925,53.9367185,0</coordinates></Point> </Placemark> <Placemark> <name></name> <description><![CDATA[lat: <b>52.1322157</b><br/> lon: <b>21.065345</b><br/> mcc: <b>260</b><br/> mnc: <b>2</b><br/> lac: <b>1434</b><br/> cellid: <b>42042781</b><br/> averageSignalStrength: <b>-89</b><br/> range: <b>1231</b><br/> samples: <b>5</b><br/> changeable: <b>1</b><br/> radio: <b>UMTS</b><br/> rnc: <b>641</b><br/> cid: <b>34205</b><br/> tac: <b></b><br/> sid: <b></b><br/> nid: <b></b><br/> bid: <b></b>]]> </description> <Point><coordinates>21.065345,52.1322157,0</coordinates></Point> </Placemark> </Document> </kml>
CSV
lat,lon,mcc,mnc,lac,cellid,averageSignalStrength,range,samples,changeable,radio,rnc,cid,tac,sid,nid,bid 52.275505,21.016382,260,2,45080,21728,-55,123,2,1,GSM,,,,,, 52.201454,21.065345,260,2,58140,42042781,-59,1234,3,1,UMTS,641,34205,,,, 52.207123,21.029972,260,6,58,119093,-80,122,2,1,LTE,,,58,,, 52.274612,21.034485,260,16256,45,22613,-98,134,2,1,CDMA,,,,16256,45,22613
JSON
{ "count": 3, "cells": [ { "lon": 21.014, "lat": 52.278, "mcc": 260, "mnc": 2, "lac": 45080, "cellid": 22613, "averageSignalStrength": -70, "range": 123, "samples": 2, "changeable": true, "radio": "GSM" }, { "lon": 21.04, "lat": 52.2234, "mcc": 260, "mnc": 2, "lac": 58140, "cellid": 42042781, "averageSignalStrength": -90, "range": 125, "samples": 2, "changeable": true, "radio": "UMTS", "rnc": 641, "cid": 34205 }, { "lon": 21.5604, "lat": 52.284, "mcc": 260, "mnc": 2, "lac": 581, "cellid": 42048, "averageSignalStrength": -90, "range": 12345, "samples": 9, "changeable": true, "radio": "LTE", "tac": 581 } ] }
Business logic
The request is handled by de.enaikoon.gpssuite.web.measure.CellController.
Example
http://www.opencellid.org/cell/getInArea?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&limit=4&offset=16&format=kml
http://www.opencellid.org/cell/getInArea?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&radio=CDMA&limit=4&offset=16&format=json
Availability
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.
In case you want to use this service without contributing to OpenCellID please refer to the commercial users guideline.
An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014
Getting the number of cells in a specified area
GET request to
http://<WebServiceURL>/cell/getInAreaSize
Parameters
<WebServiceURL>: the URL to the web service
Payload
key=<apiKey>&BBOX=<latmin>,<lonmin>,<latmax>,<lonmax>&mcc=<mcc>&mnc=<mnc>&lac=<lac>&radio=<radio>&format=<format>
Where
Parameter | Data type | Description | Optional |
---|---|---|---|
<apiKey> | string | API key assigned to the user | no |
<latmin> | double | Minimal bounding latitude | no |
<lonmin> | double | Minimal bounding longitude | no |
<latmax> | double | Maximal bounding latitude | no |
<lonmax> | double | Maximal bounding longitude | no |
<mcc> | integer | Mobile country code; If you want to restrict the result to a specific country | yes |
<mnc> | integer | Mobile network code or system identifier; If you want to restrict the result | yes |
<lac> | integer | Local area code, tracking area code or network id; If you want to restrict the result | yes |
<radio> | string | You can specifiy GSM, UMTS, LTE, NR or CDMA as the radio of returned data. Otherwise any cells will be returned. | yes |
<format> | string | You can specifiy xml or json as output. Default is xml. | yes |
Response
Upon successful request, HTTP 200 is returned with XML in the following format:
XML
<?xml version="1.0" encoding="UTF-8"?> <rsp stat="ok"> <cells count="5"/> </rsp>
JSON
{ "count": 123 }
Business logic
The request is handled by de.enaikoon.gpssuite.web.measure.CellController.
Example
http://www.opencellid.org/cell/getInAreaSize?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070
http://www.opencellid.org/cell/getInAreaSize?key=xxx&BBOX=52.0,21.0,52.5,21.5&mcc=260&mnc=2&lac=45070&radio=CDMA&format=json
Availability
This feature is available free of charge in case your application contributes data to OpenCellID at the same time.
In case you want to use this service without contributing to OpenCellID please refer to the commercial users guideline.
An automated check for providing this service to white-listed apiKeys only was activated on Jun 15th, 2014