{"uid":"cap_iYh3WmF8dn9w0wm5vs6NG","slug":"bitcoin-network-difficulty-chart-api-6efe20fd","name":"Bitcoin Network Difficulty Chart API","description":"Paid AI-agent access to Blockchain.com Explorer API","url":"https://api.blockchain.info/explorer-gateway-kt/x402/charts/difficulty?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cors":{"type":"boolean","default":false,"description":"Enable CORS headers"},"format":{"enum":["json","csv"],"type":"string","default":"json","description":"Response format:\n- `json` — Returns structured JSON with metadata and values\n- `csv` — Returns raw CSV data with timestamp and value columns (no metadata)\n"},"sampled":{"type":"boolean","default":true,"description":"Apply sampling to reduce data points"},"metadata":{"type":"boolean","default":false,"description":"Include metadata in response"},"timespan":{"type":"string","default":"1y","example":"1y","description":"Time period (e.g., \"24h\", \"7d\", \"1y\", \"3y\")"},"rollingAverage":{"type":"string","default":"8h","example":"8h","description":"Rolling average window (e.g., \"8h\", \"24h\")"}}},"responseSchema":{"type":"json","format":"application/json","example":{"name":"Difficulty","unit":"difficulty","period":"day","status":"ok","values":[{"x":1704067200,"y":72000000000000},{"x":1704153600,"y":72100000000000}],"description":"The estimated difficulty of the bitcoin network"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2o1HfF6a0hfUO35_HJccR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns time-series chart data for Bitcoin network mining difficulty over a specified time period","exampleAgentPrompt":"Pull the Bitcoin network difficulty chart from Blockchain.com for the past year with an 8-hour rolling average so I can see how mining difficulty has trended.","exampleUseCases":[{"title":"Track Bitcoin difficulty for mining ROI","prompt":"Show me the Bitcoin network difficulty chart for the last 3 years with a 24-hour rolling average — I want to see how difficulty has changed to estimate mining profitability over time."},{"title":"Monitor weekly difficulty spike","prompt":"Grab the Bitcoin mining difficulty data for the past 7 days with an 8-hour rolling average from Blockchain.com, including metadata, so I can see if there was a sudden difficulty spike this week."},{"title":"Embed difficulty chart in dashboard","prompt":"Fetch the Bitcoin difficulty chart for the last 24 hours from Blockchain.com in a format I can render, with sampling enabled to reduce the number of data points."}],"resultDescription":"Returns a JSON object containing the chart name ('Difficulty'), unit ('difficulty'), time period granularity ('day'), status ('ok'), a human-readable description of the metric, and an array of {x: unix_timestamp, y: difficulty_value} data points representing the Bitcoin network's estimated mining difficulty over the requested timespan.","failureModes":["Invalid timespan format returns error or empty data","Unsupported chart format enum value causes validation failure","Payment not received (402) when x402 payment header is missing or insufficient","Rate limiting if too many requests are made in quick succession","Server-side data gaps may produce incomplete value arrays"],"whenToPreferThis":"Choose this endpoint when you need historical or recent Bitcoin network difficulty data in time-series form, especially when you want configurable timespans, rolling averages, and sampling for visualization. It is part of Blockchain.com's official explorer infrastructure, making it a reliable source for on-chain Bitcoin metrics. Prefer it over generic crypto APIs when you specifically need difficulty chart data with fine-grained time controls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T18:46:22.265Z","isFirstParty":false,"canonicalSlug":"bitcoin-network-difficulty-chart-api-6efe20fd"}