Skip to content

Python scraper for Finn.no Norwegian car marketplace using ScrapingAnt API

Notifications You must be signed in to change notification settings

kami4ka/FinnScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finn.no Scraper

A Python scraper for extracting car listings from Finn.no, Norway's largest online marketplace.

Features

  • Scrape car listings with pagination support
  • Filter by price, year, and fuel type
  • Extract comprehensive listing details:
    • Title and model
    • Price in NOK
    • Year and mileage
    • Fuel type and transmission
    • Location
    • Seller name and type (Dealer/Private)
    • Time posted
  • Export to CSV and JSON formats
  • Automatic deduplication of listings

Requirements

Installation

  1. Clone the repository:
git clone https://github.com/kami4ka/FinnScraper.git
cd FinnScraper
  1. Install dependencies:
pip install -r requirements.txt
  1. Set your ScrapingAnt API key:
export SCRAPINGANT_API_KEY="your_api_key_here"

Usage

Basic Usage

# Scrape car listings (default 2 pages)
python main.py

# Scrape with more pages
python main.py -p 5

With Filters

# Filter by price range
python main.py --min-price 100000 --max-price 500000

# Filter by year
python main.py --min-year 2020 --max-year 2024

# Filter by fuel type
python main.py --fuel-type El

Output Options

# Export to both CSV and JSON
python main.py --json

# Custom output filename
python main.py -o my_listings

Command Line Options

Option Description
-p, --pages Maximum pages to scrape (default: 2)
-d, --delay Delay between requests in seconds (default: 1.0)
-o, --output Output filename (without extension)
--json Also export to JSON format
--min-price Minimum price filter (NOK)
--max-price Maximum price filter (NOK)
--min-year Minimum registration year
--max-year Maximum registration year
--fuel-type Fuel type (Bensin, Diesel, El, Hybrid)
--api-key ScrapingAnt API key

Output Format

CSV Fields

Field Description
title Vehicle title/model
price Listed price in NOK
year Registration year
mileage Odometer reading
fuel_type Fuel type (Norwegian)
transmission Transmission type
location Seller location
seller_name Seller/dealer name
seller_type Seller type (Forhandler/Privat)
listing_id Unique listing ID
listing_url Direct link to listing
image_url Main image URL
time_posted Time since posting
scraped_at Timestamp of scraping

About ScrapingAnt

This scraper uses ScrapingAnt API for reliable web scraping with:

  • JavaScript rendering support
  • Automatic proxy rotation
  • CAPTCHA handling
  • Norwegian proxy servers for Finn.no access

Note: The free plan has a concurrency limit of 1 thread. For higher throughput, consider upgrading to a paid plan.

License

MIT License

About

Python scraper for Finn.no Norwegian car marketplace using ScrapingAnt API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages