OpenGraph.io

API Credits

OpenGraph.io uses a credit-based system to meter API usage. Understanding how credits work helps you optimize costs and plan your integration effectively.

How Credits Work

Every API request consumes credits from your monthly allocation. The number of credits consumed depends on three factors:

  1. The endpoint you call — Different APIs have different base costs
  2. Features you enable — Options like proxies and JavaScript rendering add to the cost
  3. Cache status — Cached responses always cost just 1 credit

Credits reset at the beginning of each billing cycle. Unused credits do not roll over to the next month.

Credit Costs by Endpoint

Each API endpoint has a specific credit cost. Some endpoints have fixed pricing that does not change based on features like proxies or JavaScript rendering.

EndpointCostDescription
/site1 creditExtract OpenGraph metadata and link previews
/scrape1 creditFetch raw HTML content from a URL
/extract1 creditExtract specific HTML elements in structured format
/oembed10 creditsGenerate embeddable iframe content
/screenshot20 creditsCapture webpage screenshots (includes headless browser)
/query (nano)100 creditsAI-powered extraction with nano model (default)
/query (mini)200 creditsAI-powered extraction with mini model
/query (standard)100 creditsAI-powered extraction with standard model

Cache hits always cost 1 credit regardless of the endpoint or features that were used to generate the cached response.

Feature Credit Costs

Enabling features changes the credit cost of a request. Feature costs replace the base cost—they are not additive with the base.

FeatureParameterCostDescription
JavaScript Renderingfull_render=true10 creditsExecutes JavaScript in a headless browser before extracting data
Standard Proxyuse_proxy=true10 creditsRoutes through datacenter proxies for basic bot protection bypass
Residential Proxyuse_premium=true20 creditsRoutes through residential IP pools for Cloudflare, Akamai, etc.
Mobile Proxyuse_superior=true30 creditsRoutes through mobile carrier IPs for heavily protected sites

How costs combine: When using multiple features together (e.g., full_render + proxy), the costs are added. For example, full_render=true with use_proxy=true costs 20 credits total (10 + 10).

Query API Pricing

The Query API uses AI models to answer questions about webpages. The credit cost depends on the model size you select:

Model SizeParameterCostBest For
Nano (default)modelSize=nano100 creditsSimple extractions, lists, basic questions
MinimodelSize=mini200 creditsComplex extractions, structured data, summaries
StandardmodelSize=standard100 creditsAdvanced reasoning, nuanced analysis, long content

Fixed pricing: Query API costs are fixed regardless of other options. Using full_render or proxy options does not add additional credits to Query API requests.

Calculating Total Cost

The total credit cost depends on which features are enabled:

Credit Calculation
No features enabled: 1 credit (base cost)
Features enabled: Sum of feature costs
Cached response: 1 credit (always)

Example Calculations

RequestCalculationTotal
/site (no features)Base request1 credit
/site + full_render10 (full_render)10 credits
/site + use_proxy10 (proxy)10 credits
/site + use_premium20 (residential proxy)20 credits
/site + use_superior30 (mobile proxy)30 credits
/site + full_render + use_proxy10 + 1020 credits
/site + full_render + use_premium10 + 2030 credits
/site + full_render + use_superior10 + 3040 credits
/screenshot20 (screenshot base)20 credits
/oembed10 (oembed base)10 credits
/query (nano or standard)Fixed pricing100 credits
/query (mini)Fixed pricing200 credits
/query + use_premiumFixed (proxies don't add)100 credits
Any cached responseCache hit1 credit

Auto Proxy Credits

If you have Auto Proxy enabled (default on qualifying plans), the system automatically uses the appropriate proxy tier when needed. You're billed for the proxy tier that was actually used:

  • If the request succeeds without a proxy: 1 credit
  • If standard proxy was needed: 10 credits
  • If residential proxy was needed: 20 credits
  • If mobile proxy was needed: 30 credits

The response includes a proxyUsed field indicating which proxy tier was applied.

Retry Feature Credits

When using the retry=true feature, you're only charged for the successful attempt. Failed retry attempts do not consume additional credits.

Retry Response with Credit Info
{
  "hybridGraph": { ... },
  "retryInfo": {
    "attempts": 3,
    "successfulProxyLevel": "use_premium",
    "creditCost": 20,
    "attemptDetails": [
      { "attempt": 1, "proxyLevel": null, "success": false },
      { "attempt": 2, "proxyLevel": "use_proxy", "success": false },
      { "attempt": 3, "proxyLevel": "use_premium", "success": true }
    ]
  }
}

Retry billing: In the example above, only the successful attempt with use_premium is billed (20 credits). The failed attempts cost nothing.

Monthly Credit Allocations

Each plan includes a monthly credit allocation:

PlanMonthly CreditsOverage Rate
Free100Not available
Developer50,000$0.001 / credit
Production250,000$0.0008 / credit
Enterprise1,000,000+Custom

Overage charges are billed at the end of your billing cycle if you exceed your allocation. You can set spending limits in the dashboard to prevent unexpected charges.

Optimizing Credit Usage

Here are strategies to minimize credit consumption:

1. Leverage Caching

Cached responses cost just 1 credit. Use cache_ok=true (default) and set appropriate max_cache_age values:

Use cached data when acceptable
# Accept cached data up to 7 days old (604800 seconds)
curl "https://opengraph.io/api/1.1/site/https%3A%2F%2Fexample.com?app_id=YOUR_APP_ID&max_cache_age=604800"

2. Start Without Premium Features

Only use proxies and JavaScript rendering when needed. Start with basic requests and escalate only if you encounter issues:

  1. Try without any special options first (1 credit)
  2. If blocked, add use_proxy=true (10 credits)
  3. If still blocked, try use_premium=true (20 credits)
  4. As a last resort, use use_superior=true (30 credits)

3. Use the Right Model Size for Query API

Choose the appropriate model for your task. The mini model costs 2x more than nano/standard:

  • Nano (100 credits): Simple extractions, lists, basic questions (default)
  • Standard (100 credits): Advanced reasoning, nuanced analysis
  • Mini (200 credits): Complex extractions, structured data, summaries

4. Batch Similar Requests

If you need data from multiple pages on the same domain, consider whether you really need all of them, or if sampling would suffice.

5. Monitor Usage

Regularly check your credit consumption in the dashboard to identify optimization opportunities.

Tracking Credit Usage

You can monitor your credit usage in several ways:

  • Dashboard — Real-time usage charts and history
  • Response headers — Each response includes credit information
  • Email alerts — Configure notifications at usage thresholds

Response Headers

API responses include headers with credit information:

Credit-related Response Headers
X-Billing-Request: 20

Related