Methods

Method detail for: getSchoolByCoord

This request requires you to submit a latitude and longitude coordinate pair. The API will spatially determine the school attendance zones that those coordinates are within, and then return those attendance zone IDs along with the NCES District ID and District Name, the NCES School ID and School Name, and the education level of the school, for each attendance zone returned.

Note: This method requires the dataset code of 'SAZ' to instruct the API to return cross-dataset data about the school attendance zone and district.

Valid Datasets

DatasetDataset DetailsMethod Parameters
Maponics School Attendance Zone BoundariesClick To ViewClick To View

When calling this dataset using this method, use these parameters:

  • lat*
  • lon*
  • (Note: Items marked with * are required)

Sample Request and Return Data

<?xml version="1.0" encoding="UTF-8" ?> <data> <auth> <loginname>your_username</loginname> <key>your_api_key</key> </auth> <request> <dataset>SAZ</dataset> <method>getSchoolByCoord</method> <parameters> <lat>37.325021</lat> <lon>-121.902924</lon> </parameters> </request> </data>
{ "data":{ "auth":{ "loginname":"your_username", "key":"your_api_key" } }, "request":[ { "dataset":"SAZ", "method":"getSchoolByCoord", "count":"false", "returnType":"json", "parameters":{ "lat":"37.325021", "lon":"-121.902924" } } ] }
<?xml version="1.0" encoding="UTF-8" ?> <data> <request> <item> <mx_id>CA-SAN JOSE-2076-CA-PB3980</mx_id> <nces_disid>0634590</nces_disid> <nces_schid>063459005720</nces_schid> <sch_name>HERBERT HOOVER MIDDLE</sch_name> <ed_level>M</ed_level> <district_name>SAN JOSE UNIFIED</district_name> </item> <item> <mx_id>CA-SAN JOSE-2076-CA-PB3976</mx_id> <nces_disid>0634590</nces_disid> <nces_schid>063459005713</nces_schid> <sch_name>GARDNER ELEMENTARY</sch_name> <ed_level>P</ed_level> <district_name>SAN JOSE UNIFIED</district_name> </item> <item> <mx_id>CA-SAN JOSE-2076-CA-PB4006</mx_id> <nces_disid>0634590</nces_disid> <nces_schid>063459011455</nces_schid> <sch_name>LINCOLN PLUS HIGH</sch_name> <ed_level>M</ed_level> <district_name>SAN JOSE UNIFIED</district_name> </item> <item> <mx_id>CA-SAN JOSE-2076-CA-PB4006</mx_id> <nces_disid>0634590</nces_disid> <nces_schid>063459011455</nces_schid> <sch_name>LINCOLN PLUS HIGH</sch_name> <ed_level>H</ed_level> <district_name>SAN JOSE UNIFIED</district_name> </item> <item> <mx_id>CA-SAN JOSE-2076-CA-PB4006</mx_id> <nces_disid>0634590</nces_disid> <nces_schid>063459011455</nces_schid> <sch_name>LINCOLN PLUS HIGH</sch_name> <ed_level>P</ed_level> <district_name>SAN JOSE UNIFIED</district_name> </item> </request> </data>
[ { "resultcode":0, "message":"Return OK", "requestid":"01-6249193" }, [ { "mx_id":"CA-SAN JOSE-2076-CA-PB3976", "nces_disid":"0634590", "nces_schid":"063459005713", "sch_name":"GARDNER ELEMENTARY SCHOOL", "ed_level":"P", "district_name":"SAN JOSE UNIFIED SCHOOL DISTRICT" }, { "mx_id":"CA-SAN JOSE-2076-CA-PB4006", "nces_disid":"0634590", "nces_schid":"063459011455", "sch_name":"LINCOLN PLUS HIGH SCHOOL", "ed_level":"H", "district_name":"SAN JOSE UNIFIED SCHOOL DISTRICT" }, { "mx_id":"CA-SAN JOSE-2076-CA-PB3980", "nces_disid":"0634590", "nces_schid":"063459005720", "sch_name":"HOOVER MIDDLE SCHOOL", "ed_level":"M", "district_name":"SAN JOSE UNIFIED SCHOOL DISTRICT" } ] ]