{
  "service": "positionstack",
  "displayName": "Positionstack",
  "categories": [
    "Location",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "POSITIONSTACK_API_KEY",
      "description": "Positionstack API key sent as the access_key query parameter. Get a free key at https://positionstack.com/signup/free/ or manage API keys in APILayer: https://apilayer.com/docs/article/managing-api-keys."
    }
  ],
  "homepageUrl": "https://positionstack.com",
  "actions": [
    {
      "id": "positionstack.forward_geocode",
      "service": "positionstack",
      "name": "forward_geocode",
      "description": "Convert an address or place query into Positionstack geocoding results.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "The address, place, latitude/longitude pair, or IP address to geocode."
          },
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated 2- or 3-letter country codes used to restrict results."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "Region filter such as a state, county, or city name."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Preferred response language code, such as en or de."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 80,
            "description": "Maximum number of results to return, from 1 to 80."
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A Positionstack response field path."
            },
            "description": "Optional response field paths to include, such as results.latitude or results.longitude.",
            "minItems": 1
          },
          "country_module": {
            "type": "boolean",
            "description": "Whether to include extended country metadata in each result."
          },
          "sun_module": {
            "type": "boolean",
            "description": "Whether to include sunrise, sunset, and solar metadata in each result."
          },
          "timezone_module": {
            "type": "boolean",
            "description": "Whether to include timezone metadata in each result."
          },
          "bbox_module": {
            "type": "boolean",
            "description": "Whether to include bounding box coordinates in each result."
          }
        },
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "description": "Input parameters for converting an address or place into Positionstack geocoding results."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "request": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "The original query string."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The requested result limit."
                  }
                },
                "additionalProperties": true,
                "description": "Echoed request parameters returned by Positionstack."
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "latitude": {
                      "type": "number",
                      "description": "Latitude in decimal degrees."
                    },
                    "longitude": {
                      "type": "number",
                      "description": "Longitude in decimal degrees."
                    },
                    "label": {
                      "type": "string",
                      "description": "Formatted address or place label."
                    },
                    "name": {
                      "type": "string",
                      "description": "Name portion of the result."
                    },
                    "type": {
                      "type": "string",
                      "description": "Result classification, such as address, venue, street, region, or country."
                    },
                    "number": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "House or street number when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "street": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Street name when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "postal_code": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Postal or ZIP code when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "confidence": {
                      "type": "number",
                      "description": "Confidence score from 0 to 1."
                    },
                    "region": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Region, state, or province name."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "region_code": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Short region code when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "administrative_area": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Administrative area such as county or district."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "neighbourhood": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Neighbourhood name when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "country": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Country name."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "country_code": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "ISO 3166 alpha-2 country code."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "map_url": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Embeddable Positionstack map URL for this location.",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "distance": {
                      "anyOf": [
                        {
                          "type": "number",
                          "description": "Distance in meters from the requested coordinate."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bbox_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    },
                    "country_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    },
                    "timezone_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    },
                    "sun_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    }
                  },
                  "additionalProperties": true,
                  "description": "A single Positionstack geocoding result."
                },
                "description": "The ordered geocoding results returned by Positionstack."
              }
            },
            "additionalProperties": true,
            "required": [
              "results"
            ],
            "description": "Positionstack geocoding data wrapper."
          }
        },
        "additionalProperties": true,
        "description": "The Positionstack response payload for a single geocoding request."
      }
    },
    {
      "id": "positionstack.reverse_geocode",
      "service": "positionstack",
      "name": "reverse_geocode",
      "description": "Convert coordinates or an IP address into Positionstack reverse geocoding results.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "Latitude and longitude formatted as latitude,longitude, or an IP address to reverse geocode."
          },
          "country": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated 2- or 3-letter country codes used to restrict results."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "Region filter such as a state, county, or city name."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "Preferred response language code, such as en or de."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 80,
            "description": "Maximum number of results to return, from 1 to 80."
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A Positionstack response field path."
            },
            "description": "Optional response field paths to include, such as results.latitude or results.longitude.",
            "minItems": 1
          },
          "country_module": {
            "type": "boolean",
            "description": "Whether to include extended country metadata in each result."
          },
          "sun_module": {
            "type": "boolean",
            "description": "Whether to include sunrise, sunset, and solar metadata in each result."
          },
          "timezone_module": {
            "type": "boolean",
            "description": "Whether to include timezone metadata in each result."
          },
          "bbox_module": {
            "type": "boolean",
            "description": "Whether to include bounding box coordinates in each result."
          }
        },
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "description": "Input parameters for converting coordinates or an IP address into Positionstack geocoding results."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "request": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "The original query string."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The requested result limit."
                  }
                },
                "additionalProperties": true,
                "description": "Echoed request parameters returned by Positionstack."
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "latitude": {
                      "type": "number",
                      "description": "Latitude in decimal degrees."
                    },
                    "longitude": {
                      "type": "number",
                      "description": "Longitude in decimal degrees."
                    },
                    "label": {
                      "type": "string",
                      "description": "Formatted address or place label."
                    },
                    "name": {
                      "type": "string",
                      "description": "Name portion of the result."
                    },
                    "type": {
                      "type": "string",
                      "description": "Result classification, such as address, venue, street, region, or country."
                    },
                    "number": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "House or street number when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "street": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Street name when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "postal_code": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Postal or ZIP code when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "confidence": {
                      "type": "number",
                      "description": "Confidence score from 0 to 1."
                    },
                    "region": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Region, state, or province name."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "region_code": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Short region code when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "administrative_area": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Administrative area such as county or district."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "neighbourhood": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Neighbourhood name when available."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "country": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Country name."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "country_code": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "ISO 3166 alpha-2 country code."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "map_url": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "Embeddable Positionstack map URL for this location.",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "distance": {
                      "anyOf": [
                        {
                          "type": "number",
                          "description": "Distance in meters from the requested coordinate."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bbox_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    },
                    "country_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    },
                    "timezone_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    },
                    "sun_module": {
                      "type": "object",
                      "additionalProperties": {
                        "description": "A provider-defined JSON value."
                      },
                      "description": "A JSON object returned by Positionstack with provider-defined fields."
                    }
                  },
                  "additionalProperties": true,
                  "description": "A single Positionstack geocoding result."
                },
                "description": "The ordered geocoding results returned by Positionstack."
              }
            },
            "additionalProperties": true,
            "required": [
              "results"
            ],
            "description": "Positionstack geocoding data wrapper."
          }
        },
        "additionalProperties": true,
        "description": "The Positionstack response payload for a single geocoding request."
      }
    }
  ]
}
