News for hackers. Stuff that matters.

Ask HN: What Would you want in a government API?

I'm marveling over the new whitehouse.gov and thinking that the government should have an API. I imagine it would create a thousands of government jobs, boost every sector of hardware sales, foster the creation of thousands of start ups and bring accountability and transparency to government, among other things. I'd say my first request would be this function:

getEveryDollarSpent, which would accept as parameters paidTo, authorizedBy, minDollars, maxDollars, dateFrom and dateTo.

What's yours?

( 39 comments | 36 points | on HN )
Re:Ask HN: What Would you want in a government API? by jcarbaugh on Tuesday January 20, 2009 @02:18PM (#442109)
This isn't quite getEveryDollarSpent, but check out http://usaspending.gov/. The site tracks all federal contracting dollars spent. It has an API and a fairly detailed set of data.

Rather than one giant government API, we will probably see each agency slowly create more meaningful ways to get at their data. I expect there to be some exciting open data initiatives from the Obama administration.

Re:Ask HN: What Would you want in a government API? by ALee on Tuesday January 20, 2009 @03:04PM (#442177)
jcarbaugh won't say this, but the Sunlight Foundation to which he works for is pretty much pushing the government to adopt API standards. They were the folks who were partially responsible for this great link among other amazing products.
Re:Ask HN: What Would you want in a government API? by jcarbaugh on Tuesday January 20, 2009 @09:44PM (#442685)
I've been outed! And there goes my plan to covertly push my radical government transparency agenda. Damn you, ALee!

I've only been involved in this for a little under two years and it is amazing to see how quickly the government has become interested in open data. There is still a LONG way to go, but I think we are going to see some great things in the coming years.

Re:Ask HN: What Would you want in a government API? by jfarmer on Tuesday January 20, 2009 @05:00PM (#442370)
At the bottom of the page: "The White House. President George W. Bush."

Someone should get on that. :D

Re:Ask HN: What Would you want in a government API? by rrhyne on Tuesday January 20, 2009 @02:23PM (#442113)
Great link!
Re:Ask HN: What Would you want in a government API? by lacker on Tuesday January 20, 2009 @03:25PM (#442213)
How about letting me give the government my email, and then they could email me instead of snail mail, or let me see government correspondence with me online.

A friend of mine got a traffic ticket that he paid incorrectly, and had a wrong address on file. A year later he got arrested during a random broken-taillight stop with a ridiculous amount of late fees. He asked if he had any other tickets outstanding, and they said they couldn't tell him - there was no system for lookups like that. He could only make sure he had the right address on file and wait for further mail. That's a pretty ridiculous system.

Re:Ask HN: What Would you want in a government API? by pavel_lishin on Tuesday January 20, 2009 @03:52PM (#442267)
I don't know about e-mail - I've been locked out of several accounts, and have had a few scary false-positives with my spam filter.

On the other hand, I doubt any spam is going to come from a .gov domain...

Re:Ask HN: What Would you want in a government API? by xenophanes on Tuesday January 20, 2009 @03:57PM (#442270)
Email in addition to what we have now would only help, even if 30% of the emails sent weren't received.
Re:Ask HN: What Would you want in a government API? by Jebdm on Wednesday January 21, 2009 @03:50PM (#443780)
I think the dangerous part is when other people receive them.
Re:Ask HN: What Would you want in a government API? by smhinsey on Tuesday January 20, 2009 @04:36PM (#442337)
I would like to see a "profile" style portal which can be linked to any relevant Federal programs I am involved with, from Social Security to my tax burdens with the IRS.

Primarily I would like this to be a single-service type situation where I can choose to go paperless and conduct all correspondence electronically (if I still need to send in the occasional signature such as you do when you e-file your tax returns, so be it). I'd like to see timeline or email based metaphor for interacting with this correspondence. It should include IRS, passport, immigration, the entitlement programs, the VA, whatever your interactions with the fed cover, it should cover.

There is no reason this couldn't share authentication with my state & municipal governments as well. I would like to see a seamless portal for interaction with government at all levels, while each level retains their own autonomy of implementation. If this is 10 years out on the timeline, that is fine, but I do want to see progress made. Start small if you must, but start.

Re:Ask HN: What Would you want in a government API? by jonursenbach on Tuesday January 20, 2009 @02:15PM (#442104)
I vote for the API equivalent of "svn blame".
Re:Ask HN: What Would you want in a government API? by corentin on Wednesday January 21, 2009 @07:03AM (#443103)
It would be easy to implement:

return (DEMOCRATS == current_administration) ? REPUBLICANS : DEMOCRATS;

Re:Ask HN: What Would you want in a government API? by diN0bot on Tuesday January 20, 2009 @02:28PM (#442119)
i'd be glad to have an API at all. right now, if you want to get donation reports on attempted congressional members you have to go to d.c. in person and individual print each report on their printer and pay for it. it is effectively impossible for any one to accomplish without thousands of dollars plus hundreds of hours. oh yeah, and the reports are images, so then you have to translate them into data.

the more APIs the better. definitely tracking money is vital, since we've all come to assume the government is in evil corp's pocket.

Re:Ask HN: What Would you want in a government API? by gaius on Tuesday January 20, 2009 @02:27PM (#442117)
shutdown()
Re:Ask HN: What Would you want in a government API? by corentin on Wednesday January 21, 2009 @06:59AM (#443099)
I'd say it should be:

taxes shutdown()

but I have a feeling it would be void shutdown()...

Re:Ask HN: What Would you want in a government API? by GrandMasterBirt on Tuesday January 20, 2009 @10:19PM (#442728)
This is a quote from my friend's law professor:

"We have courts and trials because at some point we decided to trade in our shotguns for lawyers to settle disputes"

In other words shutdown() returns a Shotgun. (I am refining the API here)

Re:Ask HN: What Would you want in a government API? by ambition on Tuesday January 20, 2009 @11:49PM (#442830)
I'd like to see citizens issued with official public/private cryptographic key pairs. I think this would have the potential to hamper identity theft, enable legally meaningful electronic signatures, and bring encrypted/authenticated communication to the public.
Re:Ask HN: What Would you want in a government API? by olefoo on Wednesday January 21, 2009 @02:32AM (#442941)
It could be like a driver's license for the internet, and a post office franking mechanism at the same time.

Although seriously now would you want every blog comment tied to you with a digital signature, provably yours forever?

Re:Ask HN: What Would you want in a government API? by corentin on Wednesday January 21, 2009 @06:58AM (#443098)
> I imagine it would create a thousands of government jobs, boost every sector of hardware sales, foster the creation of thousands of start ups and bring accountability and transparency to government, among other things.

The money you need to fund this stuff has to come from somewhere; hence destroying thousands of non-government jobs, slowing down every other sector of the economy and preventing the creation of thousands of startups.

Re:Ask HN: What Would you want in a government API? by jhancock on Tuesday January 20, 2009 @02:50PM (#442156)
Full Text Search
Re:Ask HN: What Would you want in a government API? by pg on Tuesday January 20, 2009 @03:14PM (#442202)
and permalinks.
Re:Ask HN: What Would you want in a government API? by geuis on Tuesday January 20, 2009 @04:11PM (#442295)
A congressional api. Pass either a lawmakers name and get their voting record. Pass a zip code to get the lawmakers for your area. Pass a bill # to get relevant data, etc
Re:Ask HN: What Would you want in a government API? by ontilt on Tuesday January 20, 2009 @05:30PM (#442398)
Re:Ask HN: What Would you want in a government API? by parlin on Tuesday January 20, 2009 @06:45PM (#442459)
A live feed of who gives funding to campaigns or any politician would be great. Thanks.

What if ALL contributions were reported on a public twitter feed-ish service? (and a timeline)

Oh, and an api for that data would be sweet too.

Re:Ask HN: What Would you want in a government API? by Shamiq on Tuesday January 20, 2009 @02:07PM (#442092)
I'm all for accountability, but I also think added bureaucracy is a waste of money. Someone has to pay for these new jobs, and I can't tell whether this will return more than it costs to set up.
Re:Ask HN: What Would you want in a government API? by jhancock on Tuesday January 20, 2009 @02:49PM (#442155)
the way I read it, the OP's "new jobs" would be jobs created in the private sector by people making use of the data. I don't think he was referring to the cost of creating the API itself.

The API could be created as a F/OSS project and be done with that line item ;).

Re:Ask HN: What Would you want in a government API? by rrhyne on Tuesday January 20, 2009 @02:18PM (#442107)
No problem. We can specify all properties are read only, that way we avoid any added bureaucracy.
Re:Ask HN: What Would you want in a government API? by mooism2 on Tuesday January 20, 2009 @07:37PM (#442523)
At a different level of government, I'd like a real-time public transport api. Tell me where all the buses and trains are right now, and let me make sense of it for my website's visitors.
Re:Ask HN: What Would you want in a government API? by dfranke on Wednesday January 21, 2009 @12:21AM (#442856)
For the bay area, this exists. http://transit511.org
Re:Ask HN: What Would you want in a government API? by mooism2 on Wednesday January 21, 2009 @05:10AM (#443030)
You mistyped the link? That seems to be a spam domain.

In London we have http://journeyplanner.tfl.gov.uk but there is no api and the user interface is shoddy.

Re:Ask HN: What Would you want in a government API? by dfranke on Wednesday January 21, 2009 @05:14AM (#443032)
I missed a dot. It should be http://transit.511.org. Past the edit deadline unfortunately.
Re:Ask HN: What Would you want in a government API? by mooism2 on Wednesday January 21, 2009 @06:06AM (#443068)
Thanks.

There doesn't seem to be an api mentioned anywhere on that site. It appears to be for end users only. Am I missing something?

Re:Ask HN: What Would you want in a government API? by rrhyne on Tuesday January 20, 2009 @09:59PM (#442703)
Google is got or rather is getting that one done.
Re:Ask HN: What Would you want in a government API? by altrux on Tuesday January 20, 2009 @03:06PM (#442185)
voting records, and USGS information would be nice too
Re:Ask HN: What Would you want in a government API? by rokhayakebe on Tuesday January 20, 2009 @04:59PM (#442367)
Law. Location. I want to search what the Law says about the keywords/phrase I submit. This way next time a cop is trying to bs me, I can pull the phone, and double check what's the law in regards to it.
Re:Ask HN: What Would you want in a government API? by jderick on Tuesday January 20, 2009 @04:42PM (#442346)
Before we worry about an API, how about some decent blogs?
Re:Ask HN: What Would you want in a government API? by DanielBMarkham on Tuesday January 20, 2009 @06:42PM (#442454)
bullshitMe, which takes as parameters my SSN and returns a load of political crap geared especially for my demographic.

Could eliminate a lot of political grunt work and save money come the next election. It would also provide excuses for practical things, like why the potholes aren't fixed or the budget is still unbalanced.

I'm also all for simplifyAgency, which takes an Agency name and returns a list of functions that the agency does. So I could call simplifiyAgency("IRS") and receive a list of APIs the IRS exposes.

Or how about something extremely practical? Give us access to all of that GIS and USGS data in a simple format. You know, the data that is in the public domain but companies make a killing re-selling us.

Re:Ask HN: What Would you want in a government API? by time_management on Wednesday January 21, 2009 @12:54AM (#442874)
You're already doing it wrong. Camel caps? Eww.

uglyAsFuckAndAlmostUnreadable -> fail. acceptable_using_underscores -> better. using-hyphens-as-lisp-does -> great.

Re:Ask HN: What Would you want in a government API? by rrhyne on Wednesday January 21, 2009 @02:45AM (#442947)
heh.