Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Elasticsearch bulk index country codes
post country-data/doc/_bulk
{"index": {}}
{"name": "Afghanistan", "code": "AF"}
{"index": {}}
{"name": "Åland Islands", "code": "AX"}
{"index": {}}
{"name": "Albania", "code": "AL"}
{"index": {}}
{"name": "Algeria", "code": "DZ"}
{"index": {}}
{"name": "American Samoa", "code": "AS"}
{"index": {}}
{"name": "AndorrA", "code": "AD"}
{"index": {}}
{"name": "Angola", "code": "AO"}
{"index": {}}
{"name": "Anguilla", "code": "AI"}
{"index": {}}
{"name": "Antarctica", "code": "AQ"}
{"index": {}}
{"name": "Antigua and Barbuda", "code": "AG"}
{"index": {}}
{"name": "Argentina", "code": "AR"}
{"index": {}}
{"name": "Armenia", "code": "AM"}
{"index": {}}
{"name": "Aruba", "code": "AW"}
{"index": {}}
{"name": "Australia", "code": "AU"}
{"index": {}}
{"name": "Austria", "code": "AT"}
{"index": {}}
{"name": "Azerbaijan", "code": "AZ"}
{"index": {}}
{"name": "Bahamas", "code": "BS"}
{"index": {}}
{"name": "Bahrain", "code": "BH"}
{"index": {}}
{"name": "Bangladesh", "code": "BD"}
{"index": {}}
{"name": "Barbados", "code": "BB"}
{"index": {}}
{"name": "Belarus", "code": "BY"}
{"index": {}}
{"name": "Belgium", "code": "BE"}
{"index": {}}
{"name": "Belize", "code": "BZ"}
{"index": {}}
{"name": "Benin", "code": "BJ"}
{"index": {}}
{"name": "Bermuda", "code": "BM"}
{"index": {}}
{"name": "Bhutan", "code": "BT"}
{"index": {}}
{"name": "Bolivia", "code": "BO"}
{"index": {}}
{"name": "Bosnia and Herzegovina", "code": "BA"}
{"index": {}}
{"name": "Botswana", "code": "BW"}
{"index": {}}
{"name": "Bouvet Island", "code": "BV"}
{"index": {}}
{"name": "Brazil", "code": "BR"}
{"index": {}}
{"name": "British Indian Ocean Territory", "code": "IO"}
{"index": {}}
{"name": "Brunei Darussalam", "code": "BN"}
{"index": {}}
{"name": "Bulgaria", "code": "BG"}
{"index": {}}
{"name": "Burkina Faso", "code": "BF"}
{"index": {}}
{"name": "Burundi", "code": "BI"}
{"index": {}}
{"name": "Cambodia", "code": "KH"}
{"index": {}}
{"name": "Cameroon", "code": "CM"}
{"index": {}}
{"name": "Canada", "code": "CA"}
{"index": {}}
{"name": "Cape Verde", "code": "CV"}
{"index": {}}
{"name": "Cayman Islands", "code": "KY"}
{"index": {}}
{"name": "Central African Republic", "code": "CF"}
{"index": {}}
{"name": "Chad", "code": "TD"}
{"index": {}}
{"name": "Chile", "code": "CL"}
{"index": {}}
{"name": "China", "code": "CN"}
{"index": {}}
{"name": "Christmas Island", "code": "CX"}
{"index": {}}
{"name": "Cocos (Keeling) Islands", "code": "CC"}
{"index": {}}
{"name": "Colombia", "code": "CO"}
{"index": {}}
{"name": "Comoros", "code": "KM"}
{"index": {}}
{"name": "Congo", "code": "CG"}
{"index": {}}
{"name": "Congo, The Democratic Republic of the", "code": "CD"}
{"index": {}}
{"name": "Cook Islands", "code": "CK"}
{"index": {}}
{"name": "Costa Rica", "code": "CR"}
{"index": {}}
{"name": "Cote D\"Ivoire", "code": "CI"}
{"index": {}}
{"name": "Croatia", "code": "HR"}
{"index": {}}
{"name": "Cuba", "code": "CU"}
{"index": {}}
{"name": "Cyprus", "code": "CY"}
{"index": {}}
{"name": "Czech Republic", "code": "CZ"}
{"index": {}}
{"name": "Denmark", "code": "DK"}
{"index": {}}
{"name": "Djibouti", "code": "DJ"}
{"index": {}}
{"name": "Dominica", "code": "DM"}
{"index": {}}
{"name": "Dominican Republic", "code": "DO"}
{"index": {}}
{"name": "Ecuador", "code": "EC"}
{"index": {}}
{"name": "Egypt", "code": "EG"}
{"index": {}}
{"name": "El Salvador", "code": "SV"}
{"index": {}}
{"name": "Equatorial Guinea", "code": "GQ"}
{"index": {}}
{"name": "Eritrea", "code": "ER"}
{"index": {}}
{"name": "Estonia", "code": "EE"}
{"index": {}}
{"name": "Ethiopia", "code": "ET"}
{"index": {}}
{"name": "Falkland Islands (Malvinas)", "code": "FK"}
{"index": {}}
{"name": "Faroe Islands", "code": "FO"}
{"index": {}}
{"name": "Fiji", "code": "FJ"}
{"index": {}}
{"name": "Finland", "code": "FI"}
{"index": {}}
{"name": "France", "code": "FR"}
{"index": {}}
{"name": "French Guiana", "code": "GF"}
{"index": {}}
{"name": "French Polynesia", "code": "PF"}
{"index": {}}
{"name": "French Southern Territories", "code": "TF"}
{"index": {}}
{"name": "Gabon", "code": "GA"}
{"index": {}}
{"name": "Gambia", "code": "GM"}
{"index": {}}
{"name": "Georgia", "code": "GE"}
{"index": {}}
{"name": "Germany", "code": "DE"}
{"index": {}}
{"name": "Ghana", "code": "GH"}
{"index": {}}
{"name": "Gibraltar", "code": "GI"}
{"index": {}}
{"name": "Greece", "code": "GR"}
{"index": {}}
{"name": "Greenland", "code": "GL"}
{"index": {}}
{"name": "Grenada", "code": "GD"}
{"index": {}}
{"name": "Guadeloupe", "code": "GP"}
{"index": {}}
{"name": "Guam", "code": "GU"}
{"index": {}}
{"name": "Guatemala", "code": "GT"}
{"index": {}}
{"name": "Guernsey", "code": "GG"}
{"index": {}}
{"name": "Guinea", "code": "GN"}
{"index": {}}
{"name": "Guinea-Bissau", "code": "GW"}
{"index": {}}
{"name": "Guyana", "code": "GY"}
{"index": {}}
{"name": "Haiti", "code": "HT"}
{"index": {}}
{"name": "Heard Island and Mcdonald Islands", "code": "HM"}
{"index": {}}
{"name": "Holy See (Vatican City State)", "code": "VA"}
{"index": {}}
{"name": "Honduras", "code": "HN"}
{"index": {}}
{"name": "Hong Kong", "code": "HK"}
{"index": {}}
{"name": "Hungary", "code": "HU"}
{"index": {}}
{"name": "Iceland", "code": "IS"}
{"index": {}}
{"name": "India", "code": "IN"}
{"index": {}}
{"name": "Indonesia", "code": "ID"}
{"index": {}}
{"name": "Iran, Islamic Republic Of", "code": "IR"}
{"index": {}}
{"name": "Iraq", "code": "IQ"}
{"index": {}}
{"name": "Ireland", "code": "IE"}
{"index": {}}
{"name": "Isle of Man", "code": "IM"}
{"index": {}}
{"name": "Israel", "code": "IL"}
{"index": {}}
{"name": "Italy", "code": "IT"}
{"index": {}}
{"name": "Jamaica", "code": "JM"}
{"index": {}}
{"name": "Japan", "code": "JP"}
{"index": {}}
{"name": "Jersey", "code": "JE"}
{"index": {}}
{"name": "Jordan", "code": "JO"}
{"index": {}}
{"name": "Kazakhstan", "code": "KZ"}
{"index": {}}
{"name": "Kenya", "code": "KE"}
{"index": {}}
{"name": "Kiribati", "code": "KI"}
{"index": {}}
{"name": "Korea, Democratic People\"S Republic of", "code": "KP"}
{"index": {}}
{"name": "Korea, Republic of", "code": "KR"}
{"index": {}}
{"name": "Kuwait", "code": "KW"}
{"index": {}}
{"name": "Kyrgyzstan", "code": "KG"}
{"index": {}}
{"name": "Lao People\"S Democratic Republic", "code": "LA"}
{"index": {}}
{"name": "Latvia", "code": "LV"}
{"index": {}}
{"name": "Lebanon", "code": "LB"}
{"index": {}}
{"name": "Lesotho", "code": "LS"}
{"index": {}}
{"name": "Liberia", "code": "LR"}
{"index": {}}
{"name": "Libyan Arab Jamahiriya", "code": "LY"}
{"index": {}}
{"name": "Liechtenstein", "code": "LI"}
{"index": {}}
{"name": "Lithuania", "code": "LT"}
{"index": {}}
{"name": "Luxembourg", "code": "LU"}
{"index": {}}
{"name": "Macao", "code": "MO"}
{"index": {}}
{"name": "Macedonia, The Former Yugoslav Republic of", "code": "MK"}
{"index": {}}
{"name": "Madagascar", "code": "MG"}
{"index": {}}
{"name": "Malawi", "code": "MW"}
{"index": {}}
{"name": "Malaysia", "code": "MY"}
{"index": {}}
{"name": "Maldives", "code": "MV"}
{"index": {}}
{"name": "Mali", "code": "ML"}
{"index": {}}
{"name": "Malta", "code": "MT"}
{"index": {}}
{"name": "Marshall Islands", "code": "MH"}
{"index": {}}
{"name": "Martinique", "code": "MQ"}
{"index": {}}
{"name": "Mauritania", "code": "MR"}
{"index": {}}
{"name": "Mauritius", "code": "MU"}
{"index": {}}
{"name": "Mayotte", "code": "YT"}
{"index": {}}
{"name": "Mexico", "code": "MX"}
{"index": {}}
{"name": "Micronesia, Federated States of", "code": "FM"}
{"index": {}}
{"name": "Moldova, Republic of", "code": "MD"}
{"index": {}}
{"name": "Monaco", "code": "MC"}
{"index": {}}
{"name": "Mongolia", "code": "MN"}
{"index": {}}
{"name": "Montserrat", "code": "MS"}
{"index": {}}
{"name": "Morocco", "code": "MA"}
{"index": {}}
{"name": "Mozambique", "code": "MZ"}
{"index": {}}
{"name": "Myanmar", "code": "MM"}
{"index": {}}
{"name": "Namibia", "code": "NA"}
{"index": {}}
{"name": "Nauru", "code": "NR"}
{"index": {}}
{"name": "Nepal", "code": "NP"}
{"index": {}}
{"name": "Netherlands", "code": "NL"}
{"index": {}}
{"name": "Netherlands Antilles", "code": "AN"}
{"index": {}}
{"name": "New Caledonia", "code": "NC"}
{"index": {}}
{"name": "New Zealand", "code": "NZ"}
{"index": {}}
{"name": "Nicaragua", "code": "NI"}
{"index": {}}
{"name": "Niger", "code": "NE"}
{"index": {}}
{"name": "Nigeria", "code": "NG"}
{"index": {}}
{"name": "Niue", "code": "NU"}
{"index": {}}
{"name": "Norfolk Island", "code": "NF"}
{"index": {}}
{"name": "Northern Mariana Islands", "code": "MP"}
{"index": {}}
{"name": "Norway", "code": "NO"}
{"index": {}}
{"name": "Oman", "code": "OM"}
{"index": {}}
{"name": "Pakistan", "code": "PK"}
{"index": {}}
{"name": "Palau", "code": "PW"}
{"index": {}}
{"name": "Palestinian Territory, Occupied", "code": "PS"}
{"index": {}}
{"name": "Panama", "code": "PA"}
{"index": {}}
{"name": "Papua New Guinea", "code": "PG"}
{"index": {}}
{"name": "Paraguay", "code": "PY"}
{"index": {}}
{"name": "Peru", "code": "PE"}
{"index": {}}
{"name": "Philippines", "code": "PH"}
{"index": {}}
{"name": "Pitcairn", "code": "PN"}
{"index": {}}
{"name": "Poland", "code": "PL"}
{"index": {}}
{"name": "Portugal", "code": "PT"}
{"index": {}}
{"name": "Puerto Rico", "code": "PR"}
{"index": {}}
{"name": "Qatar", "code": "QA"}
{"index": {}}
{"name": "Reunion", "code": "RE"}
{"index": {}}
{"name": "Romania", "code": "RO"}
{"index": {}}
{"name": "Russian Federation", "code": "RU"}
{"index": {}}
{"name": "RWANDA", "code": "RW"}
{"index": {}}
{"name": "Saint Helena", "code": "SH"}
{"index": {}}
{"name": "Saint Kitts and Nevis", "code": "KN"}
{"index": {}}
{"name": "Saint Lucia", "code": "LC"}
{"index": {}}
{"name": "Saint Pierre and Miquelon", "code": "PM"}
{"index": {}}
{"name": "Saint Vincent and the Grenadines", "code": "VC"}
{"index": {}}
{"name": "Samoa", "code": "WS"}
{"index": {}}
{"name": "San Marino", "code": "SM"}
{"index": {}}
{"name": "Sao Tome and Principe", "code": "ST"}
{"index": {}}
{"name": "Saudi Arabia", "code": "SA"}
{"index": {}}
{"name": "Senegal", "code": "SN"}
{"index": {}}
{"name": "Serbia and Montenegro", "code": "CS"}
{"index": {}}
{"name": "Seychelles", "code": "SC"}
{"index": {}}
{"name": "Sierra Leone", "code": "SL"}
{"index": {}}
{"name": "Singapore", "code": "SG"}
{"index": {}}
{"name": "Slovakia", "code": "SK"}
{"index": {}}
{"name": "Slovenia", "code": "SI"}
{"index": {}}
{"name": "Solomon Islands", "code": "SB"}
{"index": {}}
{"name": "Somalia", "code": "SO"}
{"index": {}}
{"name": "South Africa", "code": "ZA"}
{"index": {}}
{"name": "South Georgia and the South Sandwich Islands", "code": "GS"}
{"index": {}}
{"name": "Spain", "code": "ES"}
{"index": {}}
{"name": "Sri Lanka", "code": "LK"}
{"index": {}}
{"name": "Sudan", "code": "SD"}
{"index": {}}
{"name": "Suriname", "code": "SR"}
{"index": {}}
{"name": "Svalbard and Jan Mayen", "code": "SJ"}
{"index": {}}
{"name": "Swaziland", "code": "SZ"}
{"index": {}}
{"name": "Sweden", "code": "SE"}
{"index": {}}
{"name": "Switzerland", "code": "CH"}
{"index": {}}
{"name": "Syrian Arab Republic", "code": "SY"}
{"index": {}}
{"name": "Taiwan, Province of China", "code": "TW"}
{"index": {}}
{"name": "Tajikistan", "code": "TJ"}
{"index": {}}
{"name": "Tanzania, United Republic of", "code": "TZ"}
{"index": {}}
{"name": "Thailand", "code": "TH"}
{"index": {}}
{"name": "Timor-Leste", "code": "TL"}
{"index": {}}
{"name": "Togo", "code": "TG"}
{"index": {}}
{"name": "Tokelau", "code": "TK"}
{"index": {}}
{"name": "Tonga", "code": "TO"}
{"index": {}}
{"name": "Trinidad and Tobago", "code": "TT"}
{"index": {}}
{"name": "Tunisia", "code": "TN"}
{"index": {}}
{"name": "Turkey", "code": "TR"}
{"index": {}}
{"name": "Turkmenistan", "code": "TM"}
{"index": {}}
{"name": "Turks and Caicos Islands", "code": "TC"}
{"index": {}}
{"name": "Tuvalu", "code": "TV"}
{"index": {}}
{"name": "Uganda", "code": "UG"}
{"index": {}}
{"name": "Ukraine", "code": "UA"}
{"index": {}}
{"name": "United Arab Emirates", "code": "AE"}
{"index": {}}
{"name": "United Kingdom", "code": "GB"}
{"index": {}}
{"name": "United States", "code": "US"}
{"index": {}}
{"name": "United States Minor Outlying Islands", "code": "UM"}
{"index": {}}
{"name": "Uruguay", "code": "UY"}
{"index": {}}
{"name": "Uzbekistan", "code": "UZ"}
{"index": {}}
{"name": "Vanuatu", "code": "VU"}
{"index": {}}
{"name": "Venezuela", "code": "VE"}
{"index": {}}
{"name": "Viet Nam", "code": "VN"}
{"index": {}}
{"name": "Virgin Islands, British", "code": "VG"}
{"index": {}}
{"name": "Virgin Islands, U.S.", "code": "VI"}
{"index": {}}
{"name": "Wallis and Futuna", "code": "WF"}
{"index": {}}
{"name": "Western Sahara", "code": "EH"}
{"index": {}}
{"name": "Yemen", "code": "YE"}
{"index": {}}
{"name": "Zambia", "code": "ZM"}
{"index": {}}
{"name": "Zimbabwe", "code": "ZW"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment