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.

Ask HN: Why do companies typically provide APIs but not clients or specs?

8 pointsby whitfieldsdadalmost 2 years ago
I&#x27;ve noticed that the bulk of my time as a software developer these days is spent reverse engineering third-party REST APIs that don&#x27;t already have a publicly available API client or publicly available API specification (e.g. OpenAPI).<p>Why don&#x27;t more companies publish either a specification for their API or an API client on a website like GitHub?<p>For small shops with a few engineers, this makes sense, but for companies that we&#x27;re paying &gt; $100,000&#x2F;yr. for access to their APIs, it seems like they should also provide an API client for interacting with it - or at the very least, API documentation.<p>What are the main barriers preventing more companies from releasing either a specification for their APIs or an API client?<p>Are APIs easier to reverse engineer these days, and therefore it&#x27;s not really necessary to release a client or specification?<p>On the other hand, maybe writing a full-fledged API client is an anti-pattern, since callers could simply implement the functionality that they need rather than implementing all of the functionality that they think that they MIGHT need while still reverse engineering the API?

5 comments

rattrayalmost 2 years ago
It&#x27;s just a ton of work to make a good SDK in every major language.<p>Something I haven&#x27;t seen mentioned much on this thread is that the ~top feature people want from SDKs at this point is good static types – so you can get autocomplete, docs-on-hover, etc in your editor. Way better than switching back and forth to the docs and crossing your fingers.<p>Doing that well means copying every little change into the SDKs (forget about it) or using a generator.<p>The open-source codegen tools (ie, <a href="https:&#x2F;&#x2F;openapi-generator.tech&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;openapi-generator.tech&#x2F;</a>) are pretty crappy, so you need to either build the SDK yourself fully, or spend a bunch of time wrestling with the generator get it halfway-decent, and then you&#x27;re still letting your customers&#x2F;developers down.<p>Disclaimer, I&#x27;m starting a company to make it easy for anyone to ship a great SDK with their REST API: <a href="https:&#x2F;&#x2F;stainlessapi.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;stainlessapi.com</a>
评论 #37068784 未加载
评论 #37072899 未加载
injbalmost 2 years ago
I presume you&#x27;re talking about REST apis? If that&#x27;s the case then virtually every language has a client built in. That&#x27;s part of the advantage of using HTTP from the API vendor&#x27;s point of view.<p>As far as publishing a spec, I don&#x27;t know but I&#x27;m guessing part of it is a reluctance to commit to anything (which does kind of defeat the purpose of a public API).
评论 #37066659 未加载
dandevsalmost 2 years ago
&gt; Why don&#x27;t more companies publish either a specification for their API or an API client on a website like GitHub?<p>Being API-first and caring about the developer experience (DX) is still a new phenomenon. Companies like Twilio and Stripe differentiated in DX. Now there&#x27;s a whole category of API-first startups like seam.co (API for IoT devices), merge.dev (unified API for 180+ integrations), and stytch.com (API for authentication) who publish API clients in major languages like Node.js, Python, Java, and Go. They also publish their OpenAPI specs in case you use a long-tail language and want to generate a client yourself.<p>IMO, in the next 5 years, it&#x27;ll become the norm to offer clients if you have a public REST API.
pesfandiaralmost 2 years ago
Priorities. And MBAs.<p>&gt; for companies that we&#x27;re paying &gt; $100,000&#x2F;yr. for access to their APIs<p>Case in point; they didn&#x27;t need to provide any of that for you to pay. The value is coming from elsewhere, and they didn&#x27;t think the extra upfront and ongoing cost of providing a client or docs is worth it.
mcdonjealmost 2 years ago
I can&#x27;t imagine how or why a company would implement libraries or tools to help their clients consume their data. The API is the interface. Every client is doing something different with it.<p>I do agree that many companies can design and document their APIs better.
评论 #37068065 未加载