{
  "service": "api_ninjas",
  "displayName": "API Ninjas",
  "categories": [
    "Developer Tools",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "api_ninjas_api_key",
      "description": "API Ninjas API key used with the X-Api-Key header. Sign up for a key or find it from the official API docs: https://api-ninjas.com/api."
    }
  ],
  "homepageUrl": "https://api-ninjas.com",
  "actions": [
    {
      "id": "api_ninjas.air_quality",
      "service": "api_ninjas",
      "name": "air_quality",
      "description": "Fetch current air quality metrics for coordinates or a city-based lookup.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude coordinate in decimal degrees between -90 and 90."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude coordinate in decimal degrees between -180 and 180."
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "City name used to look up the requested location."
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "description": "State or province used to narrow the city-based lookup."
          },
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Country name or ISO country code used to narrow the city-based lookup."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for looking up air quality by coordinates or city.",
        "anyOf": [
          {
            "required": [
              "lat",
              "lon"
            ]
          },
          {
            "required": [
              "city"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "overallAqi": {
            "type": "number",
            "description": "Overall air quality index for the location."
          },
          "co": {
            "type": "object",
            "properties": {
              "aqi": {
                "type": "number",
                "description": "Air quality index for the pollutant."
              },
              "concentration": {
                "type": "number",
                "description": "Pollutant concentration in micrograms per cubic meter."
              }
            },
            "additionalProperties": false,
            "description": "Normalized pollutant measurement."
          },
          "no2": {
            "type": "object",
            "properties": {
              "aqi": {
                "type": "number",
                "description": "Air quality index for the pollutant."
              },
              "concentration": {
                "type": "number",
                "description": "Pollutant concentration in micrograms per cubic meter."
              }
            },
            "additionalProperties": false,
            "description": "Normalized pollutant measurement."
          },
          "o3": {
            "type": "object",
            "properties": {
              "aqi": {
                "type": "number",
                "description": "Air quality index for the pollutant."
              },
              "concentration": {
                "type": "number",
                "description": "Pollutant concentration in micrograms per cubic meter."
              }
            },
            "additionalProperties": false,
            "description": "Normalized pollutant measurement."
          },
          "so2": {
            "type": "object",
            "properties": {
              "aqi": {
                "type": "number",
                "description": "Air quality index for the pollutant."
              },
              "concentration": {
                "type": "number",
                "description": "Pollutant concentration in micrograms per cubic meter."
              }
            },
            "additionalProperties": false,
            "description": "Normalized pollutant measurement."
          },
          "pm25": {
            "type": "object",
            "properties": {
              "aqi": {
                "type": "number",
                "description": "Air quality index for the pollutant."
              },
              "concentration": {
                "type": "number",
                "description": "Pollutant concentration in micrograms per cubic meter."
              }
            },
            "additionalProperties": false,
            "description": "Normalized pollutant measurement."
          },
          "pm10": {
            "type": "object",
            "properties": {
              "aqi": {
                "type": "number",
                "description": "Air quality index for the pollutant."
              },
              "concentration": {
                "type": "number",
                "description": "Pollutant concentration in micrograms per cubic meter."
              }
            },
            "additionalProperties": false,
            "description": "Normalized pollutant measurement."
          }
        },
        "additionalProperties": false,
        "description": "Normalized air quality metrics returned by the air_quality action."
      }
    },
    {
      "id": "api_ninjas.geocode",
      "service": "api_ninjas",
      "name": "geocode",
      "description": "Convert a city name into geographic coordinates and country information.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "City name to convert into geographic coordinates."
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "description": "State or province used to narrow the city-based lookup."
          },
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Country name or ISO country code used to narrow the city-based lookup."
          },
          "zipcode": {
            "type": "string",
            "minLength": 1,
            "description": "ZIP or postal code used to narrow the geocoding lookup."
          }
        },
        "additionalProperties": false,
        "required": [
          "city"
        ],
        "description": "Input parameters for converting a named location into coordinates."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Resolved location name returned by the geocoding lookup."
                },
                "latitude": {
                  "type": "number",
                  "description": "Latitude of the resolved location in decimal degrees."
                },
                "longitude": {
                  "type": "number",
                  "description": "Longitude of the resolved location in decimal degrees."
                },
                "country": {
                  "type": "string",
                  "description": "Country code of the resolved location."
                }
              },
              "additionalProperties": false,
              "description": "A single geocoding result."
            },
            "description": "Resolved geocoding matches for the input."
          }
        },
        "additionalProperties": false,
        "description": "Resolved coordinates returned by the geocode action."
      }
    },
    {
      "id": "api_ninjas.reverse_geocode",
      "service": "api_ninjas",
      "name": "reverse_geocode",
      "description": "Resolve latitude and longitude coordinates into place metadata.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude coordinate in decimal degrees between -90 and 90."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude coordinate in decimal degrees between -180 and 180."
          }
        },
        "additionalProperties": false,
        "required": [
          "lat",
          "lon"
        ],
        "description": "Input parameters for resolving coordinates into location metadata."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Resolved place name for the provided coordinates."
                },
                "country": {
                  "type": "string",
                  "description": "Country code of the resolved place."
                },
                "state": {
                  "type": "string",
                  "description": "State or administrative region of the resolved place."
                }
              },
              "additionalProperties": false,
              "required": [
                "name",
                "country"
              ],
              "description": "A single reverse geocoding result."
            },
            "description": "Resolved places matching the provided coordinates."
          }
        },
        "additionalProperties": false,
        "description": "Resolved location metadata returned by the reverse geocode action."
      }
    },
    {
      "id": "api_ninjas.timezone",
      "service": "api_ninjas",
      "name": "timezone",
      "description": "Fetch timezone metadata by timezone name or premium location lookup fields.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "timezone": {
            "type": "string",
            "minLength": 1,
            "description": "IANA timezone identifier used by the free-tier lookup path."
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude coordinate in decimal degrees between -90 and 90."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude coordinate in decimal degrees between -180 and 180."
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "City name used to look up the requested location."
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "description": "State or province used to narrow the city-based lookup."
          },
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Country name or ISO country code used to narrow the city-based lookup."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for looking up timezone details.",
        "anyOf": [
          {
            "required": [
              "timezone"
            ]
          },
          {
            "required": [
              "lat",
              "lon"
            ]
          },
          {
            "required": [
              "city"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "timezone": {
            "type": "string",
            "description": "Resolved IANA timezone identifier."
          },
          "utcOffset": {
            "type": "number",
            "description": "UTC offset in seconds for the resolved timezone."
          },
          "localTime": {
            "type": "string",
            "description": "Current local time in ISO 8601 format."
          },
          "city": {
            "type": "string",
            "description": "Resolved city name when available."
          }
        },
        "additionalProperties": false,
        "required": [
          "timezone",
          "utcOffset",
          "localTime"
        ],
        "description": "Normalized timezone data returned by the timezone action."
      }
    },
    {
      "id": "api_ninjas.weather",
      "service": "api_ninjas",
      "name": "weather",
      "description": "Fetch the current weather conditions for a set of coordinates.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude coordinate in decimal degrees between -90 and 90."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude coordinate in decimal degrees between -180 and 180."
          }
        },
        "additionalProperties": false,
        "required": [
          "lat",
          "lon"
        ],
        "description": "Coordinate input accepted by weather endpoints."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "temp": {
            "type": "number",
            "description": "Temperature in Celsius."
          },
          "feelsLike": {
            "type": "number",
            "description": "Perceived temperature in Celsius."
          },
          "minTemp": {
            "type": "number",
            "description": "Lowest temperature in Celsius."
          },
          "maxTemp": {
            "type": "number",
            "description": "Highest temperature in Celsius."
          },
          "humidity": {
            "type": "number",
            "description": "Humidity percentage."
          },
          "windSpeed": {
            "type": "number",
            "description": "Wind speed in meters per second."
          },
          "windDegrees": {
            "type": "number",
            "description": "Wind direction in degrees."
          },
          "sunrise": {
            "type": "number",
            "description": "Sunrise time as a Unix timestamp in seconds."
          },
          "sunset": {
            "type": "number",
            "description": "Sunset time as a Unix timestamp in seconds."
          }
        },
        "additionalProperties": false,
        "description": "Normalized weather metrics for a single reading."
      }
    },
    {
      "id": "api_ninjas.weather_forecast",
      "service": "api_ninjas",
      "name": "weather_forecast",
      "description": "Fetch forecast weather readings for a set of coordinates.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude coordinate in decimal degrees between -90 and 90."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude coordinate in decimal degrees between -180 and 180."
          }
        },
        "additionalProperties": false,
        "required": [
          "lat",
          "lon"
        ],
        "description": "Coordinate input accepted by weather endpoints."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "forecast": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "temp": {
                  "type": "number",
                  "description": "Temperature in Celsius."
                },
                "feelsLike": {
                  "type": "number",
                  "description": "Perceived temperature in Celsius."
                },
                "minTemp": {
                  "type": "number",
                  "description": "Lowest temperature in Celsius."
                },
                "maxTemp": {
                  "type": "number",
                  "description": "Highest temperature in Celsius."
                },
                "humidity": {
                  "type": "number",
                  "description": "Humidity percentage."
                },
                "windSpeed": {
                  "type": "number",
                  "description": "Wind speed in meters per second."
                },
                "windDegrees": {
                  "type": "number",
                  "description": "Wind direction in degrees."
                },
                "sunrise": {
                  "type": "number",
                  "description": "Sunrise time as a Unix timestamp in seconds."
                },
                "sunset": {
                  "type": "number",
                  "description": "Sunset time as a Unix timestamp in seconds."
                }
              },
              "additionalProperties": false,
              "description": "Normalized weather metrics for a single reading."
            },
            "description": "Forecast readings returned in chronological order."
          }
        },
        "additionalProperties": false,
        "description": "Forecast weather data returned by the weather_forecast action."
      }
    }
  ]
}
