Getting Started with FineData API
Learn how to set up and make your first web scraping request with FineData API in under 5 minutes.
Getting Started with FineData API
Welcome. This guide will walk you through setting up your account and making your first web scraping request in under 5 minutes.
Prerequisites
Before you begin, make sure you have:
- An account (sign up free)
- Python 3.8+ or Node.js 18+
- Your API key from the dashboard
Step 1: Get Your API Key
After creating your account, navigate to the API Keys section in your dashboard. Click Create New Key and give it a descriptive name like “Development”.
Keep your API key secure. Never commit it to version control or share it publicly.
Step 2: Install the SDK
Python
pip install finedata
Node.js
npm install finedata
Step 3: Make Your First Request
Here’s a minimal example that scrapes a webpage and returns structured data. The same fields work over REST with the x-api-key header if you prefer curl or requests over the SDK:
Python
from finedata import FineData
client = FineData(api_key="your-api-key")
result = client.scrape(
url="https://example.com",
options={
"use_js_render": True,
"timeout": 30
}
)
print(result.content) # Page HTML content
print(result.status_code) # HTTP status
print(result.metadata) # Extracted metadata
Node.js
import { FineData } from 'finedata';
const client = new FineData({ apiKey: 'your-api-key' });
const result = await client.scrape({
url: 'https://example.com',
options: {
use_js_render: true,
timeout: 30,
},
});
console.log(result.content);
console.log(result.statusCode);
console.log(result.metadata);
Step 4: Stronger Rendering Modes
For pages that gate content behind a challenge, enable full-browser rendering with a matching TLS profile and a residential exit. You only pay when the page renders:
result = client.scrape(
url="https://example.com/catalog",
options={
"use_js_render": True,
"stealth_antibot": True,
"tls_profile": "chrome124",
"use_residential": True,
"solve_captcha": True
}
)
stealth_antibot is the strongest managed rendering mode for most sites. For the hardest targets, try stealth_antibot_headful — and remember that a failed render is not billed.
Step 5: Parse Structured Data
Extract specific data points using CSS selectors:
result = client.scrape(
url="https://example.com/products",
extract={
"title": "h1.product-title",
"price": ".price-current",
"description": ".product-description p",
"images": ["img.product-image @src"]
}
)
for item in result.extracted:
print(f"{item['title']}: {item['price']}")
Understanding Token Usage
Each request consumes tokens based on the features used:
| Feature | Token Cost |
|---|---|
| Base request | 1 token |
JavaScript rendering (use_js_render) | +5 tokens |
Browser-grade TLS (use_antibot, on by default) | +2 tokens |
Residential proxy (use_residential) | +3 tokens |
Captcha solving (solve_captcha) | +10 tokens |
Monitor your usage in the dashboard or via the API:
usage = client.get_usage()
print(f"Tokens used: {usage.tokens_used}/{usage.tokens_limit}")
What’s Next?
Now that you’ve made your first request, explore these resources:
- API Reference — Complete endpoint documentation
- Proxy Configuration — TLS profiles and proxy options
- Batch Scraping — Process multiple URLs efficiently
- Webhooks — Async scraping with callbacks
- Scraping API vs. DIY: a cost comparison — the math on when to keep building your own scraper and when to switch
- Starting a data business on scraped data — what changes once scraping is the product, not a side tool
Need help? Reach out to our support team or join the community on Discord.
Related Articles
Steam 429 Error: Parsing Store Pages Responsibly with Python
Handle Steam 429 errors without retrying early: respect Retry-After, separate API and target failures, and extract Portal 2 store data with Python.
TutorialAsync Scraping at Scale: Jobs, Batches, Webhooks
Practical guide to FineData async scraping: submit jobs, poll with exponential backoff, verify webhook callbacks, and run batches of up to 100 URLs.
TutorialFrom HTML to JSON: Schema-Driven Extraction
Turn scraped pages into validated JSON with FineData: pick extract_schema, extract_prompt, or extract_rules, tune ai_content_mode, and export CSV/XLSX.