{"openapi":"3.1.0","info":{"title":"Weatherstack","description":"The weatherstack API delivers accurate real-time, historical and forecast weather data - including marine/sailing conditions - for millions of locations worldwide, retrieved from a range of reliable data sources. Endpoints cover current weather, weather forecasts, historical weather, marine forecasts and location autocomplete.","version":"1.0.0"},"servers":[{"url":"https://api.weatherstack.com"}],"paths":{"/autocomplete":{"get":{"tags":["Endpoints"],"summary":"weatherstack :- /autocomplete","description":"Looks up one or more locations by name, coordinates, ZIP code or IP address and returns matching location suggestions. Useful for building location search / autocomplete experiences.","operationId":"weatherstackAutocomplete","parameters":[{"name":"access_key","in":"query","description":"A unique key assigned to each API account used to authenticate with the API.","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","description":"Location search term. Can be a place name, coordinates (lat,lon), ZIP code or IP address. Bulk (semicolon-separated) queries are not supported on this endpoint.","required":true,"schema":{"type":"string","example":"New York"}},{"name":"results","in":"query","description":"Number of location results to return (1-200). Default is 20.","required":false,"schema":{"type":"integer","default":20}},{"name":"major","in":"query","description":"Set to 1 to limit results to major cities only.","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"callback","in":"query","description":"Specify a JSONP callback function name to wrap your API response in.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Location autocomplete results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutocompleteResponse"}}}},"400":{"description":"Bad Request - a parameter is missing or invalid, or your plan does not include the feature.\nPossible errors on this endpoint: 601 `missing_query`, 602 `no_results`, 615 `request_failed`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_query":{"$ref":"#/components/examples/missing_query"},"no_results":{"$ref":"#/components/examples/no_results"},"request_failed":{"$ref":"#/components/examples/request_failed"}}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}},"/current":{"get":{"tags":["Endpoints"],"summary":"weatherstack :- /current","description":"Returns real-time weather data for one or more locations. Pass the location(s) using the query parameter.","operationId":"weatherstackCurrent","parameters":[{"name":"access_key","in":"query","description":"A unique key assigned to each API account used to authenticate with the API.","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","description":"Location identifier: place name, coordinates (lat,lon), ZIP code, IP address, or 'fetch:ip'. Multiple locations can be separated with a semicolon. Bulk queries are not available on the Free plan. With more than one location the response is an array and each location counts as one request. A semicolon always splits the value into separate locations. There is no set maximum number of locations per call (calls with up to 500 locations were accepted in testing on both the Ecosystem and Legacy).","required":true,"schema":{"type":"string","example":"New York"}},{"name":"units","in":"query","description":"Units of measurement. Available values: m (Metric), s (Scientific), f (Fahrenheit). Default: m","required":false,"schema":{"type":"string","enum":["m","s","f"]}},{"name":"language","in":"query","description":"Language in which the API should return the results. [Default: en]","required":false,"schema":{"type":"string","example":"en"}},{"name":"callback","in":"query","description":"Specify a JSONP callback function name to wrap your API response in.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current weather data for the location.\n\nWhen `query` has more than one location (separated by `;`), the response is a JSON array with one response object per location, in request order. Each location counts as one request toward your monthly limit. There is no set maximum number of locations per call (calls with up to 500 locations were accepted in testing on both the Ecosystem and Legacy). Bulk queries are not included on the Free plan.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CurrentWeatherResponse"},{"type":"array","description":"Bulk query - one CurrentWeatherResponse per location, in request order.","items":{"$ref":"#/components/schemas/CurrentWeatherResponse"},"example":[{"request":{"type":"City","query":"London, United Kingdom","language":"en","unit":"m"},"location":{"name":"London","country":"United Kingdom"}},{"request":{"type":"City","query":"Paris, France","language":"en","unit":"m"},"location":{"name":"Paris","country":"France"}}]}]}}}},"400":{"description":"Bad Request - a parameter is missing or invalid, or your plan does not include the feature.\nPossible errors on this endpoint: 601 `missing_query`, 604 `bulk_queries_not_supported_on_plan`, 605 `invalid_language`, 606 `invalid_unit`, 615 `request_failed`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_query":{"$ref":"#/components/examples/missing_query"},"bulk_queries_not_supported_on_plan":{"$ref":"#/components/examples/bulk_queries_not_supported_on_plan"},"invalid_language":{"$ref":"#/components/examples/invalid_language"},"invalid_unit":{"$ref":"#/components/examples/invalid_unit"},"request_failed":{"$ref":"#/components/examples/request_failed"}}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}},"/forecast":{"get":{"tags":["Endpoints"],"summary":"weatherstack :- /forecast","description":"Returns weather forecast data for one or more locations, up to 14 days ahead depending on your subscription plan.","operationId":"weatherstackForecast","parameters":[{"name":"access_key","in":"query","description":"A unique key assigned to each API account used to authenticate with the API.","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","description":"Location identifier: place name, coordinates (lat,lon), ZIP code, IP address, or 'fetch:ip'. Multiple locations can be separated with a semicolon. Bulk queries are not available on the Free plan. With more than one location the response is an array and each location counts as one request. A semicolon always splits the value into separate locations. There is no set maximum number of locations per call (calls with up to 500 locations were accepted in testing on both the Ecosystem and Legacy).","required":true,"schema":{"type":"string","example":"New York"}},{"name":"forecast_days","in":"query","description":"Number of days for which the weather forecast is requested.","required":false,"schema":{"type":"integer","maximum":14,"minimum":1,"example":7}},{"name":"hourly","in":"query","description":"Set to 1 to return weather data split hourly.","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"interval","in":"query","description":"If hourly data is enabled, set the interval (in hours). Available values: 1, 3, 6, 12, 24","required":false,"schema":{"type":"integer","enum":[1,3,6,12,24],"example":3}},{"name":"units","in":"query","description":"Units of measurement. Available values: m (Metric), s (Scientific), f (Fahrenheit). Default: m","required":false,"schema":{"type":"string","enum":["m","s","f"]}},{"name":"language","in":"query","description":"Language in which the API should return the results. [Default: en]","required":false,"schema":{"type":"string","example":"en"}},{"name":"callback","in":"query","description":"Specify a JSONP callback function name to wrap your API response in.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Weather forecast data (up to 14 days).\n\nWhen `query` has more than one location (separated by `;`), the response is a JSON array with one response object per location, in request order. Each location counts as one request toward your monthly limit. There is no set maximum number of locations per call (calls with up to 500 locations were accepted in testing on both the Ecosystem and Legacy). Bulk queries are not included on the Free plan.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ForecastResponse"},{"type":"array","description":"Bulk query - one ForecastResponse per location, in request order.","items":{"$ref":"#/components/schemas/ForecastResponse"},"example":[{"request":{"type":"City","query":"London, United Kingdom","language":"en","unit":"m"},"location":{"name":"London","country":"United Kingdom"}},{"request":{"type":"City","query":"Paris, France","language":"en","unit":"m"},"location":{"name":"Paris","country":"France"}}]}]}}}},"400":{"description":"Bad Request - a parameter is missing or invalid, or your plan does not include the feature.\nPossible errors on this endpoint: 601 `missing_query`, 604 `bulk_queries_not_supported_on_plan`, 605 `invalid_language`, 606 `invalid_unit`, 607 `invalid_interval`, 608 `invalid_forecast_days`, 609 `forecast_days_not_supported_on_plan`, 615 `request_failed`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_query":{"$ref":"#/components/examples/missing_query"},"bulk_queries_not_supported_on_plan":{"$ref":"#/components/examples/bulk_queries_not_supported_on_plan"},"invalid_language":{"$ref":"#/components/examples/invalid_language"},"invalid_unit":{"$ref":"#/components/examples/invalid_unit"},"invalid_interval":{"$ref":"#/components/examples/invalid_interval"},"invalid_forecast_days":{"$ref":"#/components/examples/invalid_forecast_days"},"forecast_days_not_supported_on_plan":{"$ref":"#/components/examples/forecast_days_not_supported_on_plan"},"request_failed":{"$ref":"#/components/examples/request_failed"}}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}},"/historical":{"get":{"tags":["Endpoints"],"summary":"weatherstack :- /historical","description":"Returns historical weather data for one or more locations and one or more dates (or a date range).","operationId":"weatherstackHistorical","parameters":[{"name":"access_key","in":"query","description":"A unique key assigned to each API account used to authenticate with the API.","required":true,"schema":{"type":"string"}},{"name":"query","in":"query","description":"Location identifier: place name, coordinates (lat,lon), ZIP code, IP address, or 'fetch:ip'. Multiple locations can be separated with a semicolon. Bulk queries are not available on the Free plan. With more than one location the response is an array and each location counts as one request. A semicolon always splits the value into separate locations. There is no set maximum number of locations per call (calls with up to 500 locations were accepted in testing on both the Ecosystem and Legacy).","required":true,"schema":{"type":"string","example":"New York"}},{"name":"historical_date","in":"query","description":"A single historical date, or semicolon-separated list of dates. [Format: YYYY-MM-DD]. A date source is required: supply either this parameter, OR both historical_date_start and historical_date_end (a request with no date at all returns error 614 missing_historical_date).","required":false,"schema":{"type":"string","format":"date"}},{"name":"historical_date_start","in":"query","description":"Start date when requesting a historical date range. [Format: YYYY-MM-DD]","required":false,"schema":{"type":"string","format":"date"}},{"name":"historical_date_end","in":"query","description":"End date when requesting a historical date range. [Format: YYYY-MM-DD]","required":false,"schema":{"type":"string","format":"date"}},{"name":"hourly","in":"query","description":"Set to 1 to return weather data split hourly.","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"interval","in":"query","description":"If hourly data is enabled, set the interval (in hours). Available values: 1, 3, 6, 12, 24","required":false,"schema":{"type":"integer","enum":[1,3,6,12,24],"example":3}},{"name":"units","in":"query","description":"Units of measurement. Available values: m (Metric), s (Scientific), f (Fahrenheit). Default: m","required":false,"schema":{"type":"string","enum":["m","s","f"]}},{"name":"language","in":"query","description":"Language in which the API should return the results. [Default: en]","required":false,"schema":{"type":"string","example":"en"}},{"name":"callback","in":"query","description":"Specify a JSONP callback function name to wrap your API response in.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Historical weather data for the requested date(s).\n\n**Note:** *The `request`, `location` and `current` objects are the same as in the Current Weather endpoint.*\n\nWhen `query` has more than one location (separated by `;`), the response is a JSON array with one response object per location, in request order. Each location counts as one request toward your monthly limit. There is no set maximum number of locations per call (calls with up to 500 locations were accepted in testing on both the Ecosystem and Legacy). Bulk queries are not included on the Free plan.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HistoricalResponse"},{"type":"array","description":"Bulk query - one HistoricalResponse per location, in request order.","items":{"$ref":"#/components/schemas/HistoricalResponse"},"example":[{"request":{"type":"City","query":"London, United Kingdom","language":"en","unit":"m"},"location":{"name":"London","country":"United Kingdom"}},{"request":{"type":"City","query":"Paris, France","language":"en","unit":"m"},"location":{"name":"Paris","country":"France"}}]}]}}}},"400":{"description":"Bad Request - a parameter is missing or invalid, or your plan does not include the feature.\nPossible errors on this endpoint: 601 `missing_query`, 603 `historical_queries_not_supported_on_plan`, 604 `bulk_queries_not_supported_on_plan`, 605 `invalid_language`, 606 `invalid_unit`, 607 `invalid_interval`, 611 `invalid_historical_date`, 612 `invalid_historical_time_frame`, 613 `historical_time_frame_too_long`, 614 `missing_historical_date`, 615 `request_failed`, 620 `missing_historical_date_start`, 622 `invalid_historical_date_start`, 624 `invalid_historical_date_range`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_query":{"$ref":"#/components/examples/missing_query"},"historical_queries_not_supported_on_plan":{"$ref":"#/components/examples/historical_queries_not_supported_on_plan"},"bulk_queries_not_supported_on_plan":{"$ref":"#/components/examples/bulk_queries_not_supported_on_plan"},"invalid_language":{"$ref":"#/components/examples/invalid_language"},"invalid_unit":{"$ref":"#/components/examples/invalid_unit"},"invalid_interval":{"$ref":"#/components/examples/invalid_interval"},"invalid_historical_date":{"$ref":"#/components/examples/invalid_historical_date"},"invalid_historical_time_frame":{"$ref":"#/components/examples/invalid_historical_time_frame"},"historical_time_frame_too_long":{"$ref":"#/components/examples/historical_time_frame_too_long"},"missing_historical_date":{"$ref":"#/components/examples/missing_historical_date"},"request_failed":{"$ref":"#/components/examples/request_failed"},"missing_historical_date_start":{"$ref":"#/components/examples/missing_historical_date_start"},"invalid_historical_date_start":{"$ref":"#/components/examples/invalid_historical_date_start"},"invalid_historical_date_range":{"$ref":"#/components/examples/invalid_historical_date_range"}}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}},"/marine":{"get":{"tags":["Endpoints"],"summary":"weatherstack :- /marine","description":"Returns marine (sailing) weather forecast data for a given latitude/longitude coordinate pair.","operationId":"weatherstackMarine","parameters":[{"name":"access_key","in":"query","description":"A unique key assigned to each API account used to authenticate with the API.","required":true,"schema":{"type":"string"}},{"name":"latitude","in":"query","description":"Latitude of the location the marine data is requested for.","required":true,"schema":{"type":"number","format":"float","example":40.7128}},{"name":"longitude","in":"query","description":"Longitude of the location the marine data is requested for.","required":true,"schema":{"type":"number","format":"float","example":-74.006}},{"name":"tide","in":"query","description":"Include tide data in the response. Available values: yes, no","required":false,"schema":{"type":"string","enum":["yes","no"]}},{"name":"hourly","in":"query","description":"Set to 1 to return weather data split hourly.","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"interval","in":"query","description":"Set the interval (in hours) of the returned data. Available values: 1, 3, 6, 12, 24","required":false,"schema":{"type":"integer","enum":[1,3,6,12,24],"example":3}},{"name":"units","in":"query","description":"Units of measurement. Available values: m (Metric), s (Scientific), f (Fahrenheit). Default: m","required":false,"schema":{"type":"string","enum":["m","s","f"]}},{"name":"language","in":"query","description":"Language in which the API should return the results. [Default: en]","required":false,"schema":{"type":"string","example":"en"}},{"name":"callback","in":"query","description":"Specify a JSONP callback function name to wrap your API response in.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Live marine/sailing weather forecast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarineResponse"}}}},"400":{"description":"Bad Request - a parameter is missing or invalid, or your plan does not include the feature.\nPossible errors on this endpoint: 604 `bulk_queries_not_supported_on_plan`, 605 `invalid_language`, 606 `invalid_unit`, 607 `invalid_interval`, 615 `request_failed`, 616 `missing_latitude`, 617 `missing_longitude`, 618 `invalid_latitude_type`, 619 `invalid_longitude_type`, 621 `invalid_tide`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bulk_queries_not_supported_on_plan":{"$ref":"#/components/examples/bulk_queries_not_supported_on_plan"},"invalid_language":{"$ref":"#/components/examples/invalid_language"},"invalid_unit":{"$ref":"#/components/examples/invalid_unit"},"invalid_interval":{"$ref":"#/components/examples/invalid_interval"},"request_failed":{"$ref":"#/components/examples/request_failed"},"missing_latitude":{"$ref":"#/components/examples/missing_latitude"},"missing_longitude":{"$ref":"#/components/examples/missing_longitude"},"invalid_latitude_type":{"$ref":"#/components/examples/invalid_latitude_type"},"invalid_longitude_type":{"$ref":"#/components/examples/invalid_longitude_type"},"invalid_tide":{"$ref":"#/components/examples/invalid_tide"}}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}},"/past-marine":{"get":{"tags":["Endpoints"],"summary":"weatherstack :- /past-marine","description":"Returns historical marine (sailing) weather data for a given latitude/longitude coordinate pair over a past date range.\n *\n * **Note:** *Each day and location included in your request counts toward your monthly API request limit. The historical marine time series supports a maximum time frame of 35 days.*","operationId":"weatherstackPastMarine","parameters":[{"name":"access_key","in":"query","description":"A unique key assigned to each API account used to authenticate with the API.","required":true,"schema":{"type":"string"}},{"name":"latitude","in":"query","description":"Latitude of the location the marine data is requested for.","required":true,"schema":{"type":"number","format":"float","example":40.7128}},{"name":"longitude","in":"query","description":"Longitude of the location the marine data is requested for.","required":true,"schema":{"type":"number","format":"float","example":-74.006}},{"name":"historical_date_start","in":"query","description":"Start date of the historical marine date range. [Format: YYYY-MM-DD]","required":true,"schema":{"type":"string","format":"date"}},{"name":"historical_date_end","in":"query","description":"End date of the historical marine date range. [Format: YYYY-MM-DD]. Required - a request without it returns 623 missing_historical_date_end. To request a single day, set it equal to historical_date_start.","required":true,"schema":{"type":"string","format":"date"}},{"name":"tide","in":"query","description":"Include tide data in the response. Available values: yes, no","required":false,"schema":{"type":"string","enum":["yes","no"]}},{"name":"hourly","in":"query","description":"Set to 1 to return weather data split hourly.","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"interval","in":"query","description":"Set the interval (in hours) of the returned data. Available values: 1, 3, 6, 12, 24","required":false,"schema":{"type":"integer","enum":[1,3,6,12,24],"example":3}},{"name":"units","in":"query","description":"Units of measurement. Available values: m (Metric), s (Scientific), f (Fahrenheit). Default: m","required":false,"schema":{"type":"string","enum":["m","s","f"]}},{"name":"language","in":"query","description":"Language in which the API should return the results. [Default: en]","required":false,"schema":{"type":"string","example":"en"}},{"name":"callback","in":"query","description":"Specify a JSONP callback function name to wrap your API response in.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Historical marine weather data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PastMarineResponse"}}}},"400":{"description":"Bad Request - a parameter is missing or invalid, or your plan does not include the feature.\nPossible errors on this endpoint: 604 `bulk_queries_not_supported_on_plan`, 605 `invalid_language`, 606 `invalid_unit`, 607 `invalid_interval`, 615 `request_failed`, 616 `missing_latitude`, 617 `missing_longitude`, 618 `invalid_latitude_type`, 619 `invalid_longitude_type`, 620 `missing_historical_date_start`, 621 `invalid_tide`, 622 `invalid_historical_date_start`, 623 `missing_historical_date_end`, 624 `invalid_historical_date_range`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"bulk_queries_not_supported_on_plan":{"$ref":"#/components/examples/bulk_queries_not_supported_on_plan"},"invalid_language":{"$ref":"#/components/examples/invalid_language"},"invalid_unit":{"$ref":"#/components/examples/invalid_unit"},"invalid_interval":{"$ref":"#/components/examples/invalid_interval"},"request_failed":{"$ref":"#/components/examples/request_failed"},"missing_latitude":{"$ref":"#/components/examples/missing_latitude"},"missing_longitude":{"$ref":"#/components/examples/missing_longitude"},"invalid_latitude_type":{"$ref":"#/components/examples/invalid_latitude_type"},"invalid_longitude_type":{"$ref":"#/components/examples/invalid_longitude_type"},"missing_historical_date_start":{"$ref":"#/components/examples/missing_historical_date_start"},"invalid_tide":{"$ref":"#/components/examples/invalid_tide"},"invalid_historical_date_start":{"$ref":"#/components/examples/invalid_historical_date_start"},"missing_historical_date_end":{"$ref":"#/components/examples/missing_historical_date_end"},"invalid_historical_date_range":{"$ref":"#/components/examples/invalid_historical_date_range"}}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}},"components":{"examples":{"missing_query":{"summary":"601 missing_query","value":{"success":false,"error":{"code":601,"type":"missing_query","info":"An invalid (or missing) query value was specified."}}},"no_results":{"summary":"602 no_results","value":{"success":false,"error":{"code":602,"type":"no_results","info":"No results were found for the specified query."}}},"historical_queries_not_supported_on_plan":{"summary":"603 historical_queries_not_supported_on_plan","value":{"success":false,"error":{"code":603,"type":"historical_queries_not_supported_on_plan","info":"Historical data is not supported on the current subscription plan."}}},"bulk_queries_not_supported_on_plan":{"summary":"604 bulk_queries_not_supported_on_plan","value":{"success":false,"error":{"code":604,"type":"bulk_queries_not_supported_on_plan","info":"Bulk queries is not supported on the current subscription plan."}}},"invalid_language":{"summary":"605 invalid_language","value":{"success":false,"error":{"code":605,"type":"invalid_language","info":"An invalid language code was specified."}}},"invalid_unit":{"summary":"606 invalid_unit","value":{"success":false,"error":{"code":606,"type":"invalid_unit","info":"An invalid unit value was specified."}}},"invalid_interval":{"summary":"607 invalid_interval","value":{"success":false,"error":{"code":607,"type":"invalid_interval","info":"An invalid interval value was specified."}}},"invalid_forecast_days":{"summary":"608 invalid_forecast_days","value":{"success":false,"error":{"code":608,"type":"invalid_forecast_days","info":"An invalid forecast days value was specified."}}},"forecast_days_not_supported_on_plan":{"summary":"609 forecast_days_not_supported_on_plan","value":{"success":false,"error":{"code":609,"type":"forecast_days_not_supported_on_plan","info":"Weather forecast data is not supported on the current subscription plan."}}},"invalid_historical_date":{"summary":"611 invalid_historical_date","value":{"success":false,"error":{"code":611,"type":"invalid_historical_date","info":"An invalid historical date was specified."}}},"invalid_historical_time_frame":{"summary":"612 invalid_historical_time_frame","value":{"success":false,"error":{"code":612,"type":"invalid_historical_time_frame","info":"An invalid historical time frame was specified."}}},"historical_time_frame_too_long":{"summary":"613 historical_time_frame_too_long","value":{"success":false,"error":{"code":613,"type":"historical_time_frame_too_long","info":"The specified historical time frame is too long. (Maximum: 60 days)"}}},"missing_historical_date":{"summary":"614 missing_historical_date","value":{"success":false,"error":{"code":614,"type":"missing_historical_date","info":"An invalid historical date was specified."}}},"request_failed":{"summary":"615 request_failed","value":{"success":false,"error":{"code":615,"type":"request_failed","info":"API request has failed."}}},"missing_latitude":{"summary":"616 missing_latitude","value":{"success":false,"error":{"code":616,"type":"missing_latitude","info":"Missing latitude value."}}},"missing_longitude":{"summary":"617 missing_longitude","value":{"success":false,"error":{"code":617,"type":"missing_longitude","info":"Missing longitude value."}}},"invalid_latitude_type":{"summary":"618 invalid_latitude_type","value":{"success":false,"error":{"code":618,"type":"invalid_latitude_type","info":"An invalid latitude value was specified."}}},"invalid_longitude_type":{"summary":"619 invalid_longitude_type","value":{"success":false,"error":{"code":619,"type":"invalid_longitude_type","info":"An invalid longitude value was specified."}}},"missing_historical_date_start":{"summary":"620 missing_historical_date_start","value":{"success":false,"error":{"code":620,"type":"missing_historical_date_start","info":"Missing historical start date value."}}},"invalid_tide":{"summary":"621 invalid_tide","value":{"success":false,"error":{"code":621,"type":"invalid_tide","info":"An invalid tide value was specified."}}},"invalid_historical_date_start":{"summary":"622 invalid_historical_date_start","value":{"success":false,"error":{"code":622,"type":"invalid_historical_date_start","info":"An invalid historical start date value was specified."}}},"missing_historical_date_end":{"summary":"623 missing_historical_date_end","value":{"success":false,"error":{"code":623,"type":"missing_historical_date_end","info":"Please specify a valid historical end date. [Required format: &historical_date_end=YYYY-MM-DD]"}}},"invalid_historical_date_range":{"summary":"624 invalid_historical_date_range","value":{"success":false,"error":{"code":624,"type":"invalid_historical_date_range","info":"An invalid date range was specified."}}}},"schemas":{"RequestInfo":{"description":"Echo of the request/query.","properties":{"type":{"type":"string","example":"City"},"query":{"type":"string","example":"New York, United States of America"},"language":{"type":"string","example":"en"},"unit":{"type":"string","example":"m"}},"type":"object"},"Location":{"description":"Location details.","properties":{"name":{"type":"string"},"country":{"type":"string"},"region":{"type":"string"},"lat":{"type":"string"},"lon":{"type":"string"},"timezone_id":{"type":"string"},"localtime":{"type":"string"},"localtime_epoch":{"type":"integer"},"utc_offset":{"type":"string"}},"type":"object"},"Astro":{"description":"Astronomical data.","properties":{"sunrise":{"type":"string"},"sunset":{"type":"string"},"moonrise":{"type":"string"},"moonset":{"type":"string"},"moon_phase":{"type":"string"},"moon_illumination":{"type":"integer"}},"type":"object"},"AirQuality":{"description":"Air quality measurements.","properties":{"co":{"type":"string"},"no2":{"type":"string"},"o3":{"type":"string"},"so2":{"type":"string"},"pm2_5":{"type":"string"},"pm10":{"type":"string"},"us-epa-index":{"type":"string"},"gb-defra-index":{"type":"string"}},"type":"object"},"Current":{"description":"Current weather conditions.","properties":{"observation_time":{"type":"string"},"temperature":{"type":"number"},"weather_code":{"type":"integer"},"weather_icons":{"type":"array","items":{"type":"string"}},"weather_descriptions":{"type":"array","items":{"type":"string"}},"astro":{"$ref":"#/components/schemas/Astro"},"air_quality":{"$ref":"#/components/schemas/AirQuality"},"wind_speed":{"type":"number"},"wind_degree":{"type":"number"},"wind_dir":{"type":"string"},"pressure":{"type":"number"},"precip":{"type":"number"},"humidity":{"type":"integer"},"cloudcover":{"type":"integer"},"feelslike":{"type":"number"},"uv_index":{"type":"number"},"visibility":{"type":"number"}},"type":"object"},"HourlyEntry":{"description":"Hourly weather entry.","properties":{"time":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Time of day in 24h HMM form as a string, e.g. \"0\", \"300\", \"1500\". Returned as the number 0 (not a string) when interval=24."},"temperature":{"type":"number"},"weather_code":{"type":"integer"},"weather_icons":{"type":"array","items":{"type":"string"}},"weather_descriptions":{"type":"array","items":{"type":"string"}},"precip":{"type":"number"},"humidity":{"type":"integer"},"visibility":{"type":"number"},"pressure":{"type":"number"},"cloudcover":{"type":"integer"},"heatindex":{"type":"number"},"dewpoint":{"type":"number"},"windchill":{"type":"number"},"windgust":{"type":"number"},"feelslike":{"type":"number"},"uv_index":{"type":"number"},"chanceofrain":{"type":"integer"},"chanceofremdry":{"type":"integer"},"chanceofwindy":{"type":"integer"},"chanceofovercast":{"type":"integer"},"chanceofsunshine":{"type":"integer"},"chanceoffrost":{"type":"integer"},"chanceofhightemp":{"type":"integer"},"chanceoffog":{"type":"integer"},"chanceofsnow":{"type":"integer"},"chanceofthunder":{"type":"integer"},"air_quality":{"$ref":"#/components/schemas/AirQuality"}},"type":"object"},"ForecastDay":{"description":"One forecast day.","properties":{"date":{"type":"string","format":"date"},"date_epoch":{"type":"integer"},"astro":{"$ref":"#/components/schemas/Astro"},"maxtemp":{"type":"number"},"mintemp":{"type":"number"},"avgtemp":{"type":"number"},"totalprecip":{"type":"number"},"totalsnow":{"type":"number"},"sunhour":{"type":"number"},"uv_index":{"type":"number"},"air_quality":{"$ref":"#/components/schemas/AirQuality"},"hourly":{"type":"array","items":{"$ref":"#/components/schemas/HourlyEntry"}}},"type":"object"},"HistoricalDay":{"description":"One historical day.","properties":{"date":{"type":"string"},"date_epoch":{"type":"integer"},"totalsnow":{"type":"number"},"sunhour":{"type":"number"},"uv_index":{"type":"number"},"hourly":{"type":"array","items":{"$ref":"#/components/schemas/HourlyEntry"}}},"type":"object"},"CurrentWeatherResponse":{"description":"Current weather response.","properties":{"request":{"$ref":"#/components/schemas/RequestInfo"},"location":{"$ref":"#/components/schemas/Location"},"current":{"$ref":"#/components/schemas/Current"}},"type":"object"},"ForecastResponse":{"description":"Forecast response.","properties":{"request":{"$ref":"#/components/schemas/RequestInfo"},"location":{"$ref":"#/components/schemas/Location"},"current":{"$ref":"#/components/schemas/Current"},"forecast":{"description":"Map of date -> forecast day.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ForecastDay"}}},"type":"object"},"HistoricalResponse":{"description":"Historical weather response.","properties":{"request":{"$ref":"#/components/schemas/RequestInfo"},"location":{"$ref":"#/components/schemas/Location"},"current":{"$ref":"#/components/schemas/Current"},"historical":{"description":"Map of date -> historical day.","type":"object","additionalProperties":{"$ref":"#/components/schemas/HistoricalDay"}}},"type":"object"},"MarineTideEntry":{"description":"A single tide event.","properties":{"tideTime":{"type":"string"},"tideHeight_mt":{"type":"string"},"tideDateTime":{"type":"string"},"tide_type":{"type":"string"}},"type":"object"},"MarineHourlyEntry":{"description":"Hourly marine weather entry.","properties":{"time":{"type":"string"},"temperature":{"type":"number"},"wind_speed":{"type":"number"},"wind_degree":{"type":"number"},"wind_dir":{"type":"string"},"weather_code":{"type":"integer"},"weather_icons":{"type":"array","items":{"type":"string"}},"weather_descriptions":{"type":"array","items":{"type":"string"}},"precip":{"type":"number"},"humidity":{"type":"integer"},"visibility":{"type":"number"},"pressure":{"type":"number"},"cloudcover":{"type":"integer"},"heatindex":{"type":"number"},"dewpoint":{"type":"number"},"windchill":{"type":"number"},"windgust":{"type":"number"},"feelslike":{"type":"number"},"sig_height_m":{"type":"number"},"swell_height":{"type":"number"},"swell_dir":{"type":"number"},"swell_dir_16_point":{"type":"string"},"swell_period_secs":{"type":"integer"},"water_temp":{"type":"number"},"uv_index":{"type":"number"}},"type":"object"},"MarineForecastDay":{"description":"One marine forecast day.","properties":{"date":{"type":"string"},"date_epoch":{"type":"integer"},"astro":{"$ref":"#/components/schemas/Astro"},"mintemp":{"type":"number"},"maxtemp":{"type":"number"},"avgtemp":{"type":"number"},"tides":{"type":"array","items":{"$ref":"#/components/schemas/MarineTideEntry"}},"uv_index":{"type":"number"},"hourly":{"type":"array","items":{"$ref":"#/components/schemas/MarineHourlyEntry"}}},"type":"object"},"MarineResponse":{"description":"Live marine forecast response.","properties":{"request":{"$ref":"#/components/schemas/RequestInfo"},"forecast":{"type":"array","items":{"$ref":"#/components/schemas/MarineForecastDay"}}},"type":"object"},"PastMarineResponse":{"description":"Historical marine response.","properties":{"request":{"$ref":"#/components/schemas/RequestInfo"},"historical":{"description":"Map of date -> historical marine day.","type":"object","additionalProperties":{"$ref":"#/components/schemas/MarineForecastDay"}}},"type":"object"},"AutocompleteResult":{"description":"A single autocomplete location.","properties":{"name":{"type":"string"},"country":{"type":"string"},"region":{"type":"string"},"lon":{"type":"string"},"lat":{"type":"string"},"timezone_id":{"type":"string"},"utc_offset":{"type":"string"}},"type":"object"},"AutocompleteResponse":{"description":"Location autocomplete response.","properties":{"request":{"properties":{"query":{"type":"string"},"results":{"type":"integer"}},"type":"object"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AutocompleteResult"}}},"type":"object"},"Error":{"title":"Error","type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"integer","example":101},"type":{"type":"string","example":"invalid_access_key"},"info":{"type":"string","example":"You have not supplied a valid API Access Key. [Technical Support: support@apilayer.com]"}}}}}},"responses":{"401":{"description":"Unauthorized","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"account_on_hold":{"summary":"account_on_hold","value":{"success":false,"error":{"code":107,"type":"account_on_hold","info":"Your account currently has open invoices and API has been automatically disabled. Please settle your open balance or downgrade to the Free Plan to restore API access. [Support: support@apilayer.com]"}}},"invalid_access_key":{"summary":"invalid_access_key","value":{"success":false,"error":{"code":101,"type":"invalid_access_key","info":"You have not supplied a valid API Access Key. [Technical Support: support@apilayer.com]"}}},"missing_access_key":{"summary":"missing_access_key","value":{"success":false,"error":{"code":101,"type":"missing_access_key","info":"You have not supplied an API Access Key. [Required format: access_key=YOUR_ACCESS_KEY]"}}},"inactive_user":{"summary":"inactive_user","value":{"success":false,"error":{"code":102,"type":"inactive_user","info":"Permission denied - User not active."}}}}}}},"403":{"description":"Forbidden","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"https_access_restricted":{"summary":"https_access_restricted","value":{"success":false,"error":{"code":105,"type":"https_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support HTTPS Encryption."}}},"function_access_restricted":{"summary":"function_access_restricted","value":{"success":false,"error":{"code":105,"type":"function_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support this API Function."}}},"spread_access_restricted":{"summary":"spread_access_restricted","value":{"success":false,"error":{"code":403,"type":"spread_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support Bid/Ask Data."}}},"source_currency_access_restricted":{"summary":"source_currency_access_restricted","value":{"success":false,"error":{"code":403,"type":"source_currency_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support Source Currency Switching."}}},"api_access_blocked":{"summary":"api_access_blocked","value":{"success":false,"error":{"code":104,"type":"api_access_blocked","info":"Your API access has been temporarily disabled. Please upgrade your Subscription Plan or contact support."}}}}}}},"404":{"description":"Not Found","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_function":{"summary":"invalid_api_function","value":{"success":false,"error":{"code":103,"type":"invalid_api_function","info":"This API Function does not exist."}}},"404_not_found":{"summary":"404_not_found","value":{"success":false,"error":{"code":404,"type":"404_not_found","info":"404 - The requested resource could not be found. Please try again or contact support."}}}}}}},"429":{"description":"Too Many Requests","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"usage_limit_reached":{"summary":"usage_limit_reached","value":{"success":false,"error":{"code":104,"type":"usage_limit_reached","info":"Your monthly usage limit has been reached. Please upgrade your Subscription Plan."}}},"daily_usage_limit_reached":{"summary":"daily_usage_limit_reached","value":{"success":false,"error":{"code":104,"type":"daily_usage_limit_reached","info":"Your daily usage limit has been reached. Please try again tomorrow or upgrade your subscription plan."}}},"fair_use_limit_reached":{"summary":"fair_use_limit_reached","value":{"success":false,"error":{"code":104,"type":"fair_use_limit_reached","info":"Your fair use limit has been reached. [Please contact support: support@apilayer.com]"}}},"rate_limit_reached":{"summary":"rate_limit_reached","value":{"success":false,"error":{"code":106,"type":"rate_limit_reached","info":"You have exceeded the maximum rate limitation allowed on your subscription plan. Please refer to the \"Rate Limits\" section of the API Documentation for details. "}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"internal_error","value":{"success":false,"error":{"code":0,"type":"internal_error","info":"An error has occured. [Technical Support: support@apilayer.com]"}}}}}}},"503":{"description":"Service Unavailable","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance_mode":{"summary":"maintenance_mode","value":{"success":false,"error":{"code":503,"type":"maintenance_mode","info":""}}}}}}}}}}