getOgQuery
Answer natural-language questions about any webpage content using AI. Optionally extract structured data by providing a JSON schema.
Instructions
Ask a natural-language question about the content of any URL and receive an AI-generated answer via the OpenGraph.io API. Optionally pass a responseStructure schema to extract structured data. Note: uses 100 API credits per request (or 200 with a large model). Query API remains on v1.1 until the billing path check is updated for v3.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the webpage to query. | |
| query | Yes | Natural-language question to answer about the page content. | |
| retry | No | Automatically retry failed requests. | |
| cache_ok | No | Use cached page results. Set to false to bypass cache. Defaults to true. | |
| modelSize | No | AI model size. 'small' uses 100 credits; 'large' uses 200 credits. Defaults to 'small'. | |
| use_proxy | No | Route the request through a standard proxy. | |
| accept_lang | No | Accept-Language header for the outbound request. Defaults to 'auto'. | |
| ai_sanitize | No | Scan the fetched content for prompt-injection attempts. | |
| auto_render | No | Automatically detect and switch to headless rendering for SPA pages. | |
| full_render | No | Fully render the page with JavaScript before querying. | |
| max_retries | No | Maximum number of retry attempts (1–4). Defaults to 4. | |
| use_premium | No | Route the request through a premium proxy. | |
| use_superior | No | Route the request through a superior-tier proxy. | |
| max_cache_age | No | Maximum cache age in milliseconds. Defaults to 432000000 (5 days). | |
| proxy_country | No | Two-letter ISO country code for geo-targeted proxy exit node. | |
| ai_sanitize_mode | No | 'sanitize' cleans the content, 'warn' returns a safety report, 'block' returns HTTP 422 when risk_score >= 0.7. | |
| responseStructure | No | Optional JSON schema describing the shape of the desired response. When provided, the model returns a structured JSON answer. | |
| wait_for_selector | No | CSS selector to wait for before querying. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| result | No | AI-generated answer. May be a string or structured object. | |
| question | Yes |