creative-commons
Comply with CC-BY-NC 4.0 while building API
<p>I'm building an API using content shared under CC-BY-NC 4.0 license (one of Wikia's wikis). An API is basically a webpage designed to be read by machines, not by people, so no advice from <a href="https://wiki.creativecommons.org/wiki/Category:Filetype" rel="nofollow">CC wiki</a> actually aplies to my case, because, in the API, there is no markup, just pure data. How should this be resolved? </p>

<ul>
<li>Should the licensing data be included in every response read by machine, even though machine will ignore it?</li>
<li>Or should the licensing info be available when whoever develops client software, asks for it specifically (like an additional parameter in URL)?</li>
<li>Should the licensing info be part of the response body, or should it be part of response headers(I prefer the latter if it doesn't matter)?</li>
</ul>

<p>The terms of the licence (in simple form are):</p>

<blockquote>
  <p>Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.</p>
</blockquote>

<p>Something that I think you are confusing is that there are actually two things that you are producing that are subject to copyright:</p>

<ul>
<li>Your code </li>
<li>The web page your code generates (the fact that it is intended for machine rather than human reading is irrelevant - it is still a document to which copyright applies.</li>
</ul>

<p>It is probable that the CC-BY-NC only applies to your code which only people with access to your server (or github repository) will see - it is there that the attribution, the link to the licence, and an indication if changes were made needs to be provided. A "licence.txt" file will do this nicely.</p>

<p>The web page you generate is your own creation (probably) and not subject to the licence - in is copyright you and you can licence it however you want. If you want to licence it then the header is the place to put the details.</p>
