{ "openapi": "3.1.0", "info": { "title": "Interzoid Current Weather by ZIP Code API", "description": "This API provides real-time weather information for a given ZIP Code, including temperature, weather conditions, wind, and more.\nTo use this API, you need an API key. Register for an API key at [Interzoid Registration](https://www.interzoid.com/register-api-account).\nFor more information about this API, visit the [Interzoid Current Weather by ZIP Code API Documentation](https://www.interzoid.com/apis/current-weather-zip-code).\n", "version": "1.0.0", "contact": { "name": "Interzoid Support", "url": "https://www.interzoid.com", "email": "support@interzoid.com" } }, "externalDocs": { "description": "API home page and documentation", "url": "https://www.interzoid.com/apis/current-weather-zip-code" }, "servers": [ { "url": "https://api.interzoid.com", "description": "Production server" } ], "tags": [ { "name": "Current Weather", "description": "Provides real-time weather information for a given ZIP Code." } ], "paths": { "/getweatherzipcode": { "get": { "tags": [ "Current Weather" ], "summary": "Get Current Weather by ZIP Code", "description": "This method provides the current weather information for a given ZIP Code, including temperature, weather conditions, wind, and other metrics.\n**Note**: You must include your API key as the license parameter in the request. If you do not have an API key, you can register for one at [Interzoid Registration](https://www.interzoid.com/register-api-account).\n", "parameters": [ { "name": "license", "in": "query", "required": true, "description": "Your API license key. Register for an API key at [Interzoid Registration](https://www.interzoid.com/register-api-account).\n", "schema": { "type": "string" }, "examples": { "license": { "summary": "API Key Example", "value": "r2d7df664a7c4ef6h8k" } } }, { "name": "zip", "in": "query", "required": true, "description": "The ZIP Code for which the weather information is requested.", "schema": { "type": "string" }, "examples": { "zip": { "summary": "ZIP Code Example", "value": "14201" } } } ], "responses": { "200": { "description": "Successful response containing the current weather information.", "content": { "application/json": { "schema": { "type": "object", "properties": { "City": { "type": "string", "description": "The name of the city for the specified ZIP Code." }, "State": { "type": "string", "description": "The state abbreviation for the specified ZIP Code." }, "TempF": { "type": "string", "description": "Temperature in Fahrenheit." }, "TempC": { "type": "string", "description": "Temperature in Celsius." }, "Weather": { "type": "string", "description": "A description of the current weather conditions." }, "WindMPH": { "type": "string", "description": "Wind speed in miles per hour." }, "WindDir": { "type": "string", "description": "Wind direction." }, "RelativeHumidity": { "type": "string", "description": "The relative humidity percentage." }, "VisibilityMiles": { "type": "string", "description": "Visibility in miles." }, "PrecipitationLastHour": { "type": "string", "description": "Precipitation in the last hour in millimeters." }, "WindChill": { "type": "string", "description": "Wind chill temperature in Fahrenheit." }, "HeatIndex": { "type": "string", "description": "Heat index temperature in Fahrenheit." }, "Code": { "type": "string", "description": "Status code indicating the success of the request." }, "Credits": { "type": "string", "description": "Remaining credits for your API license." } }, "examples": [ { "summary": "Successful response example", "value": { "City": "Buffalo", "State": "NY", "TempF": "31", "TempC": "-0.6", "Weather": "Cloudy", "WindMPH": "22", "WindDir": "W", "RelativeHumidity": "63", "VisibilityMiles": "10", "PrecipitationLastHour": "0", "WindChill": "21", "HeatIndex": "NA", "Code": "Success", "Credits": "20063378" } } ] } } } }, "400": { "description": "Bad request (e.g., missing or invalid parameters).", "content": { "application/json": { "schema": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } }, "examples": [ { "summary": "Missing or invalid parameters", "value": { "Code": "400", "Message": "Invalid license key or ZIP Code missing." } } ] } } } }, "402": { "description": "API key not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } }, "examples": [ { "summary": "API key not found", "value": { "Code": "402", "Message": "API key not found." } } ] } } } }, "403": { "description": "Insufficient API credits remaining.", "content": { "application/json": { "schema": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } }, "examples": [ { "summary": "Insufficient credits", "value": { "Code": "403", "Message": "Insufficient API credits remaining." } } ] } } } }, "405": { "description": "Method not allowed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } }, "examples": [ { "summary": "Wrong HTTP method", "value": { "Code": "405", "Message": "Method not allowed." } } ] } } } }, "429": { "description": "Rate limits reached.", "content": { "application/json": { "schema": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } }, "examples": [ { "summary": "Rate limit reached", "value": { "Code": "429", "Message": "Rate limits reached." } } ] } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } }, "examples": [ { "summary": "Server error", "value": { "Code": "500", "Message": "Internal server error." } } ] } } } } } } } }, "components": { "securitySchemes": { "apiKeyAuth": { "type": "apiKey", "name": "license", "in": "query" } }, "schemas": { "ResponseError": { "type": "object", "properties": { "Code": { "type": "string", "description": "Response code." }, "Message": { "type": "string", "description": "Error message." } } } } }, "security": [ { "apiKeyAuth": [] } ] }