Quickstart
Scrape your first public webpage with AIHackr. Sign in, create an API key and call the web scraping API with JavaScript, Python or cURL.
On this page
1. Create your account
Open the playground, choose Get started and verify the eight-digit code sent to your email. The playground uses your browser session: no API key is needed there. Your account has its own private workspace.
2. Create an API key
After signing in, open API keys and give the key a useful name. Copy it when it is created; it is shown only once. Store it in a server-side environment variable named AIHACKR_API_KEY. Do not commit it or put it in frontend JavaScript.
3. Scrape one public page
API requests need a complete HTTP or HTTPS URL. The playground also accepts a bare domain and adds HTTPS for you. This example makes one browser operation and returns Markdown.
curl --fail-with-body https://aihackr.com/v2/scrape \
-H "Authorization: Bearer $AIHACKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"formats": [
"markdown"
]
}'const response = await fetch('https://aihackr.com/v2/scrape', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.AIHACKR_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://example.com', formats: ['markdown']})
});
const result = await response.json();
if (!response.ok || !result.success) throw new Error(result.error?.message || 'Scrape failed');
console.log(result.data.markdown);import json, os, urllib.request
request = urllib.request.Request(
'https://aihackr.com/v2/scrape',
data=json.dumps({'url': 'https://example.com', 'formats': ['markdown']}).encode(),
headers={'Authorization': 'Bearer ' + os.environ['AIHACKR_API_KEY'],
'Content-Type': 'application/json'},
method='POST')
with urllib.request.urlopen(request, timeout=70) as response:
result = json.load(response)
print(result['data']['markdown'])4. Keep the content and its source
Read data.markdown and retain data.metadata alongside it. The response includes the submitted source URL, resolved URL when provided by the browser, observation time and engine. Target failures return an error instead of a successful content record.
5. Choose your next operation
- Map links on one page before choosing what to fetch.
- Crawl a small section when you need several pages.
- Extract structured JSON when you know the fields you want.
- Connect an MCP client when an agent needs browser tools.