OpenGraph.io

Query API

Ask questions about any webpage and get structured, AI-powered answers. Define custom response formats to extract exactly the information you need.

Endpoint

HTTP
GET/POST https://opengraph.io/api/1.1/query/{encoded_url}?app_id=YOUR_APP_ID

Parameters

Path Parameters

ParameterTypeDescription
encoded_urlstringRequired. URL-encoded target URL

Query/Body Parameters

ParameterTypeDescription
app_idstringRequired. Your API key
querystringRequired. The question to ask about the page
responseStructureobjectOptional JSON schema for structured responses
modelSizestringAI model size: nano (default), mini, or standard
full_renderbooleanEnable JavaScript rendering (default: false)
cache_okbooleanAllow cached results (default: true)
use_proxybooleanUse standard proxy for protected sites
use_premiumbooleanUse residential proxy
use_superiorbooleanUse mobile proxy (highest success rate)

Example Requests

curl "https://opengraph.io/api/1.1/query/https%3A%2F%2Fexample.com?app_id=YOUR_APP_ID&query=What%20is%20this%20page%20about%3F"

Example Response

Response
{
  "answer": {
    "headline": "Welcome to Example",
    "products": [
      "Product A",
      "Product B",
      "Product C"
    ]
  },
  "requestInfo": {
    "host": "example.com",
    "responseCode": 200
  }
}

Tip: When using responseStructure, the AI will format its answer to match your schema, making it easy to parse programmatically.

Response Structure Examples

The responseStructure parameter lets you define exactly how you want the answer formatted:

Extract a list

List of strings
{
  "responseStructure": {
    "items": ["string"]
  }
}

Extract structured data

Complex structure
{
  "responseStructure": {
    "title": "string",
    "price": "number",
    "features": ["string"],
    "available": "boolean"
  }
}

Nested objects

Nested structure
{
  "responseStructure": {
    "company": {
      "name": "string",
      "founded": "number"
    },
    "products": [
      {
        "name": "string",
        "price": "number"
      }
    ]
  }
}

Use Cases

  • Extract specific information from documentation pages
  • Summarize long-form content
  • Parse product information from e-commerce sites
  • Extract contact information or addresses
  • Answer questions about page content for chatbots
  • Automated research and data collection

MCP Tool

This endpoint is available as the Query Site tool in the OpenGraph MCP Server. Your AI assistant can query page content directly without writing any code.

Get started with MCP in 2 minutes →

Learn more about MCP integration →

Related