APIs may be copyrightable, but the U.S. Supreme Court has never actually said so. In Google LLC v. Oracle America, Inc. (2021), the Court assumed without deciding that API code could be protected by copyright, then ruled 6–2 that Google’s copying of roughly 11,500 lines from Oracle’s Java API was fair use.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus So the underlying question is still open. Whether copying an API exposes you to liability depends on what part of the API you copy, how much, and what you build with it.
Why APIs Sit in a Legal Gray Zone
An API is a set of rules that lets one piece of software talk to another. When an app pulls a weather forecast from a weather service, the API handles the handshake. Developers rely on APIs constantly because they make it possible to build on existing services instead of recreating everything from scratch.
Copyright protects original creative works fixed in some tangible form, whether on paper, on a hard drive, or in the cloud.2U.S. Copyright Office. What is Copyright The law explicitly excludes ideas, procedures, systems, and methods of operation from that protection.3Office of the Law Revision Counsel. 17 USC 102 – Subject Matter of Copyright In General APIs live on that border. A person wrote the code, making creative choices about naming, grouping, and organizing thousands of functions. But the code also has an intensely functional job: it’s the mechanism that lets programs communicate. That dual nature is why the Google–Oracle fight ran for more than a decade.
Declaring Code vs. Implementing Code
The distinction at the center of the case separates two layers of an API. Implementing code is the part that actually tells the computer how to perform a task. It can run hundreds of lines for a single function. Declaring code is the naming and organizing layer. It assigns each task a name and a location within the API’s overall structure, so when a programmer types a command, the system knows which implementing code to run.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
Think of implementing code as the recipe that produces a dish, and declaring code as the menu that groups dishes into categories and gives each one a name. Google wrote its own implementing code from scratch. What it copied was the declaring code for 37 Java API packages: about 11,500 lines, or 0.4 percent of the 2.86 million lines in the full API.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus Google copied that layer so the millions of programmers who already knew Java could use their existing skills on the new Android smartphone platform without starting over.
What the Supreme Court Actually Decided
Rather than rule on whether API declaring code is copyrightable, the Court assumed it could be and moved directly to fair use. Justice Breyer, writing for a six-justice majority, walked through the four statutory fair use factors and found that all four favored Google.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
Nature of the Work
The Court held that declaring code, as part of a user interface, sits further from copyright’s core than most software. Its value comes largely from the time programmers invest in learning the system, not from the creative expression of the author. That made it more like a functional building block than the kind of creative work copyright is designed to reward.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
Purpose and Character of the Use
The Court found Google’s copying transformative. Google took the declaring code and used it to build a new platform for a different computing environment (smartphones) that didn’t exist when Oracle designed the Java API. The goal was to let programmers apply their Java knowledge to create new applications for mobile devices.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
Amount Copied
Google copied nearly all of the declaring code for the 37 packages it used, which sounds substantial. But those 11,500 lines were only 0.4 percent of the full API, and the Court concluded that Google copied only what was necessary to let programmers use their existing skills in the new Android environment. Copying less would have defeated the point.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
Market Effect
Oracle argued Android destroyed its Java licensing revenue. The Court found the picture more complicated. Oracle’s Java SE was built for desktop and laptop computers, and Oracle had tried and failed to build a successful smartphone platform. The majority concluded that Oracle’s ability to compete in the mobile market was uncertain, and that giving Oracle control over the declaring code could harm the public by locking programmers into a single platform.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
Justice Thomas, joined by Justice Alito, dissented (Justice Barrett was recused). Thomas argued the majority effectively gutted copyright protection for declaring code by treating it as second-class because programmers had invested time learning it, and warned that any reimplementation of an interface could now claim the same transformative justification Google did.1Supreme Court of the United States. Google LLC v. Oracle America, Inc. Syllabus
What This Means If You Want to Reimplement an API
The practical takeaway is narrower than the headlines suggested. The decision validates what much of the software industry treated as longstanding practice: reimplementing an API’s interface so that programmers can bring existing skills to a new platform.4Library of Congress, Congressional Research Service. Google v. Oracle – Supreme Court Rules for Google in Landmark Copyright Case If you’re building a product for a genuinely different computing environment and you copy only the declaring code needed for compatibility, you’re on the strongest possible ground.
The ruling does not mean all API copying is automatically fair use. Fair use is always a case-specific inquiry that weighs the purpose and character of the use, the nature of the work, how much was taken, and the effect on the copyright holder’s market.5Office of the Law Revision Counsel. 17 US Code 107 – Limitations on Exclusive Rights Fair Use Copying an entire API’s declaring code to build a competing product in the same market the copyright holder already occupies would look very different under that analysis. And because the Court never actually ruled that declaring code is uncopyrightable, a future court could find infringement where the use is less transformative than Google’s was. Some legal scholars have warned that lower courts might read the Supreme Court’s silence as tacit acceptance of the Federal Circuit’s earlier holding that APIs are copyrightable, which would leave fair use as the only defense available.
Terms of Service Can Bind You Even When Copyright Doesn’t
Copyright is only one layer of legal protection around APIs. Most providers also impose contractual restrictions through terms of service or licensing agreements. These contracts can restrict how you use the API, set usage quotas, require you to display certain branding, or prohibit you from using API data in competing products. Violating those terms can get your access revoked and, depending on the agreement, trigger a lawsuit for breach of contract.
Contract restrictions operate independently from copyright. Even if your use of an API would qualify as fair use, you can still violate a licensing agreement you accepted when you signed up. A developer who agreed to a platform’s terms and then exceeded usage limits or built a prohibited competing product faces a breach-of-contract claim regardless of whether the API code itself is copyrightable. The fair use analysis from Google v. Oracle offers no defense there.
What Infringement Costs If You Get It Wrong
If a copyright holder proves infringement and your use doesn’t qualify as fair use, the financial exposure is significant. A copyright owner can recover either actual damages plus the infringer’s profits, or elect statutory damages instead. Statutory damages run from $750 to $30,000 per work infringed, and if the court finds the infringement was willful, that ceiling rises to $150,000 per work.6Office of the Law Revision Counsel. 17 USC 504 – Remedies for Infringement Damages and Profits
Courts can also award attorney fees to the winning side, whether that’s the copyright holder or the defendant. In a case involving major API platforms, attorney fees alone can dwarf statutory damages. Before an infringement suit can be filed, the copyright owner must first register the work with the U.S. Copyright Office or receive a formal refusal of registration, so unregistered works face a procedural hurdle before litigation begins.2U.S. Copyright Office. What is Copyright
The Google v. Oracle litigation itself lasted more than a decade and reportedly cost both sides hundreds of millions of dollars in legal fees. That’s an extreme example, but it illustrates how high the stakes climb when major platforms are involved. For smaller developers, the more likely risk is a cease-and-desist letter or terminated API access, followed by contract-based claims that never reach the fair use question at all.