qtype 0.1.11__py3-none-any.whl → 0.1.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qtype/` +0 -0
- qtype/application/__init__.py +0 -2
- qtype/application/converters/tools_from_api.py +67 -57
- qtype/application/converters/tools_from_module.py +66 -32
- qtype/base/types.py +6 -1
- qtype/commands/convert.py +3 -6
- qtype/commands/generate.py +97 -10
- qtype/commands/mcp.py +68 -0
- qtype/commands/run.py +116 -44
- qtype/commands/validate.py +4 -4
- qtype/docs/.pages +8 -0
- qtype/docs/Concepts/mental-model-and-philosophy.md +363 -0
- qtype/docs/Contributing/.pages +4 -0
- qtype/docs/Contributing/index.md +283 -0
- qtype/docs/Contributing/roadmap.md +81 -0
- qtype/docs/Decisions/ADR-001-Chat-vs-Completion-Endpoint-Features.md +56 -0
- qtype/docs/Gallery/dataflow_pipelines.md +81 -0
- qtype/docs/Gallery/dataflow_pipelines.mermaid +45 -0
- qtype/docs/Gallery/research_assistant.md +97 -0
- qtype/docs/Gallery/research_assistant.mermaid +42 -0
- qtype/docs/Gallery/simple_chatbot.md +38 -0
- qtype/docs/Gallery/simple_chatbot.mermaid +35 -0
- qtype/docs/How To/Authentication/configure_aws_authentication.md +60 -0
- qtype/docs/How To/Authentication/use_api_key_authentication.md +40 -0
- qtype/docs/How To/Command Line Usage/load_multiple_inputs_from_files.md +77 -0
- qtype/docs/How To/Command Line Usage/pass_inputs_on_the_cli.md +52 -0
- qtype/docs/How To/Command Line Usage/serve_with_auto_reload.md +27 -0
- qtype/docs/How To/Data Processing/adjust_concurrency.md +40 -0
- qtype/docs/How To/Data Processing/cache_step_results.md +71 -0
- qtype/docs/How To/Data Processing/decode_json_xml.md +24 -0
- qtype/docs/How To/Data Processing/explode_collections.md +40 -0
- qtype/docs/How To/Data Processing/gather_results.md +68 -0
- qtype/docs/How To/Data Processing/invoke_other_flows.md +71 -0
- qtype/docs/How To/Data Processing/load_data_from_athena.md +49 -0
- qtype/docs/How To/Data Processing/read_data_from_files.md +61 -0
- qtype/docs/How To/Data Processing/read_sql_databases.md +46 -0
- qtype/docs/How To/Data Processing/write_data_to_file.md +39 -0
- qtype/docs/How To/Invoke Models/call_large_language_models.md +51 -0
- qtype/docs/How To/Invoke Models/create_embeddings.md +49 -0
- qtype/docs/How To/Invoke Models/reuse_prompts_with_templates.md +38 -0
- qtype/docs/How To/Language Features/include_qtype_yaml.md +45 -0
- qtype/docs/How To/Language Features/include_raw_text_from_other_files.md +48 -0
- qtype/docs/How To/Language Features/reference_entities_by_id.md +51 -0
- qtype/docs/How To/Language Features/use_agent_skills.md +29 -0
- qtype/docs/How To/Language Features/use_environment_variables.md +48 -0
- qtype/docs/How To/Language Features/use_optional_variables.md +42 -0
- qtype/docs/How To/Language Features/use_qtype_mcp.md +59 -0
- qtype/docs/How To/Observability & Debugging/trace_calls_with_open_telemetry.md +49 -0
- qtype/docs/How To/Observability & Debugging/validate_qtype_yaml.md +36 -0
- qtype/docs/How To/Observability & Debugging/visualize_application_architecture.md +61 -0
- qtype/docs/How To/Observability & Debugging/visualize_example.mermaid +35 -0
- qtype/docs/How To/Qtype Server/flow_as_ui.png +0 -0
- qtype/docs/How To/Qtype Server/serve_flows_as_apis.md +40 -0
- qtype/docs/How To/Qtype Server/serve_flows_as_ui.md +41 -0
- qtype/docs/How To/Qtype Server/use_conversational_interfaces.md +56 -0
- qtype/docs/How To/Qtype Server/use_variables_with_ui_hints.md +48 -0
- qtype/docs/How To/Tools & Integration/bind_tool_inputs_and_outputs.md +47 -0
- qtype/docs/How To/Tools & Integration/create_tools_from_openapi_specifications.md +85 -0
- qtype/docs/How To/Tools & Integration/create_tools_from_python_modules.md +87 -0
- qtype/docs/Reference/cli.md +336 -0
- qtype/docs/Reference/plugins.md +99 -0
- qtype/docs/Reference/semantic-validation-rules.md +184 -0
- qtype/docs/Tutorials/.pages +1 -0
- qtype/docs/Tutorials/01-first-qtype-application.md +249 -0
- qtype/docs/Tutorials/02-conversational-chatbot.md +327 -0
- qtype/docs/Tutorials/03-structured-data.md +480 -0
- qtype/docs/Tutorials/04-tools-and-function-calling.md +476 -0
- qtype/docs/Tutorials/example_chat.png +0 -0
- qtype/docs/Tutorials/index.md +92 -0
- qtype/docs/components/APIKeyAuthProvider.md +7 -0
- qtype/docs/components/APITool.md +10 -0
- qtype/docs/components/AWSAuthProvider.md +13 -0
- qtype/docs/components/AWSSecretManager.md +5 -0
- qtype/docs/components/Agent.md +6 -0
- qtype/docs/components/Aggregate.md +7 -0
- qtype/docs/components/AggregateStats.md +7 -0
- qtype/docs/components/Application.md +22 -0
- qtype/docs/components/AuthorizationProvider.md +6 -0
- qtype/docs/components/AuthorizationProviderList.md +5 -0
- qtype/docs/components/BearerTokenAuthProvider.md +6 -0
- qtype/docs/components/BedrockReranker.md +8 -0
- qtype/docs/components/ChatContent.md +7 -0
- qtype/docs/components/ChatMessage.md +6 -0
- qtype/docs/components/Collect.md +6 -0
- qtype/docs/components/ConstantPath.md +5 -0
- qtype/docs/components/Construct.md +6 -0
- qtype/docs/components/CustomType.md +7 -0
- qtype/docs/components/Decoder.md +8 -0
- qtype/docs/components/DecoderFormat.md +8 -0
- qtype/docs/components/DocToTextConverter.md +7 -0
- qtype/docs/components/Document.md +7 -0
- qtype/docs/components/DocumentEmbedder.md +6 -0
- qtype/docs/components/DocumentIndex.md +7 -0
- qtype/docs/components/DocumentSearch.md +7 -0
- qtype/docs/components/DocumentSource.md +12 -0
- qtype/docs/components/DocumentSplitter.md +9 -0
- qtype/docs/components/Echo.md +8 -0
- qtype/docs/components/Embedding.md +7 -0
- qtype/docs/components/EmbeddingModel.md +6 -0
- qtype/docs/components/Explode.md +5 -0
- qtype/docs/components/FieldExtractor.md +21 -0
- qtype/docs/components/FileSource.md +6 -0
- qtype/docs/components/FileWriter.md +7 -0
- qtype/docs/components/Flow.md +14 -0
- qtype/docs/components/FlowInterface.md +7 -0
- qtype/docs/components/Index.md +8 -0
- qtype/docs/components/IndexUpsert.md +6 -0
- qtype/docs/components/InvokeEmbedding.md +7 -0
- qtype/docs/components/InvokeFlow.md +8 -0
- qtype/docs/components/InvokeTool.md +8 -0
- qtype/docs/components/LLMInference.md +9 -0
- qtype/docs/components/ListType.md +5 -0
- qtype/docs/components/Memory.md +8 -0
- qtype/docs/components/MessageRole.md +14 -0
- qtype/docs/components/Model.md +10 -0
- qtype/docs/components/ModelList.md +5 -0
- qtype/docs/components/OAuth2AuthProvider.md +9 -0
- qtype/docs/components/PrimitiveTypeEnum.md +20 -0
- qtype/docs/components/PromptTemplate.md +7 -0
- qtype/docs/components/PythonFunctionTool.md +7 -0
- qtype/docs/components/RAGChunk.md +7 -0
- qtype/docs/components/RAGDocument.md +10 -0
- qtype/docs/components/RAGSearchResult.md +8 -0
- qtype/docs/components/Reranker.md +5 -0
- qtype/docs/components/SQLSource.md +8 -0
- qtype/docs/components/Search.md +7 -0
- qtype/docs/components/SearchResult.md +7 -0
- qtype/docs/components/SecretManager.md +7 -0
- qtype/docs/components/SecretReference.md +7 -0
- qtype/docs/components/Source.md +5 -0
- qtype/docs/components/Step.md +8 -0
- qtype/docs/components/TelemetrySink.md +9 -0
- qtype/docs/components/Tool.md +9 -0
- qtype/docs/components/ToolList.md +5 -0
- qtype/docs/components/TypeList.md +5 -0
- qtype/docs/components/Variable.md +8 -0
- qtype/docs/components/VariableList.md +5 -0
- qtype/docs/components/VectorIndex.md +7 -0
- qtype/docs/components/VectorSearch.md +6 -0
- qtype/docs/components/VertexAuthProvider.md +9 -0
- qtype/docs/components/Writer.md +5 -0
- qtype/docs/example_ui.png +0 -0
- qtype/docs/index.md +81 -0
- qtype/docs/legacy_how_tos/.pages +6 -0
- qtype/docs/legacy_how_tos/Configuration/modular-yaml.md +366 -0
- qtype/docs/legacy_how_tos/Configuration/phoenix_projects.png +0 -0
- qtype/docs/legacy_how_tos/Configuration/phoenix_traces.png +0 -0
- qtype/docs/legacy_how_tos/Configuration/reference-by-id.md +251 -0
- qtype/docs/legacy_how_tos/Configuration/telemetry-setup.md +259 -0
- qtype/docs/legacy_how_tos/Data Types/custom-types.md +52 -0
- qtype/docs/legacy_how_tos/Data Types/domain-types.md +113 -0
- qtype/docs/legacy_how_tos/Debugging/visualize-apps.md +147 -0
- qtype/docs/legacy_how_tos/Tools/api-tools.md +29 -0
- qtype/docs/legacy_how_tos/Tools/python-tools.md +299 -0
- qtype/docs/skills/architect/SKILL.md +188 -0
- qtype/docs/skills/architect/references/cheatsheet.md +198 -0
- qtype/docs/skills/architect/references/patterns.md +29 -0
- qtype/docs/stylesheets/extra.css +27 -0
- qtype/dsl/custom_types.py +2 -1
- qtype/dsl/linker.py +23 -7
- qtype/dsl/loader.py +3 -3
- qtype/dsl/model.py +181 -67
- qtype/examples/authentication/aws_authentication.qtype.yaml +63 -0
- qtype/examples/conversational_ai/hello_world_chat.qtype.yaml +43 -0
- qtype/examples/conversational_ai/simple_chatbot.qtype.yaml +40 -0
- qtype/examples/data_processing/athena_query.qtype.yaml +56 -0
- qtype/examples/data_processing/batch_inputs.csv +5 -0
- qtype/examples/data_processing/batch_processing.qtype.yaml +54 -0
- qtype/examples/data_processing/cache_step_results.qtype.yaml +78 -0
- qtype/examples/data_processing/collect_results.qtype.yaml +55 -0
- qtype/examples/data_processing/create_sample_db.py +129 -0
- qtype/examples/data_processing/dataflow_pipelines.qtype.yaml +108 -0
- qtype/examples/data_processing/decode_json.qtype.yaml +23 -0
- qtype/examples/data_processing/explode_items.qtype.yaml +25 -0
- qtype/examples/data_processing/invoke_other_flows.qtype.yaml +98 -0
- qtype/examples/data_processing/read_file.qtype.yaml +60 -0
- qtype/examples/data_processing/reviews.db +0 -0
- qtype/examples/data_processing/sample_article.txt +1 -0
- qtype/examples/data_processing/sample_documents.jsonl +5 -0
- qtype/examples/invoke_models/create_embeddings.qtype.yaml +28 -0
- qtype/examples/invoke_models/simple_llm_call.qtype.yaml +32 -0
- qtype/examples/language_features/include_raw.qtype.yaml +27 -0
- qtype/examples/language_features/optional_variables.qtype.yaml +32 -0
- qtype/examples/language_features/story_prompt.txt +6 -0
- qtype/examples/language_features/ui_hints.qtype.yaml +52 -0
- qtype/examples/legacy/bedrock/data_analysis_with_telemetry.qtype.yaml +169 -0
- qtype/examples/legacy/bedrock/hello_world.qtype.yaml +39 -0
- qtype/examples/legacy/bedrock/hello_world_chat.qtype.yaml +37 -0
- qtype/examples/legacy/bedrock/hello_world_chat_with_telemetry.qtype.yaml +40 -0
- qtype/examples/legacy/bedrock/hello_world_chat_with_thinking.qtype.yaml +40 -0
- qtype/examples/legacy/bedrock/hello_world_completion.qtype.yaml +41 -0
- qtype/examples/legacy/bedrock/hello_world_completion_with_auth.qtype.yaml +44 -0
- qtype/examples/legacy/bedrock/simple_agent_chat.qtype.yaml +46 -0
- qtype/examples/legacy/chat_with_langfuse.qtype.yaml +50 -0
- qtype/examples/legacy/data/customers.csv +6 -0
- qtype/examples/legacy/data_processor.qtype.yaml +48 -0
- qtype/examples/legacy/echo/debug_example.qtype.yaml +59 -0
- qtype/examples/legacy/echo/prompt.qtype.yaml +22 -0
- qtype/examples/legacy/echo/readme.md +29 -0
- qtype/examples/legacy/echo/test.qtype.yaml +26 -0
- qtype/examples/legacy/echo/video.qtype.yaml +20 -0
- qtype/examples/legacy/field_extractor_example.qtype.yaml +137 -0
- qtype/examples/legacy/multi_flow_example.qtype.yaml +125 -0
- qtype/examples/legacy/openai/hello_world_chat.qtype.yaml +43 -0
- qtype/examples/legacy/openai/hello_world_chat_with_telemetry.qtype.yaml +46 -0
- qtype/examples/legacy/qtype_plugin_example.py +51 -0
- qtype/examples/legacy/rag.qtype.yaml +207 -0
- qtype/examples/legacy/sample_data.txt +43 -0
- qtype/examples/legacy/time_utilities.qtype.yaml +64 -0
- qtype/examples/legacy/vertex/README.md +11 -0
- qtype/examples/legacy/vertex/hello_world_chat.qtype.yaml +36 -0
- qtype/examples/legacy/vertex/hello_world_completion.qtype.yaml +40 -0
- qtype/examples/legacy/vertex/hello_world_completion_with_auth.qtype.yaml +45 -0
- qtype/examples/observability_debugging/trace_with_opentelemetry.qtype.yaml +40 -0
- qtype/examples/research_assistant/research_assistant.qtype.yaml +94 -0
- qtype/examples/research_assistant/tavily.oas.yaml +722 -0
- qtype/examples/research_assistant/tavily.qtype.yaml +216 -0
- qtype/examples/tutorials/01_hello_world.qtype.yaml +48 -0
- qtype/examples/tutorials/02_conversational_chat.qtype.yaml +37 -0
- qtype/examples/tutorials/03_structured_data.qtype.yaml +130 -0
- qtype/examples/tutorials/04_tools_and_function_calling.qtype.yaml +89 -0
- qtype/interpreter/api.py +4 -1
- qtype/interpreter/base/base_step_executor.py +3 -1
- qtype/interpreter/base/stream_emitter.py +19 -13
- qtype/interpreter/conversions.py +7 -3
- qtype/interpreter/converters.py +142 -26
- qtype/interpreter/executors/agent_executor.py +2 -3
- qtype/interpreter/executors/aggregate_executor.py +3 -4
- qtype/interpreter/executors/construct_executor.py +15 -15
- qtype/interpreter/executors/doc_to_text_executor.py +1 -3
- qtype/interpreter/executors/field_extractor_executor.py +13 -12
- qtype/interpreter/executors/file_source_executor.py +21 -34
- qtype/interpreter/executors/file_writer_executor.py +4 -4
- qtype/interpreter/executors/index_upsert_executor.py +1 -1
- qtype/interpreter/executors/invoke_embedding_executor.py +1 -4
- qtype/interpreter/executors/invoke_flow_executor.py +2 -2
- qtype/interpreter/executors/invoke_tool_executor.py +19 -18
- qtype/interpreter/executors/llm_inference_executor.py +16 -18
- qtype/interpreter/executors/prompt_template_executor.py +1 -3
- qtype/interpreter/executors/sql_source_executor.py +1 -1
- qtype/interpreter/resource_cache.py +3 -1
- qtype/interpreter/rich_progress.py +6 -3
- qtype/interpreter/stream/chat/converter.py +25 -17
- qtype/interpreter/stream/chat/ui_request_to_domain_type.py +2 -2
- qtype/interpreter/tools/function_tool_helper.py +11 -10
- qtype/interpreter/types.py +89 -4
- qtype/interpreter/typing.py +35 -38
- qtype/mcp/__init__.py +0 -0
- qtype/mcp/server.py +722 -0
- qtype/schema/qtype.schema.json +4016 -0
- qtype/semantic/checker.py +20 -1
- qtype/semantic/generate.py +6 -9
- qtype/semantic/model.py +26 -33
- qtype/semantic/resolver.py +7 -0
- qtype/semantic/visualize.py +45 -53
- {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/METADATA +65 -44
- qtype-0.1.13.dist-info/RECORD +352 -0
- {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/WHEEL +1 -2
- qtype/application/facade.py +0 -177
- qtype-0.1.11.dist-info/RECORD +0 -142
- qtype-0.1.11.dist-info/top_level.txt +0 -1
- {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/entry_points.txt +0 -0
- {qtype-0.1.11.dist-info → qtype-0.1.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
openapi: 3.0.1
|
|
2
|
+
info:
|
|
3
|
+
title: Tavily API
|
|
4
|
+
description: |
|
|
5
|
+
Tavily API provides powerful web search, content extraction, and crawling capabilities
|
|
6
|
+
designed specifically for LLMs and RAG applications. Get real-time, accurate search
|
|
7
|
+
results tailored for AI applications.
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
contact:
|
|
10
|
+
name: Tavily AI
|
|
11
|
+
url: https://tavily.com
|
|
12
|
+
license:
|
|
13
|
+
name: MIT
|
|
14
|
+
url: https://opensource.org/licenses/MIT
|
|
15
|
+
|
|
16
|
+
servers:
|
|
17
|
+
- url: https://api.tavily.com
|
|
18
|
+
description: Production server
|
|
19
|
+
|
|
20
|
+
security:
|
|
21
|
+
- bearerAuth: []
|
|
22
|
+
|
|
23
|
+
paths:
|
|
24
|
+
/search:
|
|
25
|
+
post:
|
|
26
|
+
summary: Search the web
|
|
27
|
+
description: |
|
|
28
|
+
Perform a web search with various filtering and customization options.
|
|
29
|
+
Returns search results with content, URLs, scores, and optional answers.
|
|
30
|
+
operationId: search
|
|
31
|
+
requestBody:
|
|
32
|
+
required: true
|
|
33
|
+
content:
|
|
34
|
+
application/json:
|
|
35
|
+
schema:
|
|
36
|
+
$ref: '#/components/schemas/SearchRequest'
|
|
37
|
+
examples:
|
|
38
|
+
basic_search:
|
|
39
|
+
summary: Basic search
|
|
40
|
+
value:
|
|
41
|
+
query: "What is artificial intelligence?"
|
|
42
|
+
advanced_search:
|
|
43
|
+
summary: Advanced search with filters
|
|
44
|
+
value:
|
|
45
|
+
query: "latest AI developments"
|
|
46
|
+
search_depth: "advanced"
|
|
47
|
+
topic: "news"
|
|
48
|
+
max_results: 10
|
|
49
|
+
include_answer: true
|
|
50
|
+
include_images: true
|
|
51
|
+
responses:
|
|
52
|
+
'200':
|
|
53
|
+
description: Successful search response
|
|
54
|
+
content:
|
|
55
|
+
application/json:
|
|
56
|
+
schema:
|
|
57
|
+
$ref: '#/components/schemas/SearchResponse'
|
|
58
|
+
examples:
|
|
59
|
+
search_result:
|
|
60
|
+
summary: Example search result
|
|
61
|
+
value:
|
|
62
|
+
query: "What is Tavily?"
|
|
63
|
+
follow_up_questions: null
|
|
64
|
+
answer: "Tavily is a search API designed for LLMs and RAG applications."
|
|
65
|
+
images: []
|
|
66
|
+
results:
|
|
67
|
+
- title: "Tavily"
|
|
68
|
+
url: "https://tavily.com"
|
|
69
|
+
content: "Connect Your LLM to the Web Empowering your AI applications with real-time, accurate search results tailored for LLMs and RAG."
|
|
70
|
+
score: 0.99
|
|
71
|
+
raw_content: null
|
|
72
|
+
response_time: 1.5
|
|
73
|
+
'400':
|
|
74
|
+
$ref: '#/components/responses/BadRequest'
|
|
75
|
+
'401':
|
|
76
|
+
$ref: '#/components/responses/Unauthorized'
|
|
77
|
+
'403':
|
|
78
|
+
$ref: '#/components/responses/Forbidden'
|
|
79
|
+
'429':
|
|
80
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
81
|
+
'504':
|
|
82
|
+
$ref: '#/components/responses/Timeout'
|
|
83
|
+
|
|
84
|
+
/extract:
|
|
85
|
+
post:
|
|
86
|
+
summary: Extract content from URLs
|
|
87
|
+
description: |
|
|
88
|
+
Extract and process content from one or more URLs with various formatting options.
|
|
89
|
+
Returns extracted content in text or markdown format.
|
|
90
|
+
operationId: extract
|
|
91
|
+
requestBody:
|
|
92
|
+
required: true
|
|
93
|
+
content:
|
|
94
|
+
application/json:
|
|
95
|
+
schema:
|
|
96
|
+
$ref: '#/components/schemas/ExtractRequest'
|
|
97
|
+
examples:
|
|
98
|
+
single_url:
|
|
99
|
+
summary: Extract from single URL
|
|
100
|
+
value:
|
|
101
|
+
urls: "https://example.com/article"
|
|
102
|
+
format: "markdown"
|
|
103
|
+
multiple_urls:
|
|
104
|
+
summary: Extract from multiple URLs
|
|
105
|
+
value:
|
|
106
|
+
urls:
|
|
107
|
+
- "https://example.com/article1"
|
|
108
|
+
- "https://example.com/article2"
|
|
109
|
+
extract_depth: "advanced"
|
|
110
|
+
include_images: true
|
|
111
|
+
responses:
|
|
112
|
+
'200':
|
|
113
|
+
description: Successful extraction response
|
|
114
|
+
content:
|
|
115
|
+
application/json:
|
|
116
|
+
schema:
|
|
117
|
+
$ref: '#/components/schemas/ExtractResponse'
|
|
118
|
+
'400':
|
|
119
|
+
$ref: '#/components/responses/BadRequest'
|
|
120
|
+
'401':
|
|
121
|
+
$ref: '#/components/responses/Unauthorized'
|
|
122
|
+
'403':
|
|
123
|
+
$ref: '#/components/responses/Forbidden'
|
|
124
|
+
'429':
|
|
125
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
126
|
+
'504':
|
|
127
|
+
$ref: '#/components/responses/Timeout'
|
|
128
|
+
|
|
129
|
+
/crawl:
|
|
130
|
+
post:
|
|
131
|
+
summary: Crawl websites
|
|
132
|
+
description: |
|
|
133
|
+
Crawl a website starting from a given URL with depth and breadth controls.
|
|
134
|
+
Extract content from discovered pages with various filtering options.
|
|
135
|
+
operationId: crawl
|
|
136
|
+
requestBody:
|
|
137
|
+
required: true
|
|
138
|
+
content:
|
|
139
|
+
application/json:
|
|
140
|
+
schema:
|
|
141
|
+
$ref: '#/components/schemas/CrawlRequest'
|
|
142
|
+
examples:
|
|
143
|
+
basic_crawl:
|
|
144
|
+
summary: Basic website crawl
|
|
145
|
+
value:
|
|
146
|
+
url: "https://example.com"
|
|
147
|
+
max_depth: 2
|
|
148
|
+
max_breadth: 5
|
|
149
|
+
advanced_crawl:
|
|
150
|
+
summary: Advanced crawl with filters
|
|
151
|
+
value:
|
|
152
|
+
url: "https://example.com"
|
|
153
|
+
max_depth: 3
|
|
154
|
+
max_breadth: 10
|
|
155
|
+
limit: 50
|
|
156
|
+
include_domains: ["example.com"]
|
|
157
|
+
exclude_paths: ["/admin", "/private"]
|
|
158
|
+
format: "markdown"
|
|
159
|
+
responses:
|
|
160
|
+
'200':
|
|
161
|
+
description: Successful crawl response
|
|
162
|
+
content:
|
|
163
|
+
application/json:
|
|
164
|
+
schema:
|
|
165
|
+
$ref: '#/components/schemas/CrawlResponse'
|
|
166
|
+
'400':
|
|
167
|
+
$ref: '#/components/responses/BadRequest'
|
|
168
|
+
'401':
|
|
169
|
+
$ref: '#/components/responses/Unauthorized'
|
|
170
|
+
'403':
|
|
171
|
+
$ref: '#/components/responses/Forbidden'
|
|
172
|
+
'429':
|
|
173
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
174
|
+
'504':
|
|
175
|
+
$ref: '#/components/responses/Timeout'
|
|
176
|
+
|
|
177
|
+
/map:
|
|
178
|
+
post:
|
|
179
|
+
summary: Map website structure
|
|
180
|
+
description: |
|
|
181
|
+
Map the structure and links of a website starting from a given URL.
|
|
182
|
+
Discover the website's architecture and page hierarchy.
|
|
183
|
+
operationId: map
|
|
184
|
+
requestBody:
|
|
185
|
+
required: true
|
|
186
|
+
content:
|
|
187
|
+
application/json:
|
|
188
|
+
schema:
|
|
189
|
+
$ref: '#/components/schemas/MapRequest'
|
|
190
|
+
examples:
|
|
191
|
+
basic_map:
|
|
192
|
+
summary: Basic website mapping
|
|
193
|
+
value:
|
|
194
|
+
url: "https://example.com"
|
|
195
|
+
max_depth: 2
|
|
196
|
+
filtered_map:
|
|
197
|
+
summary: Map with domain filtering
|
|
198
|
+
value:
|
|
199
|
+
url: "https://example.com"
|
|
200
|
+
max_depth: 3
|
|
201
|
+
select_domains: ["example.com"]
|
|
202
|
+
exclude_paths: ["/admin"]
|
|
203
|
+
responses:
|
|
204
|
+
'200':
|
|
205
|
+
description: Successful mapping response
|
|
206
|
+
content:
|
|
207
|
+
application/json:
|
|
208
|
+
schema:
|
|
209
|
+
$ref: '#/components/schemas/MapResponse'
|
|
210
|
+
'400':
|
|
211
|
+
$ref: '#/components/responses/BadRequest'
|
|
212
|
+
'401':
|
|
213
|
+
$ref: '#/components/responses/Unauthorized'
|
|
214
|
+
'403':
|
|
215
|
+
$ref: '#/components/responses/Forbidden'
|
|
216
|
+
'429':
|
|
217
|
+
$ref: '#/components/responses/TooManyRequests'
|
|
218
|
+
'504':
|
|
219
|
+
$ref: '#/components/responses/Timeout'
|
|
220
|
+
|
|
221
|
+
components:
|
|
222
|
+
securitySchemes:
|
|
223
|
+
bearerAuth:
|
|
224
|
+
type: http
|
|
225
|
+
scheme: bearer
|
|
226
|
+
description: API key for authentication. Use your Tavily API key as the bearer token.
|
|
227
|
+
|
|
228
|
+
schemas:
|
|
229
|
+
SearchRequest:
|
|
230
|
+
type: object
|
|
231
|
+
required:
|
|
232
|
+
- query
|
|
233
|
+
properties:
|
|
234
|
+
query:
|
|
235
|
+
type: string
|
|
236
|
+
description: The search query string
|
|
237
|
+
example: "artificial intelligence latest developments"
|
|
238
|
+
search_depth:
|
|
239
|
+
type: string
|
|
240
|
+
enum: ["basic", "advanced"]
|
|
241
|
+
description: Search depth level
|
|
242
|
+
default: "basic"
|
|
243
|
+
topic:
|
|
244
|
+
type: string
|
|
245
|
+
enum: ["general", "news", "finance"]
|
|
246
|
+
description: Search topic category
|
|
247
|
+
default: "general"
|
|
248
|
+
time_range:
|
|
249
|
+
type: string
|
|
250
|
+
enum: ["day", "week", "month", "year"]
|
|
251
|
+
description: Time range for search results
|
|
252
|
+
start_date:
|
|
253
|
+
type: string
|
|
254
|
+
format: date
|
|
255
|
+
description: Start date for search results (YYYY-MM-DD)
|
|
256
|
+
end_date:
|
|
257
|
+
type: string
|
|
258
|
+
format: date
|
|
259
|
+
description: End date for search results (YYYY-MM-DD)
|
|
260
|
+
days:
|
|
261
|
+
type: integer
|
|
262
|
+
minimum: 1
|
|
263
|
+
description: Number of days back to search
|
|
264
|
+
example: 7
|
|
265
|
+
max_results:
|
|
266
|
+
type: integer
|
|
267
|
+
minimum: 1
|
|
268
|
+
maximum: 100
|
|
269
|
+
description: Maximum number of search results to return
|
|
270
|
+
default: 5
|
|
271
|
+
include_domains:
|
|
272
|
+
type: array
|
|
273
|
+
items:
|
|
274
|
+
type: string
|
|
275
|
+
description: List of domains to include in search
|
|
276
|
+
example: ["tavily.com", "openai.com"]
|
|
277
|
+
exclude_domains:
|
|
278
|
+
type: array
|
|
279
|
+
items:
|
|
280
|
+
type: string
|
|
281
|
+
description: List of domains to exclude from search
|
|
282
|
+
example: ["spam.com", "ads.com"]
|
|
283
|
+
include_answer:
|
|
284
|
+
oneOf:
|
|
285
|
+
- type: boolean
|
|
286
|
+
- type: string
|
|
287
|
+
enum: ["basic", "advanced"]
|
|
288
|
+
description: Whether to include an AI-generated answer
|
|
289
|
+
default: false
|
|
290
|
+
include_raw_content:
|
|
291
|
+
oneOf:
|
|
292
|
+
- type: boolean
|
|
293
|
+
- type: string
|
|
294
|
+
enum: ["markdown", "text"]
|
|
295
|
+
description: Whether to include raw content
|
|
296
|
+
default: false
|
|
297
|
+
include_images:
|
|
298
|
+
type: boolean
|
|
299
|
+
description: Whether to include images in results
|
|
300
|
+
default: false
|
|
301
|
+
country:
|
|
302
|
+
type: string
|
|
303
|
+
description: Country code for localized search
|
|
304
|
+
example: "US"
|
|
305
|
+
auto_parameters:
|
|
306
|
+
type: boolean
|
|
307
|
+
description: Whether to automatically determine search parameters
|
|
308
|
+
default: false
|
|
309
|
+
include_favicon:
|
|
310
|
+
type: boolean
|
|
311
|
+
description: Whether to include favicon URLs
|
|
312
|
+
default: false
|
|
313
|
+
|
|
314
|
+
SearchResponse:
|
|
315
|
+
type: object
|
|
316
|
+
properties:
|
|
317
|
+
query:
|
|
318
|
+
type: string
|
|
319
|
+
description: The original search query
|
|
320
|
+
follow_up_questions:
|
|
321
|
+
type: array
|
|
322
|
+
items:
|
|
323
|
+
type: string
|
|
324
|
+
nullable: true
|
|
325
|
+
description: Suggested follow-up questions
|
|
326
|
+
answer:
|
|
327
|
+
type: string
|
|
328
|
+
nullable: true
|
|
329
|
+
description: AI-generated answer to the query
|
|
330
|
+
images:
|
|
331
|
+
type: array
|
|
332
|
+
items:
|
|
333
|
+
$ref: '#/components/schemas/ImageResult'
|
|
334
|
+
description: Image search results
|
|
335
|
+
results:
|
|
336
|
+
type: array
|
|
337
|
+
items:
|
|
338
|
+
$ref: '#/components/schemas/SearchResult'
|
|
339
|
+
description: Web search results
|
|
340
|
+
response_time:
|
|
341
|
+
type: number
|
|
342
|
+
description: Response time in seconds
|
|
343
|
+
|
|
344
|
+
ExtractRequest:
|
|
345
|
+
type: object
|
|
346
|
+
required:
|
|
347
|
+
- urls
|
|
348
|
+
properties:
|
|
349
|
+
urls:
|
|
350
|
+
type: array
|
|
351
|
+
items:
|
|
352
|
+
type: string
|
|
353
|
+
description: List of URLs to extract content from
|
|
354
|
+
example: ["https://example.com/article1", "https://example.com/article2"]
|
|
355
|
+
include_images:
|
|
356
|
+
type: boolean
|
|
357
|
+
description: Whether to include images
|
|
358
|
+
default: false
|
|
359
|
+
extract_depth:
|
|
360
|
+
type: string
|
|
361
|
+
enum: ["basic", "advanced"]
|
|
362
|
+
description: Extraction depth level
|
|
363
|
+
default: "basic"
|
|
364
|
+
format:
|
|
365
|
+
type: string
|
|
366
|
+
enum: ["markdown", "text"]
|
|
367
|
+
description: Output format for extracted content
|
|
368
|
+
default: "text"
|
|
369
|
+
include_favicon:
|
|
370
|
+
type: boolean
|
|
371
|
+
description: Whether to include favicon URLs
|
|
372
|
+
default: false
|
|
373
|
+
|
|
374
|
+
ExtractResponse:
|
|
375
|
+
type: object
|
|
376
|
+
properties:
|
|
377
|
+
results:
|
|
378
|
+
type: array
|
|
379
|
+
items:
|
|
380
|
+
$ref: '#/components/schemas/ExtractResult'
|
|
381
|
+
description: Successfully extracted content
|
|
382
|
+
failed_results:
|
|
383
|
+
type: array
|
|
384
|
+
items:
|
|
385
|
+
$ref: '#/components/schemas/FailedResult'
|
|
386
|
+
description: URLs that failed to extract
|
|
387
|
+
|
|
388
|
+
CrawlRequest:
|
|
389
|
+
type: object
|
|
390
|
+
required:
|
|
391
|
+
- url
|
|
392
|
+
properties:
|
|
393
|
+
url:
|
|
394
|
+
type: string
|
|
395
|
+
format: uri
|
|
396
|
+
description: Starting URL for the crawl
|
|
397
|
+
example: "https://example.com"
|
|
398
|
+
max_depth:
|
|
399
|
+
type: integer
|
|
400
|
+
minimum: 1
|
|
401
|
+
description: Maximum crawl depth
|
|
402
|
+
default: 3
|
|
403
|
+
max_breadth:
|
|
404
|
+
type: integer
|
|
405
|
+
minimum: 1
|
|
406
|
+
description: Maximum number of links to follow per page
|
|
407
|
+
default: 10
|
|
408
|
+
limit:
|
|
409
|
+
type: integer
|
|
410
|
+
minimum: 1
|
|
411
|
+
description: Maximum number of pages to crawl
|
|
412
|
+
instructions:
|
|
413
|
+
type: string
|
|
414
|
+
description: Instructions for the crawler
|
|
415
|
+
select_paths:
|
|
416
|
+
type: array
|
|
417
|
+
items:
|
|
418
|
+
type: string
|
|
419
|
+
description: List of path patterns to include
|
|
420
|
+
select_domains:
|
|
421
|
+
type: array
|
|
422
|
+
items:
|
|
423
|
+
type: string
|
|
424
|
+
description: List of domains to include
|
|
425
|
+
exclude_paths:
|
|
426
|
+
type: array
|
|
427
|
+
items:
|
|
428
|
+
type: string
|
|
429
|
+
description: List of path patterns to exclude
|
|
430
|
+
exclude_domains:
|
|
431
|
+
type: array
|
|
432
|
+
items:
|
|
433
|
+
type: string
|
|
434
|
+
description: List of domains to exclude
|
|
435
|
+
allow_external:
|
|
436
|
+
type: boolean
|
|
437
|
+
description: Whether to allow crawling external domains
|
|
438
|
+
default: false
|
|
439
|
+
include_images:
|
|
440
|
+
type: boolean
|
|
441
|
+
description: Whether to include images
|
|
442
|
+
default: false
|
|
443
|
+
extract_depth:
|
|
444
|
+
type: string
|
|
445
|
+
enum: ["basic", "advanced"]
|
|
446
|
+
description: Content extraction depth
|
|
447
|
+
default: "basic"
|
|
448
|
+
format:
|
|
449
|
+
type: string
|
|
450
|
+
enum: ["markdown", "text"]
|
|
451
|
+
description: Output format for content
|
|
452
|
+
default: "text"
|
|
453
|
+
include_favicon:
|
|
454
|
+
type: boolean
|
|
455
|
+
description: Whether to include favicon URLs
|
|
456
|
+
default: false
|
|
457
|
+
|
|
458
|
+
CrawlResponse:
|
|
459
|
+
type: object
|
|
460
|
+
properties:
|
|
461
|
+
results:
|
|
462
|
+
type: array
|
|
463
|
+
items:
|
|
464
|
+
$ref: '#/components/schemas/CrawlResult'
|
|
465
|
+
description: Crawled pages and their content
|
|
466
|
+
|
|
467
|
+
MapRequest:
|
|
468
|
+
type: object
|
|
469
|
+
required:
|
|
470
|
+
- url
|
|
471
|
+
properties:
|
|
472
|
+
url:
|
|
473
|
+
type: string
|
|
474
|
+
format: uri
|
|
475
|
+
description: Starting URL for mapping
|
|
476
|
+
example: "https://example.com"
|
|
477
|
+
max_depth:
|
|
478
|
+
type: integer
|
|
479
|
+
minimum: 1
|
|
480
|
+
description: Maximum mapping depth
|
|
481
|
+
default: 3
|
|
482
|
+
max_breadth:
|
|
483
|
+
type: integer
|
|
484
|
+
minimum: 1
|
|
485
|
+
description: Maximum number of links to map per page
|
|
486
|
+
default: 10
|
|
487
|
+
limit:
|
|
488
|
+
type: integer
|
|
489
|
+
minimum: 1
|
|
490
|
+
description: Maximum number of pages to map
|
|
491
|
+
instructions:
|
|
492
|
+
type: string
|
|
493
|
+
description: Instructions for the mapper
|
|
494
|
+
select_paths:
|
|
495
|
+
type: array
|
|
496
|
+
items:
|
|
497
|
+
type: string
|
|
498
|
+
description: List of path patterns to include
|
|
499
|
+
select_domains:
|
|
500
|
+
type: array
|
|
501
|
+
items:
|
|
502
|
+
type: string
|
|
503
|
+
description: List of domains to include
|
|
504
|
+
exclude_paths:
|
|
505
|
+
type: array
|
|
506
|
+
items:
|
|
507
|
+
type: string
|
|
508
|
+
description: List of path patterns to exclude
|
|
509
|
+
exclude_domains:
|
|
510
|
+
type: array
|
|
511
|
+
items:
|
|
512
|
+
type: string
|
|
513
|
+
description: List of domains to exclude
|
|
514
|
+
allow_external:
|
|
515
|
+
type: boolean
|
|
516
|
+
description: Whether to allow mapping external domains
|
|
517
|
+
default: false
|
|
518
|
+
include_images:
|
|
519
|
+
type: boolean
|
|
520
|
+
description: Whether to include images in mapping
|
|
521
|
+
default: false
|
|
522
|
+
|
|
523
|
+
MapResponse:
|
|
524
|
+
type: object
|
|
525
|
+
properties:
|
|
526
|
+
results:
|
|
527
|
+
type: array
|
|
528
|
+
items:
|
|
529
|
+
$ref: '#/components/schemas/MapResult'
|
|
530
|
+
description: Mapped website structure
|
|
531
|
+
|
|
532
|
+
SearchResult:
|
|
533
|
+
type: object
|
|
534
|
+
properties:
|
|
535
|
+
title:
|
|
536
|
+
type: string
|
|
537
|
+
description: Title of the search result
|
|
538
|
+
url:
|
|
539
|
+
type: string
|
|
540
|
+
format: uri
|
|
541
|
+
description: URL of the search result
|
|
542
|
+
content:
|
|
543
|
+
type: string
|
|
544
|
+
description: Extracted content from the page
|
|
545
|
+
score:
|
|
546
|
+
type: number
|
|
547
|
+
format: float
|
|
548
|
+
minimum: 0
|
|
549
|
+
maximum: 1
|
|
550
|
+
description: Relevance score for the result
|
|
551
|
+
raw_content:
|
|
552
|
+
type: string
|
|
553
|
+
nullable: true
|
|
554
|
+
description: Raw content if requested
|
|
555
|
+
favicon:
|
|
556
|
+
type: string
|
|
557
|
+
nullable: true
|
|
558
|
+
description: Favicon URL if requested
|
|
559
|
+
|
|
560
|
+
ExtractResult:
|
|
561
|
+
type: object
|
|
562
|
+
properties:
|
|
563
|
+
url:
|
|
564
|
+
type: string
|
|
565
|
+
format: uri
|
|
566
|
+
description: URL that was extracted
|
|
567
|
+
content:
|
|
568
|
+
type: string
|
|
569
|
+
description: Extracted content
|
|
570
|
+
title:
|
|
571
|
+
type: string
|
|
572
|
+
description: Page title
|
|
573
|
+
favicon:
|
|
574
|
+
type: string
|
|
575
|
+
nullable: true
|
|
576
|
+
description: Favicon URL if requested
|
|
577
|
+
|
|
578
|
+
CrawlResult:
|
|
579
|
+
type: object
|
|
580
|
+
properties:
|
|
581
|
+
url:
|
|
582
|
+
type: string
|
|
583
|
+
format: uri
|
|
584
|
+
description: URL of the crawled page
|
|
585
|
+
content:
|
|
586
|
+
type: string
|
|
587
|
+
description: Extracted content from the page
|
|
588
|
+
title:
|
|
589
|
+
type: string
|
|
590
|
+
description: Page title
|
|
591
|
+
links:
|
|
592
|
+
type: array
|
|
593
|
+
items:
|
|
594
|
+
type: string
|
|
595
|
+
description: Links found on the page
|
|
596
|
+
favicon:
|
|
597
|
+
type: string
|
|
598
|
+
nullable: true
|
|
599
|
+
description: Favicon URL if requested
|
|
600
|
+
|
|
601
|
+
MapResult:
|
|
602
|
+
type: object
|
|
603
|
+
properties:
|
|
604
|
+
url:
|
|
605
|
+
type: string
|
|
606
|
+
format: uri
|
|
607
|
+
description: URL of the mapped page
|
|
608
|
+
title:
|
|
609
|
+
type: string
|
|
610
|
+
description: Page title
|
|
611
|
+
links:
|
|
612
|
+
type: array
|
|
613
|
+
items:
|
|
614
|
+
type: string
|
|
615
|
+
description: Links found on the page
|
|
616
|
+
depth:
|
|
617
|
+
type: integer
|
|
618
|
+
description: Depth level of this page in the mapping
|
|
619
|
+
|
|
620
|
+
ImageResult:
|
|
621
|
+
type: object
|
|
622
|
+
properties:
|
|
623
|
+
url:
|
|
624
|
+
type: string
|
|
625
|
+
format: uri
|
|
626
|
+
description: URL of the image
|
|
627
|
+
alt_text:
|
|
628
|
+
type: string
|
|
629
|
+
description: Alt text of the image
|
|
630
|
+
title:
|
|
631
|
+
type: string
|
|
632
|
+
description: Title of the image
|
|
633
|
+
|
|
634
|
+
FailedResult:
|
|
635
|
+
type: object
|
|
636
|
+
properties:
|
|
637
|
+
url:
|
|
638
|
+
type: string
|
|
639
|
+
format: uri
|
|
640
|
+
description: URL that failed to process
|
|
641
|
+
error:
|
|
642
|
+
type: string
|
|
643
|
+
description: Error message describing the failure
|
|
644
|
+
|
|
645
|
+
ErrorResponse:
|
|
646
|
+
type: object
|
|
647
|
+
properties:
|
|
648
|
+
detail:
|
|
649
|
+
type: object
|
|
650
|
+
properties:
|
|
651
|
+
error:
|
|
652
|
+
type: string
|
|
653
|
+
description: Error message
|
|
654
|
+
message:
|
|
655
|
+
type: string
|
|
656
|
+
description: Human-readable error message
|
|
657
|
+
|
|
658
|
+
responses:
|
|
659
|
+
BadRequest:
|
|
660
|
+
description: Bad Request - Invalid parameters
|
|
661
|
+
content:
|
|
662
|
+
application/json:
|
|
663
|
+
schema:
|
|
664
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
665
|
+
example:
|
|
666
|
+
detail:
|
|
667
|
+
error: "Invalid query parameter"
|
|
668
|
+
message: "The request contains invalid parameters"
|
|
669
|
+
|
|
670
|
+
Unauthorized:
|
|
671
|
+
description: Unauthorized - Invalid API key
|
|
672
|
+
content:
|
|
673
|
+
application/json:
|
|
674
|
+
schema:
|
|
675
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
676
|
+
example:
|
|
677
|
+
detail:
|
|
678
|
+
error: "Invalid API key"
|
|
679
|
+
message: "Authentication failed"
|
|
680
|
+
|
|
681
|
+
Forbidden:
|
|
682
|
+
description: Forbidden - Access denied or rate limited
|
|
683
|
+
content:
|
|
684
|
+
application/json:
|
|
685
|
+
schema:
|
|
686
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
687
|
+
example:
|
|
688
|
+
detail:
|
|
689
|
+
error: "Access denied"
|
|
690
|
+
message: "Insufficient permissions"
|
|
691
|
+
|
|
692
|
+
TooManyRequests:
|
|
693
|
+
description: Too Many Requests - Usage limit exceeded
|
|
694
|
+
content:
|
|
695
|
+
application/json:
|
|
696
|
+
schema:
|
|
697
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
698
|
+
example:
|
|
699
|
+
detail:
|
|
700
|
+
error: "Usage limit exceeded"
|
|
701
|
+
message: "API rate limit exceeded"
|
|
702
|
+
|
|
703
|
+
Timeout:
|
|
704
|
+
description: Gateway Timeout - Request timed out
|
|
705
|
+
content:
|
|
706
|
+
application/json:
|
|
707
|
+
schema:
|
|
708
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
709
|
+
example:
|
|
710
|
+
detail:
|
|
711
|
+
error: "Request timeout"
|
|
712
|
+
message: "The request took too long to complete"
|
|
713
|
+
|
|
714
|
+
tags:
|
|
715
|
+
- name: search
|
|
716
|
+
description: Web search operations
|
|
717
|
+
- name: extract
|
|
718
|
+
description: Content extraction operations
|
|
719
|
+
- name: crawl
|
|
720
|
+
description: Website crawling operations
|
|
721
|
+
- name: map
|
|
722
|
+
description: Website mapping operations
|