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
Building a Price Monitoring Tool: Step-by-Step Guide
Build a complete price monitoring tool with Python. Track prices, detect changes, and get email alerts. Full code with scheduler and database.
TutorialHow to Scrape Marketplace Product Data with Python
Pull titles, prices, ratings and variations from marketplace product pages in Python — hand-rolled parsing first, then structured extraction.
TutorialPython Web Scraping: Requests + BeautifulSoup vs Scraping API
Compare DIY web scraping with requests and BeautifulSoup against using a scraping API. Side-by-side code, cost analysis, and when to use each.