Quick Start
Step 1: Sign Up
Create an account at datablue.dev or register via the API:
curl -X POST "https://api.datablue.dev/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "secure_password", "name": "Your Name"}'
Step 2: Generate an API Key
Log into the Dashboard and navigate to API Keys. Click Create New Key to generate a persistent API key with the wh_ prefix.
Step 3: Make Your First Request
cURL
curl -X POST "https://api.datablue.dev/v1/scrape" \
-H "Authorization: Bearer wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://news.ycombinator.com",
"formats": ["markdown"]
}'
Python
import requests
response = requests.post(
"https://api.datablue.dev/v1/scrape",
headers={"Authorization": "Bearer wh_your_api_key"},
json={
"url": "https://news.ycombinator.com",
"formats": ["markdown"]
}
)
data = response.json()
print(data["data"]["markdown"][:200])
JavaScript
const response = await fetch("https://api.datablue.dev/v1/scrape", {
method: "POST",
headers: {
"Authorization": "Bearer wh_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://news.ycombinator.com",
formats: ["markdown"]
})
});
const data = await response.json();
console.log(data.data.markdown.slice(0, 200));
Example Response
{
"success": true,
"data": {
"markdown": "# Hacker News\n\n1. Show HN: I built an open-source web scraper...",
"metadata": {
"title": "Hacker News",
"language": "en",
"source_url": "https://news.ycombinator.com",
"status_code": 200,
"word_count": 1847
}
}
}