{
  "service": "valyu",
  "displayName": "Valyu",
  "categories": [
    "AI",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "vly-...",
      "description": "Valyu API key sent in the X-API-Key header. Create or copy a key from the Valyu Platform API Keys page.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://valyu.ai",
  "actions": [
    {
      "id": "valyu.search",
      "service": "valyu",
      "name": "search",
      "description": "Search web, academic, financial, and proprietary data sources with Valyu.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "The search query to execute."
          },
          "max_num_results": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "description": "The maximum number of search results to return."
          },
          "search_type": {
            "type": "string",
            "enum": [
              "all",
              "web",
              "proprietary",
              "news"
            ],
            "description": "Controls which data sources are searched."
          },
          "max_price": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "The maximum budget in CPM for this request."
          },
          "relevance_threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "The minimum relevance score for returned results."
          },
          "included_sources": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A domain, URL, datasource identifier, preset name, web keyword, or collection reference."
            },
            "description": "Sources to include in the search.",
            "minItems": 1
          },
          "excluded_sources": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "A domain, URL, or datasource identifier to exclude."
            },
            "description": "Sources to exclude from the search.",
            "minItems": 1
          },
          "source_biases": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "minimum": -5,
                  "maximum": 5,
                  "description": "A bias value from -5 for strong demotion to 5 for strong boost."
                },
                "description": "Bias values by domain or URL path."
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "type": "string",
            "maxLength": 500,
            "description": "Natural language instructions to help rank results."
          },
          "is_tool_call": {
            "type": "boolean",
            "description": "Whether this request originates from an AI tool call."
          },
          "response_length": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "short",
                  "medium",
                  "large",
                  "max"
                ],
                "description": "A named response length."
              },
              {
                "type": "integer",
                "minimum": 1,
                "description": "A custom positive character limit."
              }
            ],
            "description": "The maximum content length per result."
          },
          "start_date": {
            "type": "string",
            "description": "Only return results published on or after this date.",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "description": "Only return results published on or before this date.",
            "format": "date"
          },
          "country_code": {
            "type": "string",
            "enum": [
              "ALL",
              "AR",
              "AU",
              "AT",
              "BE",
              "BR",
              "CA",
              "CL",
              "DK",
              "FI",
              "FR",
              "DE",
              "HK",
              "IN",
              "ID",
              "IT",
              "JP",
              "KR",
              "MY",
              "MX",
              "NL",
              "NZ",
              "NO",
              "CN",
              "PL",
              "PT",
              "PH",
              "RU",
              "SA",
              "ZA",
              "ES",
              "SE",
              "CH",
              "TW",
              "TR",
              "GB",
              "US"
            ],
            "description": "The ISO 3166-1 alpha-2 country code for geo-targeted web results."
          },
          "fast_mode": {
            "type": "boolean",
            "description": "Whether to bypass LLM query rewriting and reranking for lower latency."
          },
          "url_only": {
            "type": "boolean",
            "description": "Whether to return only URLs without full content extraction."
          }
        },
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "description": "The input payload for a Valyu Search request."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the search completed successfully."
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "description": "An error or warning message returned by Valyu."
              },
              {
                "type": "null"
              }
            ]
          },
          "tx_id": {
            "type": "string",
            "description": "The Valyu transaction ID for tracking and support."
          },
          "query": {
            "type": "string",
            "description": "The original query as submitted."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The unique identifier for this result."
                },
                "title": {
                  "type": "string",
                  "description": "The title of the source document."
                },
                "url": {
                  "type": "string",
                  "description": "The URL of the source document.",
                  "format": "uri"
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Extracted text content in markdown format."
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true,
                        "description": "A JSON object passed through from Valyu."
                      },
                      "description": "Structured result content rows."
                    },
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "A JSON object passed through from Valyu."
                    }
                  ],
                  "description": "The extracted result content."
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "A short description or meta summary of the result."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source": {
                  "type": "string",
                  "description": "The Valyu source identifier for the result."
                },
                "price": {
                  "type": "number",
                  "description": "The cost in USD for this individual result."
                },
                "length": {
                  "type": "integer",
                  "description": "The character count of the content field."
                },
                "image_url": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "One image URL.",
                          "format": "uri"
                        },
                        {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "description": "One image URL.",
                            "format": "uri"
                          },
                          "description": "Image URLs keyed by index."
                        }
                      ],
                      "description": "Image URLs associated with this result."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "relevance_score": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1,
                  "description": "The relevance score from reranking."
                },
                "data_type": {
                  "type": "string",
                  "enum": [
                    "unstructured",
                    "structured"
                  ],
                  "description": "The format of the content field."
                },
                "source_type": {
                  "type": "string",
                  "enum": [
                    "website",
                    "forum",
                    "paper",
                    "data",
                    "report",
                    "health_data",
                    "clinical_trial",
                    "drug_label",
                    "grants"
                  ],
                  "description": "The classification of the source."
                },
                "publication_date": {
                  "type": "string",
                  "description": "The publication date in YYYY-MM-DD format, if known."
                },
                "doi": {
                  "type": "string",
                  "description": "The DOI identifier for academic results."
                },
                "citation": {
                  "type": "string",
                  "description": "Citation text for academic results."
                },
                "citation_count": {
                  "type": "integer",
                  "description": "The citation count for academic results."
                },
                "authors": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "One author name."
                  },
                  "description": "Author names for academic results."
                },
                "references": {
                  "type": "string",
                  "description": "References text for academic results."
                },
                "metadata": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "A JSON object passed through from Valyu."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "A JSON object passed through from Valyu."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "title",
                "url",
                "content",
                "source",
                "price",
                "length",
                "data_type",
                "source_type",
                "raw"
              ],
              "description": "One search result returned by Valyu."
            },
            "description": "Search results ordered by relevance."
          },
          "results_by_source": {
            "type": "object",
            "properties": {
              "web": {
                "type": "integer",
                "description": "The number of web results."
              },
              "proprietary": {
                "type": "integer",
                "description": "The number of proprietary results."
              }
            },
            "additionalProperties": {
              "type": "integer",
              "description": "A source result count."
            },
            "description": "The count of search results broken down by source type."
          },
          "total_deduction_dollars": {
            "type": "number",
            "description": "The total cost charged for this search in USD."
          },
          "total_characters": {
            "type": "integer",
            "description": "The total number of characters across returned results."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One warning message."
            },
            "description": "Warning messages returned by Valyu."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A JSON object passed through from Valyu."
          }
        },
        "additionalProperties": false,
        "required": [
          "success",
          "error",
          "tx_id",
          "query",
          "results",
          "results_by_source",
          "total_deduction_dollars",
          "total_characters",
          "raw"
        ],
        "description": "The Valyu Search response."
      }
    }
  ]
}
