6 ms·
Show HN: CIA World Factbook Archive (1990–2025), searchable and exportable
A structured archive of CIA World Factbook data spanning 1990–2025.
It currently includes:
36 editions
281 entities
~1.06M parsed fields
full-text + boolean search
country/year comparisons
map/trend/ranking analysis views
CSV/XLSX/PDF export
The goal is to preserve long-horizon public-domain government data and make cross-year analysis practical.
Live: https://cia-factbook-archive.fly.dev https://cia-factbook-archive.fly.dev
About/method details: https://cia-factbook-archive.fly.dev/about https://cia-factbook-archive.fly.dev/about
Data source is the CIA World Factbook (public domain).
Not affiliated with the CIA or U.S. Government.
- ronald_petty 8mo agoI like the timeline feature. Maybe I need to spend more time, but to see political changes / borders / etc. would all be great! Keep up the good work.
- MilkMp 8mo agoOhh that is a great idea! And since we already have the political field in SQL!. I will start working on some of this and update the website this week. Thank you for the awesome suggestions!
- celeryd 8mo agoAny way to download them all at once?
- MilkMp 8mo agoHey there, will add the feature. Wasn't sure if people's computers could handle it all in one, lol, but will make it available in the data export page.
- ngcc_hk 8mo agoNot all. But some may. And in case you were shut down someone else can continue and one day it may be resurfaced perhaps even in USA.
- MilkMp 8mo agoHi there, I have updated the webpage to include all countries/all years. It will give you a warning that the PDF is large. https://cia-factbook-archive.fly.dev/export https://cia-factbook-archive.fly.dev/export
- RobRivera 8mo agoHurray! I didnt discover this until I saw the recent post about its deactivation.
- FergusArgyll 8mo agoNice! One thing; you're supposed to write "Cannot confirm or deny my affiliation with the CIA"
- b8 8mo ago2025-2026 is available (to purchase/read outside or ur site) and the last version 2026-2027 is planed for release on April 7th, https://www.amazon.com/CIA-World-Factbook-2026-2027-ebook/dp/B0FFN3NVPC https://www.amazon.com/CIA-World-Factbook-2026-2027-ebook/dp....
- toomuchtodo 8mo agoInternet Archive has 2025-2026 in their possession, should make it into OpenLibrary eventually once scanned.
- MilkMp 8mo agoWill add to this once it's out. Thanks for sending this :)
- b8 8mo agoI have the 2025-2026 one. Email me for it.
- crims0n 8mo agoSomehow it escaped me that these were published books as well. Thank you kind stranger.
- 0x38B 8mo agoI used to check them out from the military library to read as a teenager – the books looked cool, official in their white bindings, and I loved the facts and descriptions of countries.
- shevy-java 8mo agoHmm. It's kind of weird, because I think I actually used it in the 1990s, probably shortly before Wikipedia emerged. Ever since Wikipedia, I don't think I used the CIA world Factbook much at all, so in a way I guess this partly explains why the website is now defunct. But I am a tiny bit sad that it is gone, if only for a piece of nostalgia from the 1990s era. I think we need to be careful - yes, wikipedia has that information, but we kind of lose websites here. That is a potential danger, because we end up with more and more of a monopoly which is rarely good (ok, wikipedia may be an exception but it also has intrinsic quality issues; it is still excellent in many ways but not perfect, and we may get tunnel vision the more websites vanish - just look at the AI slop autogenerated "content" or "affiliate" links you see in a google search, if anyone is still using that).
- MilkMp 8mo agoGlad I was able to get the original fact book data that other archivists have gathered over the years- Project Gutenberg (plain text), Wayback Machine (HTML zips and factbook.jsons, and one from the agency's websites
- orhmeh09 8mo agoWorld facts provided by the CIA, too, have intrinsic quality issues. I'm not too worried!
- cwnyth 8mo agoWikipedia has some consistency issues and often linked to the CIA Factbook as well.
- nephihaha 8mo agoWhat is its copyright status?
- MilkMp 8mo agoThe data from the CIA World Factbook is in the public domain (being a U.S. Government work) and is free for anyone to use. The ETL scripts and data tools available in the GitHub repository are open source and licensed under the MIT License. However, the web application itself is proprietary software, with all rights reserved.
- nephihaha 8mo agoThanks, helpful answer! I did think much of it might be in the public domain like NASA's images.
- nubg 8mo agoSite loads very slowly for me. Tried various devices and networks. Same for a friend of mine overseas.
- MilkMp 8mo agoWill scale the website
- Betelbuddy 8mo agoYou should include this one, will also go away soon most likely: https://www.cia.gov/resources/cia-maps/ https://www.cia.gov/resources/cia-maps/
- MilkMp 8mo agoI'll start working on this now! Thank you for sending it! It will be interesting to see if I can incorporate them into the globes or when the country info pops up!
- MilkMp 8mo agoJust the start, but I added the maps to the page. Planning on linking them to their factsheets and dashboards this week. https://cia-factbook-archive.fly.dev/maps?page=1 https://cia-factbook-archive.fly.dev/maps?page=1
- nubg 8mo agoTo clarify, I am a shill for fly.io and wanted to get you to spend more money by scaling it up. The site loaded instantaneously on the first try, so fast I thought it was local.
- ohyoutravel 8mo agoThis is pretty basic but kinda neat. A good way to browse the fact books like a website. Definitely could use more features but imo superior than flipping through a PDF.
- MilkMp 8mo agoHey, what features would you like to see??
- ix101 8mo agoHi, thanks for this! Not sure if you're aware that clicking Australia goes to American Samoa, similar issue with some others that I encountered (Bahamas -> Burkina faso).
- MilkMp 8mo ago[dead]
- MilkMp 8mo agoHi there, I have located the root and sent out a bug fix. Root cause: The CIA World Factbook, published by the Central Intelligence Agency, uses the U.S. Government's FIPS 10-4 country codes, which differ from the ISO 3166-1 Alpha-2 codes used by the rest of the world. Of the 281 entities in our database, 173 have different FIPS and ISO codes. Our lookups matched FIPS codes first, so when codes collided between the two systems, the wrong country was loaded. Fixed all 13 queries and 6 templates to always prefer ISO over FIPS. Examples fixed: Australia (ISO=AU) was loading American Samoa (FIPS=AQ, but Australia's FIPS=AS collides with American Samoa's ISO=AS) Singapore (ISO=SG) was loading Senegal (FIPS=SG) Germany (ISO=DE) was loading Gambia (FIPS=GM = Germany's FIPS, ISO=GM = Gambia) Bahamas (ISO=BS) was loading Burkina Faso (FIPS=BF = Bahamas' FIPS, ISO=BF = Burkina Faso)
- MilkMp 8mo agoOriginally, my plan was just to create the archive, but I have expanded the scope, lol.
- ggm 8mo agoThis is an archive of the service which is being shut down under the current WH administration?
- 1f60c 8mo agoYes, that is correct.
- daveelkan 8mo agofound a bug: Australia links to American Samoa in 2025 archive.
- stephen_g 8mo agoYes I noticed that too, and clicking on Austria takes you to Australia instead! (AU instead of AT which is Austria's country code) Then when you actually are in Australia, if you click back to 2001 or earlier it changes to 'Ashmore and Cartier Islands'
- MilkMp 8mo agoWill fix. Thank you! Most likely a grouping problem due to the MasterCountry ID.
- MilkMp 8mo agoHi there, I have located the root and sent out a bug fix. Root cause: The CIA World Factbook, published by the Central Intelligence Agency, uses the U.S. Government's FIPS 10-4 country codes, which differ from the ISO 3166-1 Alpha-2 codes used by the rest of the world. Of the 281 entities in our database, 173 have different FIPS and ISO codes. Our lookups matched FIPS codes first, so when codes collided between the two systems, the wrong country was loaded. Fixed all 13 queries and 6 templates to always prefer ISO over FIPS. Examples fixed: Australia (ISO=AU) was loading American Samoa (FIPS=AQ, but Australia's FIPS=AS collides with American Samoa's ISO=AS) Singapore (ISO=SG) was loading Senegal (FIPS=SG) Germany (ISO=DE) was loading Gambia (FIPS=GM = Germany's FIPS, ISO=GM = Gambia) Bahamas (ISO=BS) was loading Burkina Faso (FIPS=BF = Bahamas' FIPS, ISO=BF = Burkina Faso)
- gbennett71 8mo agoConfirmed, affects multiple years' data
- 3eb7988a1663 8mo agoJust an incredible service. Really appreciate that you put all of your backend work into the open.
- MilkMp 8mo agoThanks so much!
- cwnyth 8mo agoKudos! I was working on doing this as well, so it's nice to see it already done.
- MilkMp 8mo agoHi there! If you have anything you want added to the site, just let me know :) I can definitely try.
- kshri24 8mo agoThere is a bug in the time series charts. Data needs to be normalized prior to charting. For example: https://cia-factbook-archive.fly.dev/archive/field/IN/Broadband%20-%20fixed%20subscriptions https://cia-factbook-archive.fly.dev/archive/field/IN/Broadb...
- MilkMp 8mo agoThanks! Will update soon.
- MilkMp 8mo agoFound the problem, the total regex doesn't handle magnitude suffixes: 2018: total: 17,856,024 → parses as 17856024 (correct raw count) 2020: total: 18.17 million → parses as 18.17 (WRONG - drops "million") 2025: total: 39.3 million → parses as 39.3 (WRONG) So the chart jumps from ~18 million down to ~18, making it wrong. The fix is to handle "million/billion/trillion" after total. Just deployed a new bug fix. Thanks for bringing this to my attention!
- deleted 8mo ago[deleted]
- roysting 8mo agoHi. Nice project. One issue though; if you go to the Factbook for any year[1], the link to the entry for “Germany”[2] will take you to the entry for the Gambia for every year I have checked. I have not noticed any other countries where that happens. [1] https://cia-factbook-archive.fly.dev/archive/2002 https://cia-factbook-archive.fly.dev/archive/2002 [2] https://cia-factbook-archive.fly.dev/archive/2002/GM https://cia-factbook-archive.fly.dev/archive/2002/GM
- MilkMp 8mo agoHi there, will fix Thank you! Most likely a grouping problem due to the MasterCountry ID.
- tjsch 8mo agoI found another example: searching for "Nicaragua" takes you to the page for "Niger".
- MilkMp 8mo agoHi there, I have located the root cause and will be fixing the issue: Root cause: CIA uses FIPS codes (CanonicalCode), which differ from ISO Alpha-2 for many countries. Templates and SQL queries prioritized CanonicalCode over ISOAlpha2, so URL codes like /archive/2025/AU matched the wrong country. Australia (AU) -> American Samoa (AS = CIA FIPS for Australia) Singapore (SG) -> Senegal (SG = CIA FIPS for Senegal) Germany (DE) -> Gambia (GM = CIA FIPS for Germany)
- roysting 8mo agoThanks for the follow up, I figured it was semantic collision. I noticed the “GM”. This is a good example of the importance of strong toping patterns. The GDP of Germany just tanked, we didn’t lose a mars climate orbiter this time. :)
- MilkMp 8mo agoThanks for pointing it out! I had noticed some mapping issues (Russia's Military GDP not showing), so there is definitely room for improvement here. Just wanted to get this out there for people and create their own projects or use this one :)
- eddythompson80 8mo agoCool project. The world population seems to be double counted. I think https://cia-factbook-archive.fly.dev/analysis/trends https://cia-factbook-archive.fly.dev/analysis/trends
- 1659447091 8mo agoThere is a github of the factbook for anyone that just wants JSON or markdown files:=> https://github.com/factbook https://github.com/factbook "A cache for datasets for the country profiles from the World Factbook in the original (1:1) format from the cia.gov website" https://github.com/factbook/cache.factbook.json https://github.com/factbook/cache.factbook.json
- MilkMp 8mo agoHi there, thanks for linking this! My GitHub and website both link to and use this source! I just thought putting it in a SQL database and making the entire 1990-2025 queryable was needed since I couldn't find one anywhere :)
- genewitch 8mo agoit is a lot of fun and rewarding to do this! I've done it several times for medium-sized datasets, like wikipedia dumps, the entire geospatial dataset to mapreduce it (pgsql). The wikipedia one was great, i had it set up to query things like "show me all ammunition manufactured after 1950 that is between .30 and .40" and it could just return it nearly instantly. The wikimedia dumps keep the infoboxes and relations intact, so you can do queries like this easily.
- 3eb7988a1663 8mo agoDo you have a write-up of this somewhere? When I last looked at the Wikipedia dumps, they looked like a mess to parse. How were you getting structured information?
- genewitch 8mo agounfortunately, i consider it proprietary.
- iamacyborg 8mo agoYou'd presumably have to run some part of the transclusion pipeline to properly handle template/module/page transclusion.
- freakynit 8mo agoThis is crazy: https://cia-factbook-archive.fly.dev/analysis/changes https://cia-factbook-archive.fly.dev/analysis/changes
- Barbing 8mo agoWhoh. >Albania Faces Europe's Sharpest Population Decline as Emigration Surges Just one example of an article I didn't see and never would have thought to look for without that page. Sorting descending & seeing ~"800%" will grab ya!
- freakynit 8mo agoExcellent site. One small bug though: https://cia-factbook-archive.fly.dev/analysis/compare?a=IN&b=CN&year=2025 https://cia-factbook-archive.fly.dev/analysis/compare?a=IN&b... .. The second dropdown switches to "Comoros" instead of "China" even after selection, though URL says CN for China.
- MilkMp 8mo agoWill check out! Thank you!
- freakynit 8mo agoTo the author: In case you are patching fields/bugs in database (like country codes for example), would it be possible for you to share that database as well with us so we can build on top? This is actually an excellent dataset to test GraphRAG capabilities. Also, a world simulation game, embodied with real data and real changes, can be built based off this data. Thanks..
- MilkMp 8mo agoHey there, yeah, definitely. I maintain .txt change logs for all data modifications. To be clear, no information is added or altered — the Factbook content is exactly what the CIA published. The parsing process structures the raw text into fields (removing formatting artifacts, sectioning headers, and deduplicating noise lines), but the actual data values are untouched. What I've added on top are lookup tables that map the CIA's FIPS 10-4 codes to ISO Alpha-2/3 and a unified MasterCountryID, so the different code systems can be joined and queried together. I will add them to the github :)
- freakynit 8mo agoAwesome. Thanks so much..
- srinath693 8mo agoThis is how Show HN should work. Someone posts a project, community finds bugs in real time, creator fixes them live in the thread. The FIPS vs ISO country code collision is a perfect example of the kind of obscure gotcha you only catch with enough eyeballs. Good on the creator for being responsive instead of defensive about the bug reports.
- jddj 8mo agoAnd despite all of that this is an LLM comment, right?
- ZoneZealot 8mo agoYep, all their comments are LLM output. As well as their alt https://news.ycombinator.com/threads?id=ruhith https://news.ycombinator.com/threads?id=ruhith Both accounts are used to advertise their website.
- motoboi 8mo agoThis is not AI slop, it’s advertise in LLM era.
- hamdingers 8mo agoNegative parallelism https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing#Negative_parallelisms https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing#...
- randomtoast 8mo agoThe entire Factbook Archive was written by Claude Code, as you can see in the GitHub commit history: https://github.com/MilkMp/CIA-World-Factbooks-Archive-1990-2025/commits/main/ https://github.com/MilkMp/CIA-World-Factbooks-Archive-1990-2... AI is present everywhere these days. I wouldn’t be surprised if a OpenClaw bot autonomously create a project on GitHub and then submit it to HN, without any human involement.
- dbg31415 8mo agoThis is one of the hardest sites I’ve ever tried to read. The pages are dense blocks of tiny gray serif text with default line height and almost no visual hierarchy. It feels like gray text on gray blobs. It is exhausting to scan and read. In 2026, this should not be an issue. We have clear standards. The Web Content Accessibility Guidelines (WCAG) exist for a reason. Basic accessibility best practices have been documented for years. https://wave.webaim.org/report#/https://cia-factbook-archive.fly.dev/ https://wave.webaim.org/report#/https://cia-factbook-archive... The issues are not subtle. Small text, low contrast, and long unbroken paragraphs are not design preferences. They are barriers. They make the content harder to read for everyone, especially people with visual or cognitive challenges. This is fixable. Increase the base font size. Improve contrast ratios. Add meaningful spacing. Use clear headings and structure. These are foundational usability principles. Accessibility is not extra polish. It is baseline quality. Right now, the site is unnecessarily hard to read. That is a design problem, not a content problem.
- globalise83 8mo agoMy guess is that the current administration has deleted all internal data from the CIA World Factbook to prevent any attempt to revive it in future. Would be amazing if the next US administration were to use this archived data to rebuild it.
- Barbing 8mo agoWonderful project. Thank you for the preservation!
- knuckleheads 8mo agoThe very first program I ever wrote that I was proud of was a CIA world factbook scraper and report generation script in High School. A hard ass of a teacher had people grab a random assortment of facts about random countries on there and put it all into word, under the guise that it taught you something about the countries. It was entirely formulaic and I remember the lightning realization I could use the Java I was learning in AP class. I made a bet with my roommate that I could write the program to do it faster than it took him to actually do it. I went over by a half hour, but I posted it to facebook and there was much rejoicing in the class.
- tolerance 8mo agoThis is clearly a vibe coded project. If I were to critique it taking its warm reception into consideration I wouldn’t necessarily call it slop. Slurry? Soup? A good portion of the discussion here are bug reports about things I could imagine someone who has experience in working with this sort of data would anticipate and address in the flow of development, whether on their own or with an LLM. Yes it is an ambitious project, yes it is useful in theory, but I’m interested in its viability as a legitimate tool for the sort of people who would rely on it for research purposes as opposed to the sort of people who find it a fascinating project but in practice it is little more than something to pique their curiosity—a toy. At the same time maybe it doesn’t have to be either. It could just be a display of the initiative and ingenuity of the person behind it. But little else can be inferred about them I reckon.
- MilkMp 8mo agoHi there, yes I used AI to help build this website. I personally don’t have the time nor the talent to build something like this from scratch! I do have knowledge in how historical and crime data are suppose to parsed,viewed, analyzed, and presented to the world :) If someone would like to take this work and improve it, please do!
- WhereIsTheTruth 8mo agoTreating this as a neutral ground truth is a recipe for data poisoning
- WhereIsTheTruth 8mo agoClassic hackernewers ;)
- devcraft_ai 8mo ago[flagged]
- iririririr 8mo agoWas it still relevant after Wikipedia? Honest question. edit: I mean, not the archive, that's golden! But a branch of usa propaganda being the stop gap provider on geographic data.
- thedudeabides5 8mo agothank you
- deleted 8mo ago[deleted]
- oxfeed65261 8mo agoThis is fantastic! I would greatly appreciate an optional light mode / non-dark mode. I know a lot of folks love dark mode, but I find it very hard to read. Thanks so much for this!