Football H2H Head-to-Head Scraper
Under maintenancePricing
Pay per usage
Football H2H Head-to-Head Scraper
Under maintenanceFootball head-to-head (H2H) scraper. Returns full historical matchups between any two teams via API-Football: scores, dates, venues, half-time, extra time, penalties, refs. Perfect for betting tips, form analysis, football trading & match prediction.
Apify Actor: h2h-head-to-head
Scrape complete historical head-to-head results between any two football teams. Returns full match data — scores, dates, venues, competitions, half-time results, extra time, penalties, and more.
What This Actor Does
Given two football team names, this actor:
- Resolves team names to official API-Football IDs (fuzzy matching, e.g. "Arsenal" → ID 42)
- Fetches all head-to-head matches between them via the API-Football API
- Filters and formats the data into a clean structured dataset
- Saves results to your Apify dataset (CSV/JSON/HTML export)
Input Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
team1 | string | ✅ | — | Name of first team (e.g. "Arsenal", "Manchester United") |
team2 | string | ✅ | — | Name of second team |
max_matches | integer | ❌ | 50 | Max number of H2H matches to return (1–200) |
competition | string | ❌ | — | Filter by competition name (e.g. "Premier League") |
api_key | string | ❌ | — | API-Football key (uses env secret if not provided) |
Output Dataset Fields
Each record contains:
match_id, match_date, match_time, match_datetime,league_name, league_country, season, round,home_team, away_team,home_goals, away_goals,home_goals_ht, away_goals_ht,extra_time_home, extra_time_away,penalties_home, penalties_away,venue, referee,status (FINISHED/LIVE/POSTPONED),odds_home, odds_draw, odds_away,match_url, api_football_url
Use Cases
- Betting analysis — H2H history is a key input for match prediction models
- Football trading — Pre-match H2H data for trading algorithms
- Form guides — Build team comparison reports for any matchup
- Fantasy football — Historical performance data between specific teams
- Journalism — Quick access to any head-to-head record for match previews
Example
Input:
team1: Arsenalteam2: Manchester Citymax_matches: 10
Output: 10 most recent Arsenal vs Manchester City matches with full score details, dates, venues, and competition info.
Data Source
- Source: API-Football (free tier: 100 requests/day)
- Coverage: 600+ leagues, 100,000+ teams
- Freshness: Data is typically updated within hours of match completion
Pricing
This actor uses the free tier of API-Football. Set APIFOOTBALL_API_KEY as an Apify secret to use your own key for higher rate limits.
Recommended run cost: $0.05 – $0.10 per run (covers API overhead + Apify compute).
About
Built by Sid / Statistically World Cup — sports statistics and data content for the beautiful game.