{
  "service": "mediastack",
  "displayName": "Mediastack",
  "categories": [
    "Data",
    "Social"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "mediastack_api_key",
      "description": "Mediastack API key sent with the access_key query parameter. Find it in https://mediastack.com/dashboard."
    }
  ],
  "homepageUrl": "https://mediastack.com",
  "actions": [
    {
      "id": "mediastack.search_live_news",
      "service": "mediastack",
      "name": "search_live_news",
      "description": "Search live Mediastack news articles with optional keyword, source, location, and sorting filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "keywords": {
            "type": "string",
            "minLength": 1,
            "description": "Keywords used to filter returned news articles by title or description."
          },
          "sources": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated source identifiers used to filter returned articles."
          },
          "countries": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated country codes used to filter returned articles."
          },
          "languages": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated language codes used to filter returned articles."
          },
          "categories": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated categories used to filter returned articles."
          },
          "sort": {
            "type": "string",
            "enum": [
              "published_desc",
              "published_asc",
              "popularity"
            ],
            "description": "Sort order used by the live news request."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Maximum number of articles to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of leading articles to skip."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for searching Mediastack live news."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "articles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "author": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Author name returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Article title returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Article summary or excerpt."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Canonical article URL."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Source name returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "image": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Preview image URL returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Article category returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "language": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Article language code returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "country": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Article country code returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publishedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Article publication timestamp returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "Normalized news article returned by Mediastack."
            },
            "description": "News articles returned by Mediastack."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Requested page size returned by Mediastack."
              },
              "offset": {
                "type": "integer",
                "description": "Number of skipped records before the current page."
              },
              "count": {
                "type": "integer",
                "description": "Number of records returned on the current page."
              },
              "total": {
                "type": "integer",
                "description": "Total number of matching records available."
              }
            },
            "additionalProperties": false,
            "description": "Pagination information returned by Mediastack."
          }
        },
        "additionalProperties": false,
        "description": "Live news search response returned by Mediastack."
      }
    },
    {
      "id": "mediastack.search_news_sources",
      "service": "mediastack",
      "name": "search_news_sources",
      "description": "Search Mediastack news sources with language, country, category, and pagination filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "Search text used to match source names or descriptions."
          },
          "countries": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated country codes used to filter the returned sources."
          },
          "languages": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated language codes used to filter the returned sources."
          },
          "categories": {
            "type": "string",
            "minLength": 1,
            "description": "Comma-separated categories used to filter the returned sources."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Maximum number of sources to return."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of leading sources to skip."
          }
        },
        "additionalProperties": false,
        "required": [
          "search"
        ],
        "description": "Input parameters for searching Mediastack news sources."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Unique source identifier returned by Mediastack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Display name of the news source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Short description of the news source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Category assigned to the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "country": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Country code assigned to the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "language": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Language code assigned to the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Homepage URL of the source."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "Normalized news source returned by Mediastack."
            },
            "description": "News sources returned by Mediastack."
          },
          "pagination": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Requested page size returned by Mediastack."
              },
              "offset": {
                "type": "integer",
                "description": "Number of skipped records before the current page."
              },
              "count": {
                "type": "integer",
                "description": "Number of records returned on the current page."
              },
              "total": {
                "type": "integer",
                "description": "Total number of matching records available."
              }
            },
            "additionalProperties": false,
            "description": "Pagination information returned by Mediastack."
          }
        },
        "additionalProperties": false,
        "description": "News source search response returned by Mediastack."
      }
    }
  ]
}
