Live data from Hacker News

API Discovery: Can we do better?

blog.apis.guru

11–20 of 47 posts

Re: API Discovery: Can we do better?

#11
post #6

Earlier quoted context omitted.

Would you mind to share a link for that? I am very interested as I work on different projects with swagger apis.

Here is the main site: https://apis.guru And here is github repo: https://github.com/APIs-guru/openapi-directory

thanks a lot!

Re: API Discovery: Can we do better?

#12
I put together a side project some time ago that allows you to retrieve and display arbitrary API endpoints, to create a dashboard of realtime data.

One of the bigger challenges was finding appropriate APIs to use. The idea being that it had to make sense as a realtime datapoint. Current temperature in California is one example.

Part of the solution I tried for the end user was to add a searchable database of APIs, but I never found many that had that kind of realtime datapoint. The majority of use cases for APIs seems to be CRUD apps, authentication, unchanging datasets, or really specific once off data transforms.

I feel like that's a bummer, as I really love the idea of being able to build up a dashboard of random data points about the world that interest me. The number of astronauts currently in space, the temperature somewhere I like to visit, the traffic density on specific roads. All retrievable individually from various apps, but not in one scifi intelligence center style place.

For anyone interested, the site was https://apiblocks.com

Re: API Discovery: Can we do better?

#13
This looks really great for discoverability that works within the web platform already, without the need for inventing a new format [0].

However, I'm not sure if this goes far enough. There exist some formats for describing what APIs can do in natural language, though I'm not convinced that they're really that useful [1][2].

[0] http://apisjson.org [1] http://alps.io [2] http://restdesc.org

Re: API Discovery: Can we do better?

#14
post #9

What about https://schema.org/APIReference ? Doesn't seem to be widely used, but exists.

I think HTTP-based APIs are closer to a service than an library with a public interface, even though the term API can be used interchangeably for both: https://schema.org/Service

Re: API Discovery: Can we do better?

#15
> Then you automatically assume it’s a REST API using JSON payloads. Who’s doing anything else nowadays?

I'm seeing people using GraphQL[1] more these days, which also solves the problem of API schema discovery because it's one endpoint with built-in introspection[2].

[1] https://graph.cool/

[2] http://graphql.org/learn/introspection/

Re: API Discovery: Can we do better?

#16
I am pretty sure there are a few API marketplaces out there where its easy to see pricing and code all at once, without having to browse around like a mad person, just like amazon has done it for shopping, with reviews, ratings and q&a.

Re: API Discovery: Can we do better?

#17
We are working on a IBM "catalog" at IBM Research called API Harmony: https://apiharmony-open.mybluemix.net/

One of our goals is to mine information about APIs, rather than relying on user input (hence the "catalog"). We still have a long way to go, though. In Web API land, many things follow a power-law distribution: for a few well-known APIs, a lot of information can be found (https://apiharmony-open.mybluemix.net/apis/instagram). For many other APIs, information is sparse and hard to mine.

Adding Schema.org (or similar) annotations would help. But it may be as hard to convince providers to do this, as it is to convince them to write OpenAPI specifications (or similar).

Re: API Discovery: Can we do better?

#20

I wonder if the author knows about Swagger specs; They also started the OpenAPI initiative[0]. I now have wrapped a couple of API's in swagger and using swagger-ui to create beautiful interactive api docs for users. Moving forward I'm going to wrap most of our legacy systems around a swagger spec'ed API and discontinue any alternative access to these systems as time goes by. [0]: http://swagger.io/introducing-the-ope…

Swagger has been great in my personal usage. If google started indexing your swagger spec and made a search widget for it, that would really push it to critical mass.
Post reply on HN