API reference

Upload JSON measurements

Submit a batch of measurements in a JSON file.

Uploading measurements from a JSON file

POST https://opencellid.org/measure/uploadJson

Send a multipart/form-data request containing your API key and a measurement file.

Form fields

NameTypeRequiredDescription
keystringYesYour OpenCellID API key.
datafilefileYesMeasurement file, up to 2 MB. Split larger uploads into multiple files.

File contents

Use a measurements array containing one object per observation. This example contains the required fields for a GSM observation:

{
  "measurements": [
    {
      "mcc": 262,
      "mnc": 2,
      "lac": 434,
      "cellid": 9200,
      "lon": 9.436598,
      "lat": 52.892139
    }
  ]
}

Supported fields: mcc, mnc, lac, cellid, lat, lon, signal, measured_at, rating, speed, direction, act, ta, psc, tac, pci, sid, nid, bid. See Measurement fields for types, required fields and network-specific alternatives.

Example request

Save your measurements as measurements.json and replace YOUR_API_KEY with your key.

curl "https://opencellid.org/measure/uploadJson" \
  -F "key=YOUR_API_KEY" \
  -F "[email protected];type=text/plain"

Response

HTTP 200:

0,OK

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:

  1. parsing and filtering raw data
  2. updating measurement statistics and storing measurements in the database
  3. 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.

Upload notes

Optional measurement fields can be omitted. For CDMA observations, mnc, lac and cellid can also represent sid, nid and bid respectively.

See Errors for failed requests, including “cell not found.”


API overview · Measurement fields · Errors

On this page