API reference

Count cells in an area

Count cells within a geographic bounding box.

Community coverage

This counts matching records in our community-contributed dataset, not every cell or physical tower in the area. Coverage varies. See Coverage and missing cells.

Getting the number of cells in a specified area

GET https://opencellid.org/cell/getInAreaSize

Parameters

NameTypeRequiredDescription
keystringYesAPI key assigned to the user
BBOXstringYesBounding box as latmin,lonmin,latmax,lonmax (latitude, longitude order).
mccintegerNoMobile country code; If you want to restrict the result to a specific country
mncintegerNoMobile network code or system identifier; If you want to restrict the result
lacintegerNoLocal area code, tracking area code or network id; If you want to restrict the result
radiostringNoFilter by radio technology.
formatstringNoYou can specifiy xml or json as output. Default is xml.

Example request

Replace YOUR_API_KEY with your key.

curl "https://opencellid.org/cell/getInAreaSize?key=YOUR_API_KEY&BBOX=52.0,21.0,52.5,21.5&format=json"

Response

Successful requests return HTTP 200. See Errors for error statuses and response formats.

XML

<?xml version="1.0"?>
<rsp stat="ok"><cell count="1"/></rsp>

JSON

{
  "count": 1
}

When no cells match, the request still succeeds with HTTP 200. JSON returns {"count":0}.

Availability

Each user receives 1,000 API request credits per day. For more credits or commercial plans, see Access and limits.


API overview · Measurement fields · Errors

On this page