openapi: 3.0.3 info: title: AgentQL Query Data API description: AgentQL connects LLMs and AI agents to the entire web through natural language queries, enabling structured data extraction from web pages, documents, and browser sessions. Generated from documentation. version: v1 x-generated-from: documentation servers: - url: https://api.agentql.com/v1 description: AgentQL Production API security: - ApiKeyAuth: [] tags: - name: Query Data description: Extract structured data from web pages using AgentQL queries paths: /query-data: post: operationId: queryWebPageData summary: AgentQL Query Web Page Data description: Extract structured JSON data from a web page using AgentQL query language or natural language prompt. Supports URL-based and raw HTML input with configurable browser behavior. tags: - Query Data requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/QueryDataRequest' examples: QueryDataRequest200Example: summary: Default queryWebPageData request x-microcks-default: true value: url: https://news.ycombinator.com query: '{ posts[] { title link score } }' params: mode: standard wait_for: 2000 responses: '200': description: Successful data extraction content: application/json: schema: $ref: '#/components/schemas/QueryDataResponse' examples: QueryWebPageData200Example: summary: Default queryWebPageData 200 response x-microcks-default: true value: data: posts: - title: 'Show HN: AgentQL connects AI agents to the web' link: https://news.ycombinator.com/item?id=500123 score: 142 metadata: request_id: req-a1b2c3d4 response_time_ms: 1847 '400': description: Bad request — invalid query or missing required parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '429': description: Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: ResponseMetadata: type: object description: Metadata about the API response. properties: request_id: type: string description: Unique identifier for this API request. example: req-a1b2c3d4 response_time_ms: type: integer description: Time taken to complete the request in milliseconds. example: 1847 QueryDataRequest: type: object description: Request body for querying data from a web page. properties: url: type: string format: uri description: The URL of the web page to query. example: https://news.ycombinator.com html: type: string description: Raw HTML content to query instead of a URL. example: