A machine-readable dataset of global visa requirements, automatically generated from Wikipedia's "Visa requirements for X citizens" articles.
Visa data is community-sourced from Wikipedia and may be incomplete, outdated or wrong. Always verify entry requirements with the official embassy or government source of the destination before travelling.
The dataset is published via GitHub Pages and updated weekly:
-
Index:
https://riedel-david.github.io/Visa-requirements/index.json- Lists all available passports with metadata
- Compare
source_revisionto detect data changes (it moves only when the visa data changes, not on every Wikipedia edit)
-
Per-passport files:
https://riedel-david.github.io/Visa-requirements/passports/<ISO2>.json- e.g.,
passports/DE.jsonfor German passport holders - Contains all visa requirements for that passport
- e.g.,
-
All data:
https://riedel-david.github.io/Visa-requirements/all.json- Single file with all passports (larger download)
- Minified format
-
Status:
https://riedel-david.github.io/Visa-requirements/status.jsonlast_checked_at,last_run_status,passports_stale; tells you whether the data is fresh
Data snapshots are tagged as data-YYYY-MM-DD. You can access a specific version via:
https://raw.githubusercontent.com/Riedel-David/Visa-requirements/data-2026-10-30/data/passports/DE.json
all.json is not committed (it is large and changes every run). It is generated on each run and published on GitHub Pages and as an asset of each GitHub Release, so for a pinned version download it from the release of that tag.
See DATA_FORMAT.md for detailed schema documentation.
Each passport file contains:
{
"schema_version": "1.1.0",
"passport": "DE",
"source_title": "Visa requirements for German citizens",
"source_url": "https://en.wikipedia.org/wiki/...",
"source_revision": "1379323599",
"source_timestamp": "2026-10-09T12:34:56Z",
"generated_at": "2026-10-30T06:00:00Z",
"license": "CC BY-SA 4.0",
"attribution": "Derived from Wikipedia... (see LICENSE-DATA.md)",
"records": [...]
}Each record represents the visa requirement for one destination. area: null means the whole country; records with an area are sub-national.
{
"passport": "DE",
"destination": "JP",
"destination_name": "Japan",
"area": null,
"status": "visa_free",
"alternative_statuses": [],
"allowed_stay_days": 90,
"allowed_stay_raw": "90 days",
"notes": "Additional details...",
"is_territory_or_restricted": false,
"source_url": "https://en.wikipedia.org/wiki/...",
"source_revision": "1379323599"
}Three CSV files are generated into data/ at the end of every run. They are not committed to git: download them from the GitHub Release (or GitHub Pages, next to all.json):
| File | Layout |
|---|---|
passport-index-tidy-iso2.csv |
Passport,Destination,Requirement, one row per passport and destination, ISO-2 codes |
passport-index-tidy-iso3.csv |
same, ISO-3 codes |
passport-index-matrix-iso2.csv |
first column Passport, one column per destination, cell = requirement |
- Only the whole-country record (
areais null) is used.Requirementis ourstatusvalue as is:visa_free,visa_on_arrival,eta,evisa,visa_required,permit_required,admission_refused,special,travel_ban. No stay days, no notes. - Missing passport/destination pairs have no row in the tidy files and an empty cell in the matrix.
- Rows and columns are sorted by ISO-2 code, so identical input gives byte-identical files.
- ISO-3 codes come from the static table
src/visa_pipeline/iso3.json. Codes without an ISO-3 (the X-codes) are kept as is, except Kosovo:XKbecomesXKX(user-assigned).XN,XS,XA,XO,XTandXWstay two-letter in the ISO-3 file.
The pipeline normalizes Wikipedia's visa status descriptions into these categories:
| Status | Meaning |
|---|---|
visa_free |
No visa required, including freedom of movement |
visa_on_arrival |
Visa issued at the port of entry |
eta |
Electronic Travel Authorization required |
evisa |
Electronic visa (eVisa) required |
visa_required |
Traditional visa required (must apply in advance) |
permit_required |
Special permit required (e.g., for restricted areas) |
admission_refused |
Entry not permitted |
special |
Unmapped or special case (see notes field) |
travel_ban |
The traveller's own government forbids travel (allowed_stay_days is null) |
When Wikipedia lists multiple options (e.g., "eVisa / Visa on arrival"):
statuscontains the least restrictive optionalternative_statuseslists the other options in order- Exception: a
travel_banpart always wins; the destination's own status goes toalternative_statuses
The pipeline uses src/visa_pipeline/overrides/destinations.json to:
- Map destination names to ISO 3166-1 alpha-2 codes
- Handle territories and disputed regions
- Assign user-defined X-codes for non-ISO destinations:
- XK - Kosovo
- XN - Northern Cyprus
- XS - Somaliland
- XA - Abkhazia
- XO - South Ossetia
- XT - Transnistria
- XW - Sahrawi Arab Democratic Republic (Western Sahara itself is
EH)
See the overrides file for the complete list of X-codes.
src/visa_pipeline/overrides/passports.json maps Wikipedia article titles to passport ISO codes.
The pipeline includes safety checks to prevent publishing bad data:
- Status change threshold: Max 15 status changes per passport
- Record drop threshold: Max 10% drop in record count
- Cooling-off: A page whose latest Wikipedia revision is under 24 hours old is deferred: the old data stays and the page is picked up on a later run once the revision has aged (reverts of vandalism are usually quick). Deferred passports are listed in
summary.jsonunderdeferred; pages never parsed before are not deferred, and--forcedoes not bypass this - Repeated blocks: A passport that is blocked by the thresholds and has been stale (any reason) for 3+ runs in a row makes the run exit non-zero. This shows up as a failed workflow run (notification), not as an issue
- Zero-row detection: A passport that parses to zero rows when it had data before counts as a failure (the run exits non-zero)
When a threshold is exceeded:
- The old data is kept (not overwritten)
- A GitHub issue is opened automatically
- The workflow still processes the other passports (a zero-row failure also turns the run red)
Override with CLI flags:
.venv/bin/python -m visa_pipeline run --force # Reparse everything and bypass the thresholds (zero rows still fail)
.venv/bin/python -m visa_pipeline run --max-status-changes 20 --max-record-drop-pct 15- Discovery: Finds "Visa requirements for X citizens" articles from Wikipedia's category system
- Revision check: Compares article revisions against stored state to skip unchanged pages
- Parsing: Extracts visa requirements from wikitext tables using
mwparserfromhell - Status mapping: Normalizes visa status text to the enum (unmapped statuses →
special+ report) - Validation: Checks data quality with JSON Schema and safety thresholds
- Publishing: Generates the published files in
data/(per-passport JSON,index.json,status.json;all.jsonand the CSV exports are generated there too but not committed) and the run artifacts inout/(report.md,summary.json, changelog)
The pipeline:
- Uses only the Wikipedia MediaWiki API (no scraping)
- Follows API politeness guidelines (User-Agent, serial requests,
maxlag,Retry-After) - Resolves transcluded notes by fetching
Template:Transcluded sections for the visa articles - Handles complex table structures (colspan/rowspan, data-sort-value attributes)
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"# Process all passports
.venv/bin/python -m visa_pipeline run --data data --state state --out out
# Process specific passports only
.venv/bin/python -m visa_pipeline run --only DE,US,FR
# Force update (ignore revision checks)
.venv/bin/python -m visa_pipeline run --force
# Re-run page discovery / change the minimum seconds between API requests
.venv/bin/python -m visa_pipeline run --refresh-pages
.venv/bin/python -m visa_pipeline run --min-interval 2.0.venv/bin/pytest -q.venv/bin/python -m pyflakes src testsThe dataset is updated automatically via GitHub Actions:
- Schedule: Every Monday at 04:17 UTC
- Manual trigger: Via workflow_dispatch (supports
--forceand--onlyoptions) - On data changes: Data and state are committed to
mainwith adata-YYYY-MM-DDtag and a release - Only
status.jsonmoved: If justdata/status.json/state/stale.jsonchanged (last_checked_atchanges every run), a "Refresh status.json (no data changes)" commit goes tomain, with no tag or release. A full run therefore commits every week; only--onlyruns can end with no commit - Releases: Each data update also publishes a GitHub Release for the tag, with the changelog as release notes and
all.jsonplus the CSV files attached - On issues: An issue is opened/updated only when passports are blocked by the safety thresholds or fail to parse in that run (the repeated-blocks exit code alone opens no issue) (unmapped statuses appear in the run report, not as issues)
- Deployment: Published to GitHub Pages automatically
Unlike some datasets that store only the generation pipeline, this repo commits the data to main because:
- Versioned history: Git tracks exactly when and how visa rules changed
- Diffable: Changes are visible in commit diffs
- Pinnable: Consumers can pin to specific data tags
- Reliable: The committed data is the source of truth (no risk of ephemeral artifact loss)
The source code (pipeline, scripts, tests) is licensed under the MIT License.
The visa data in data/ is derived from Wikipedia and licensed under CC BY-SA 4.0.
See LICENSE-DATA.md for full attribution requirements.
Summary for app developers:
- Credit "Wikipedia contributors"
- Link to the source article (provided in each passport file)
- Link to CC BY-SA 4.0 license
- State that the data was transformed/normalized
- Display attribution and disclaimer in your app
See CONTRIBUTING.md for guidelines.
Important: Data corrections should be made on Wikipedia first, as this repository mirrors Wikipedia content. Only report parsing bugs or systematic issues here.
The pipeline runs weekly via GitHub Actions and updates the data automatically. This is a hobby project: there are no guarantees about maintenance or response times.
- Wikipedia Visa Requirement Articles
- DATA_FORMAT.md - Detailed schema documentation
- GitHub Actions Workflows - Automation details