UK forecast site list feed detailed documentation

Detailed documentation on the 5,000 UK locations site list feed.

Description of data feed

The 5,000 UK locations forecast site list data feed provides a list of the locations (also known as sites) for which results are available for the 5,000 UK locations three hourly forecast and 5,000 UK locations daily forecast data feeds. You can use this data feed to find details such as the ID of the site that you are interested in finding data for.

Accessing the feed via its web service

Description of web service

You should set the data format in the URL to specify whether the web service should return XML or JSON, and include your API key in the query string.

Possible use cases for this web service with example URLs

By changing the resource you can check which sites are available for each of the other web services provided by DataPoint. You should set the data format in the URL to specify that the web service should return XML or JSON as required, and include your API key in the query string.

1. You would like to know which sites are available for the 5,000 UK locations forecast web services in XML format. In this case you would set the data type to xml.

Example: to obtain sites for the forecast web services:

http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/xml/sitelist?res=daily&key=<API key>

The above example would return around 5,000 sites in XML format, resulting in a file size of approximately 397 kB

2. You would like to know which sites are available for the 5,000 UK locations forecast web services in JSON format. In this case you would set the data type to json.

Example: to obtain sites for the forecast web services:

http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/json/sitelist?key=<APIkey>

The above example would return around 5,000 sites in JSON format, resulting in a file size of approximately 435 kB

Example of XML and JSON responses

The following examples show a typical result of a call to the 5,000 UK locations forecast site list web service requesting a complete list of sites for which forecasts are available.

XML

The XML that follows is a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/xml/sitelist?key=<APIkey>

<?xml version="1.0" encoding="UTF-8"?>
<Locations>
	<Location elevation="4.0" id="3062" latitude="57.819"
		longitude="-3.966" name="Tain Range" region="he" unitaryAuthArea="Highland"></Location>
	<Location elevation="228.0" id="3063" latitude="57.206"
		longitude="-3.827" name="Aviemore" nationalPark="Cairngorms National Park"
		region="he" unitaryAuthArea="Highland"></Location>
	<Location elevation="1245.0" id="3065" latitude="57.116"
		longitude="-3.642" name="Cairn Gorm Summit" nationalPark="Cairngorms National Park"
		region="he" unitaryAuthArea="Moray"></Location>
	<Location elevation="7.0" id="3066" latitude="57.6494"
		longitude="-3.5606" name="Kinloss" region="gr" unitaryAuthArea="Moray"></Location>
	<Location elevation="6.0" id="3068" latitude="57.712"
		longitude="-3.322" name="Lossiemouth" region="gr" unitaryAuthArea="Moray"></Location>
	<Location elevation="933.0" id="3072" latitude="56.879"
		longitude="-3.42" name="Cairnwell" nationalPark="Cairngorms National Park"
		region="ta" unitaryAuthArea="Perth and Kinross"></Location>
	<Location elevation="36.0" id="3075" latitude="58.454"
		longitude="-3.089" name="Wick Airport" region="he" unitaryAuthArea="Highland"></Location>
	<Location elevation="140.0" id="3080" latitude="57.077"
		longitude="-2.836" name="Aboyne" region="gr" unitaryAuthArea="Aberdeenshire"></Location>
	<Location elevation="339.0" id="3081" latitude="57.006"
		longitude="-3.397" name="Braemar" nationalPark="Cairngorms National Park"
		region="gr" unitaryAuthArea="Aberdeenshire"></Location>
	<Location elevation="134.0" id="3088" latitude="56.852"
		longitude="-2.264" name="Inverbervie" region="gr" unitaryAuthArea="Aberdeenshire"></Location>
	<Location elevation="4.0" id="3094" latitude="57.698"
		longitude="-2.121" name="Rosehearty Samos" region="gr"
		unitaryAuthArea="Aberdeenshire"></Location>
	<Location elevation="9.0" id="3100" latitude="56.497"
		longitude="-6.887" name="Tiree" region="st" unitaryAuthArea="Argyll and Bute"></Location>
	<Location elevation="17.0" id="3105" latitude="55.681"
		longitude="-6.256" name="Islay/Port Ellen" region="st"
		unitaryAuthArea="Argyll and Bute"></Location>
	<Location elevation="10.0" id="3111" latitude="55.441"
		longitude="-5.699" name="Machrihanish" region="st" unitaryAuthArea="Argyll and Bute"></Location>
	<Location elevation="11.0" id="3132" latitude="54.859"
		longitude="-4.936" name="West Freugh (Esaws)" region="dg"
		unitaryAuthArea="Dumfries and Galloway"></Location>
	<Location elevation="27.0" id="3136" latitude="55.515"
		longitude="-4.585" name="Prestwick Rnas" region="st" unitaryAuthArea="South Ayrshire"></Location>
	<Location elevation="221.0" id="3139" latitude="55.601"
		longitude="-4.226" name="Saughall" region="st" unitaryAuthArea="East Ayrshire"></Location>
	<Location elevation="35.0" id="3144" latitude="56.326"
		longitude="-3.729" name="Strathallan" region="ta" unitaryAuthArea="Perth and Kinross"></Location>
	<Location elevation="564.0" id="3148" latitude="56.423"
		longitude="-4.32" name="Glen Ogle" nationalPark="Loch Lomond and the Trossachs National Park"
		region="ta" unitaryAuthArea="Stirling"></Location>
	<Location elevation="277.0" id="3152" latitude="55.862"
		longitude="-3.875" name="Salsburgh" region="st" unitaryAuthArea="North Lanarkshire"></Location>
	<Location elevation="245.0" id="3155" latitude="55.627"
		longitude="-3.735" name="Drumalbin" region="st" unitaryAuthArea="South Lanarkshire"></Location>
	<Location elevation="112.0" id="3158" latitude="55.709"
		longitude="-2.383" name="Charterhall" region="dg" unitaryAuthArea="Scottish Borders"></Location>
	<Location elevation="57.0" id="3166" latitude="55.928"
		longitude="-3.343" name="Edinburgh/Gogarbank" region="dg"
		unitaryAuthArea="Edinburgh"></Location>
	<Location elevation="10.0" id="3171" latitude="56.377"
		longitude="-2.862" name="Leuchars" region="ta" unitaryAuthArea="Fife"></Location>
	<Location elevation="16.0" id="3204" latitude="54.0849"
		longitude="-4.6321" name="Ronaldsway" region="nw"></Location>
	<Location elevation="124.0" id="3210" latitude="54.518"
		longitude="-3.615" name="St. Bees Head" region="nw" unitaryAuthArea="Cumbria"></Location>
	<Location elevation="81.0" id="3212" latitude="54.614"
		longitude="-3.157" name="Keswick" nationalPark="Lake District National Park"
		region="nw" unitaryAuthArea="Cumbria"></Location>
	<Location elevation="28.0" id="3220" latitude="54.933"
		longitude="-2.963" name="Carlisle" region="nw" unitaryAuthArea="Cumbria"></Location>
	<Location elevation="285.0" id="3224" latitude="55.05"
		longitude="-2.553" name="Spadeadam" region="nw" unitaryAuthArea="Cumbria"></Location>
	<Location elevation="255.0" id="3225" latitude="54.501"
		longitude="-2.684" name="Shap" nationalPark="Lake District National Park"
		region="nw" unitaryAuthArea="Cumbria"></Location>
	<Location elevation="847.0" id="3227" latitude="54.684"
		longitude="-2.45" name="Great Dun Fell 2" region="nw" unitaryAuthArea="Cumbria"></Location>
	<Location elevation="146.0" id="3238" latitude="55.02"
		longitude="-1.88" name="Albemarle" region="ne" unitaryAuthArea="Northumberland"></Location>
</Locations>

JSON

The JSON that follows shows the structure of a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/json/sitelist?key=<APIkey>

{
    "Locations":{
        "Location":[{
            "elevation":"228.0",
            "id":"3063","latitude":"57.206",
            "longitude":"-3.827",
            "name":"Aviemore",
            "nationalPark":"Cairngorms National Park",
            "region":"he",
            "unitaryAuthArea":"Highland"
        },
        {
            "elevation":"1245.0",
            "id":"3065",
            "latitude":"57.116",
            "longitude":"-3.642",
            "name":"Cairn Gorm Summit",
            "nationalPark":"Cairngorms National Park",
            "region":"he",
            "unitaryAuthArea":"Moray"
        },
        {
            "elevation":"7.0",
            "id":"3066",
            "latitude":"57.6494",
            "longitude":"-3.5606",
            "name":"Kinloss",
            "region":"gr",
            "unitaryAuthArea":"Moray"
        },
        {
            "elevation":"6.0",
            "id":"3068",
            "latitude":"57.712",
            "longitude":"-3.322",
            "name":"Lossiemouth",
            "region":"gr",
            "unitaryAuthArea":"Moray"
        },
        {
            "elevation":"36.0",
            "id":"3075",
            "latitude":"58.454",
            "longitude":"-3.089",
            "name":"Wick Airport",
            "region":"he",
            "unitaryAuthArea":"Highland"
        },
        {
            "elevation":"140.0",
            "id":"3080",
            "latitude":"57.077",
            "longitude":"-2.836",
            "name":"Aboyne",
            "region":"gr",
            "unitaryAuthArea":"Aberdeenshire"
        },
        {
            "elevation":"4.0",
            "id":"3094",
            "latitude":"57.698",
            "longitude":"-2.121",
            "name":"Rosehearty Samos",
            "region":"gr",
            "unitaryAuthArea":"Aberdeenshire"
        },
        {
            "elevation":"9.0",
            "id":"3100",
            "latitude":"56.497",
            "longitude":"-6.887",
            "name":"Tiree",
            "region":"st",
            "unitaryAuthArea":"Argyll and Bute"
        },
        {
            "elevation":"17.0",
            "id":"3105",
            "latitude":"55.681",
            "longitude":"-6.256",
            "name":"Islay\/Port Ellen",
            "region":"st",
            "unitaryAuthArea":"Argyll and Bute"
        },
        {
            "elevation":"10.0",
            "id":"3111",
            "latitude":"55.441",
            "longitude":"-5.699",
            "name":"Machrihanish",
            "region":"st",
            "unitaryAuthArea":"Argyll and Bute"
        },
        {
            "elevation":"11.0",
            "id":"3132",
            "latitude":"54.859",
            "longitude":"-4.936",
            "name":"West Freugh (Esaws)",
            "region":"dg",
            "unitaryAuthArea":"Dumfries and Galloway"
        },
        {
            "elevation":"27.0",
            "id":"3136",
            "latitude":"55.515",
            "longitude":"-4.585",
            "name":"Prestwick Rnas",
            "region":"st",
            "unitaryAuthArea":"South Ayrshire"
        },
        {
            "elevation":"35.0",
            "id":"3144",
            "latitude":"56.326",
            "longitude":"-3.729",
            "name":"Strathallan",
            "region":"ta",
            "unitaryAuthArea":"Perth and Kinross"
        },
        {
            "elevation":"564.0",
            "id":"3148",
            "latitude":"56.423",
            "longitude":"-4.32",
            "name":"Glen Ogle",
            "nationalPark":"Loch Lomond and the Trossachs National Park",
            "region":"ta",
            "unitaryAuthArea":"Stirling"
        },
        {
            "elevation":"245.0",
            "id":"3155",
            "latitude":"55.627",
            "longitude":"-3.735",
            "name":"Drumalbin",
            "region":"st",
            "unitaryAuthArea":"South Lanarkshire"
        },
        {
            "elevation":"112.0",
            "id":"3158",
            "latitude":"55.709",
            "longitude":"-2.383",
            "name":"Charterhall",
            "region":"dg",
            "unitaryAuthArea":"Scottish Borders"
        },
        {
            "elevation":"57.0",
            "id":"3166",
            "latitude":"55.928",
            "longitude":"-3.343",
            "name":"Edinburgh\/Gogarbank",
            "region":"dg",
            "unitaryAuthArea":"Edinburgh"
        },
        {
            "elevation":"10.0",
            "id":"3171",
            "latitude":"56.377",
            "longitude":"-2.862",
            "name":"Leuchars",
            "region":"ta",
            "unitaryAuthArea":"Fife"
        },
        {
            "elevation":"16.0",
            "id":"3204",
            "latitude":"54.0849",
            "longitude":"-4.6321",
            "name":"Ronaldsway",
            "region":"nw"
        },
        {
            "elevation":"124.0",
            "id":"3210",
            "latitude":"54.518",
            "longitude":"-3.615",
            "name":"St. Bees Head",
            "region":"nw",
            "unitaryAuthArea":"Cumbria"
        },
        {
            "elevation":"81.0",
            "id":"3212",
            "latitude":"54.614",
            "longitude":"-3.157",
            "name":"Keswick",
            "nationalPark":"Lake District National Park",
            "region":"nw",
            "unitaryAuthArea":"Cumbria"
        },
        {
            "elevation":"28.0",
            "id":"3220",
            "latitude":"54.933",
            "longitude":"-2.963",
            "name":"Carlisle",
            "region":"nw",
            "unitaryAuthArea":"Cumbria"
        },
        {
            "elevation":"285.0",
            "id":"3224",
            "latitude":"55.05",
            "longitude":"-2.553",
            "name":"Spadeadam",
            "region":"nw",
            "unitaryAuthArea":"Cumbria"
        },
        {
            "elevation":"255.0",
            "id":"3225",
            "latitude":"54.501",
            "longitude":"-2.684",
            "name":"Shap","nationalPark":"Lake District National Park",
            "region":"nw",
            "unitaryAuthArea":"Cumbria"
        },
        {
            "elevation":"146.0",
            "id":"3238",
            "latitude":"55.02",
            "longitude":"-1.88",
            "name":"Albemarle",
            "region":"ne",
            "unitaryAuthArea":"Northumberland"
        }]}}

Anatomy of responses

The XML response produced by this web service contains a single Locations node, which in turn contains a set of Location nodes, defined as follows:

Location

A Location object defines a single site, and contains the following attributes:

  • id: This provides the ID of the site
  • longitude: This provides the longitude of the site
  • latitude: This provides the latitude of the site
  • name: This provides the name of the site

Your account

Our products