Does quoting documentation as comments in programming code qualify as Fair Use?
<p>Here's an example of how I might document a function call to some external API, external library etc. Their API may have T&amp;Cs, or the libary may force me to abide by a license, that's fine, but what about their documentation?</p>

<p>In the below example, <strong>I copy an extract verbatim from their website</strong>, in order to describe interaction with their code.</p>

<p>Does this qualify as fair use or fall under some other legal provision?</p>

<pre><code>// This is a string from external documentation, copied off a third party website
// It describes something meaningful about the api/dll etc I'm going to be calling here

func (s *foo) GetBars(id int) (Bars) {
    // todo implementation 
}
</code></pre>

<p>The <a href="http://choosealicense.com/licenses/mit/" rel="nofollow">MIT licence</a>, which is pretty permissive, still appears to only apply to the software. I think it's reasonable to include documentation in the same repository as the same "software", but what about supporting documentation on a website? (Note that this argument wouldn't seem to apply to web APIs, lets take <a href="https://help.github.com/articles/github-terms-of-service/" rel="nofollow">Githubs API terms of service</a> as an example, because there is not really any software being licenced.)</p>

<p>It's never been tested. I'd guess because the content owners don't care. Here's the basic structure of what an argument in favor of fair use (<a href="https://www.law.cornell.edu/uscode/text/17/107" rel="nofollow">17 USC §107</a>) would look like:</p>

<ul>
<li>The use is for communicating to future coders/readers what you're doing with that call. That use is non-commercial.</li>
<li>The original copyrighted work is descriptive, not being sold, and its intended audience is coders trying to understand the API.</li>
<li>The portion that is taken is a small part of the whole original and of not much value on its own when separated from the rest of the documentation.</li>
<li>Has no effect on the market of the original copyrighted work.</li>
</ul>

copyright software fair-use