Location ID API call not working?

127 views
Skip to first unread message

Kloakk

unread,
Nov 24, 2022, 3:25:46 PM11/24/22
to Met Office DataPoint
Hey. Trying to do an API call for :

val/wxfcs/all/datatype/locationId

Returns a forecast for the next five days including today. Forecast time steps are either daily (separate day and night), or every three-hours. Updated hourly.

In my code it looks like this :  

It just returns a 404 Not Found. I'm not sure why, though it seems anything with a locationID isnt working properly. Cheers.


James

unread,
Dec 8, 2022, 8:52:03 AM12/8/22
to Met Office DataPoint
I am getting the same error with wxobs

Jamie Eames

unread,
Apr 7, 2023, 6:46:57 AM4/7/23
to Met Office DataPoint
Did you ever resolve it?

On Thursday, November 24, 2022 at 8:25:46 PM UTC klo...@gmail.com wrote:
Message has been deleted

Alan

unread,
Apr 8, 2023, 8:05:23 AM4/8/23
to Met Office DataPoint
Hi

You are missing a part of the URL.

From page 7 of the datapoint_api_reference.pdf link https://www.metoffice.gov.uk/binaries/content/assets/metofficegovuk/pdf/data/datapoint_api_reference.pdf


Example request 

Fetch the three-hourly forecast for Exeter. 

http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/xml/310069?res=3hourly&key=01234567-89ab-cdef-0123-456789abcdef 


You need to specify the res parameter in your request.  Note the ?  and &  positions as well as there is a typo in the pdf on page 1 that has two question marks rather than a question mark ? to start the parameter list and an ampersand & to add the key parameter.


For the forecast requests the res is either res=3hourly or res=daily  for the observation request the res=hourly


http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/xml/3840?res=3hourly&key=xxxx


Hope this helps


Alan

Reply all
Reply to author
Forward
0 new messages