TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

API Discovery: Can we do better?

142 pointsby IvanGoncharovover 8 years ago

16 comments

psadauskasover 8 years ago
It sounds like what you&#x27;re describing is very similar to Hydra[1], which builds upon JSON-LD[2], which builds upon schema.org.<p>JSON-LD provides a vocabulary (schema) for linking various documents together, so you can for example link a blog post document directly to its author. Hydra then provides a vocabulary that lets you describe how to fetch that author document, what fields are required to create a new author object, and how to update the blog post to instead link to that new author. In this case, both &quot;author&quot; and &quot;blog post&quot; can be their respective schema.org documents.<p>[1]: <a href="http:&#x2F;&#x2F;www.hydra-cg.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.hydra-cg.com&#x2F;</a> [2]: <a href="http:&#x2F;&#x2F;json-ld.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;json-ld.org&#x2F;</a>
评论 #13006628 未加载
评论 #13014746 未加载
welderover 8 years ago
&gt; Then you automatically assume it’s a REST API using JSON payloads. Who’s doing anything else nowadays?<p>I&#x27;m seeing people using GraphQL[1] more these days, which also solves the problem of API schema discovery because it&#x27;s one endpoint with built-in introspection[2].<p>[1] <a href="https:&#x2F;&#x2F;graph.cool&#x2F;" rel="nofollow">https:&#x2F;&#x2F;graph.cool&#x2F;</a><p>[2] <a href="http:&#x2F;&#x2F;graphql.org&#x2F;learn&#x2F;introspection&#x2F;" rel="nofollow">http:&#x2F;&#x2F;graphql.org&#x2F;learn&#x2F;introspection&#x2F;</a>
评论 #13006510 未加载
评论 #13008935 未加载
oneweekwonderover 8 years ago
I wonder if the author knows about Swagger specs; They also started the OpenAPI initiative[0].<p>I now have wrapped a couple of API&#x27;s in swagger and using swagger-ui to create beautiful interactive api docs for users.<p>Moving forward I&#x27;m going to wrap most of our legacy systems around a swagger spec&#x27;ed API and discontinue any alternative access to these systems as time goes by.<p>[0]: <a href="http:&#x2F;&#x2F;swagger.io&#x2F;introducing-the-open-api-initiative&#x2F;" rel="nofollow">http:&#x2F;&#x2F;swagger.io&#x2F;introducing-the-open-api-initiative&#x2F;</a>
评论 #13005252 未加载
评论 #13006303 未加载
ewitternover 8 years ago
We are working on a IBM &quot;catalog&quot; at IBM Research called API Harmony: <a href="https:&#x2F;&#x2F;apiharmony-open.mybluemix.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;apiharmony-open.mybluemix.net&#x2F;</a><p>One of our goals is to mine information about APIs, rather than relying on user input (hence the &quot;catalog&quot;). 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 (<a href="https:&#x2F;&#x2F;apiharmony-open.mybluemix.net&#x2F;apis&#x2F;instagram" rel="nofollow">https:&#x2F;&#x2F;apiharmony-open.mybluemix.net&#x2F;apis&#x2F;instagram</a>). For many other APIs, information is sparse and hard to mine.<p>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).
评论 #13008104 未加载
ehntoover 8 years ago
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.<p>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.<p>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.<p>I feel like that&#x27;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.<p>For anyone interested, the site was <a href="https:&#x2F;&#x2F;apiblocks.com" rel="nofollow">https:&#x2F;&#x2F;apiblocks.com</a>
评论 #13006399 未加载
m3hover 8 years ago
Interesting thoughts. I&#x27;ve always liked if we could have something like an `api.txt` file on a website, just like we have a `sitemap` file.<p>The `api.txt` can simply be a text-based listing of links to API descriptions for all APIs exposed by that site publicly. Most API description formats already allow for the API name, category, endpoints, etc. so no need to reinvent the wheel there. A good idea would be to add the `&lt;link rel=&quot;api&quot; href=&quot;api.txt&quot; &#x2F;&gt;` tag on the webpage too. This would make discovery and cataloging much easier.<p>Some API cataloging sites have come up with interesting ideas. For example, there is a service <a href="https:&#x2F;&#x2F;sdks.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sdks.io&#x2F;</a> that can automatically generate SDKs right out of the API descriptions that they have crawled. It is powered by <a href="https:&#x2F;&#x2F;apimatic.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;apimatic.io&#x2F;</a>
评论 #13009503 未加载
tomc1985over 8 years ago
I find it strange that people regard APIs as their own thing. I have never &quot;searched the web&quot; for &quot;email APIs&quot;, in fact that whole sentence just sounds amateurish. Similarly what is all this tooling he refers to? WTF is an &quot;API console&quot;? Is that not curl?<p>One time, while interviewing a candidate, I picked a random buzzword on his resume (which happened to be API) and asked him to talk about it for a bit. He immediately launched into a mini-rant about all these crazy details with APIs that seemed to be foregone conclusions. Do people actually agonize over whether the API speaks XML or JSON? Or fret over the lack of a console? Are we talking about the same thing? You have an endpoint, you send it a request, you get back some data. WOW SO HARD!
评论 #13008864 未加载
评论 #13008865 未加载
评论 #13008775 未加载
orliesaurusover 8 years ago
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&amp;a.
评论 #13006295 未加载
zackmorrisover 8 years ago
While a lot of smart people are looking at this, I wanted to ask: does anyone know of any viable projects that build semantic data from existing websites?<p>I have experience with Open Graph <a href="http:&#x2F;&#x2F;ogp.me&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ogp.me&#x2F;</a> and oEmbed <a href="http:&#x2F;&#x2F;oembed.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;oembed.com&#x2F;</a> but something about humans having to manually categorize a site has never sat right with me. We should be able to grok structure from sites by how other sites refer to them, similar to what Google does. This may be related to open source search, I don&#x27;t know.
sapeienover 8 years ago
This looks really great for discoverability that works within the web platform already, without the need for inventing a new format [0].<p>However, I&#x27;m not sure if this goes far enough. There exist some formats for describing what APIs can do in natural language, though I&#x27;m not convinced that they&#x27;re really that useful [1][2].<p>[0] <a href="http:&#x2F;&#x2F;apisjson.org" rel="nofollow">http:&#x2F;&#x2F;apisjson.org</a> [1] <a href="http:&#x2F;&#x2F;alps.io" rel="nofollow">http:&#x2F;&#x2F;alps.io</a> [2] <a href="http:&#x2F;&#x2F;restdesc.org" rel="nofollow">http:&#x2F;&#x2F;restdesc.org</a>
BoppreHover 8 years ago
What about <a href="https:&#x2F;&#x2F;schema.org&#x2F;APIReference" rel="nofollow">https:&#x2F;&#x2F;schema.org&#x2F;APIReference</a> ? Doesn&#x27;t seem to be widely used, but exists.
评论 #13005897 未加载
ksavenkovover 8 years ago
Google supports around seven Schema.org entity types (<a href="https:&#x2F;&#x2F;developers.google.com&#x2F;search&#x2F;docs&#x2F;guides&#x2F;mark-up-content" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;search&#x2F;docs&#x2F;guides&#x2F;mark-up-con...</a>). I think they look at the user segments and people looking for APIs is not their main audience. Especially nowadays when AI and data science is much cooler than just software engineering ;-)
allthingsapiover 8 years ago
We discussed a similar problem with regard to the availability of swaggers and providers willing to do so <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11583377" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11583377</a>
detaroover 8 years ago
Semi-related question: is there a list of things that actually use Schema.org, outside of Google Search for some things?
评论 #13005084 未加载
评论 #13014822 未加载
评论 #13006385 未加载
miguelrochefortover 8 years ago
This is stupid. The solution is the semantic web.
评论 #13006584 未加载
评论 #13006426 未加载
angersockover 8 years ago
<i>&gt; But why does searching for APIs and restaurants differ so much?</i><p>Because--oh I don&#x27;t know--APIs aren&#x27;t restaurants?<p>Is this really a problem, or is this a tool to help lazy blub developers be even lazier and blubbier?<p>If you care enough about an API to worry about what things it does via the docs--and why aren&#x27;t you using a client lib anyways?--then you care too much to be satisfied with a simple sketch of the API via Google search results.