API:Licensing

There are several aspects to the copyright and licensing of information you retrieve or edit through an API.

The entry points to APIs (e.g. [/api.php //api.php] should present this information (T42459 "Wikimedia [action] API makes no mention of terms of use or licensing information")

Content you retrieve through the API
You should properly provide credit for content you retrieve through the API. In general has the same license as reported on the wiki from which you retrieved it. This license is displayed in the footer of pages, for example, 's content license is shown at the bottom of main namespace pages, it is MediaWiki:Wikimedia-copyright and currently shows ""

The content license may be different in different pages and areas.
 * For example,on the  public-domain help pages such as Help:Images are deliberately licensed under a less restrictive license  to make it easier for help content to be reused on other MediaWiki installations without any restriction:"Contributions to the PD Help are released as public domain via the CC0 waiver.'"
 * Similarly, the facts on Wikidata are under a different license than other content, hence the footer on Wikidata pages is different. it displays"All structured data from the main and property namespace is available under the Creative Commons CC0 License; text in the other namespaces is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply."

The "free open knowledge" content you will be retrieving, in general, will be from the main namespace of a wiki.

rightsinfo query
You can programmatically determine the general license of content on a wiki by querying for the  meta property of the wiki.

This does not take into account different copyrights asserted in different namespaces, as described above.

Reuse of multimedia content
In the case of multimedia files, the use to which the media is put affects the "fair use" defense of it. Presenting an image that contains another company's logo with the intent to make it appear that your service is being offered by that company may be a violation, even if the image is published with a liberal license.

Creating content through APIs
Using the APIs you can also put new data on the server. Such edits fall under the Terms of Use of the server, just as if a human being edited the wiki. For example, on. the footer MediaWiki:Wikimedia-copyright references the terms of use at Terms of use, requiring you for example to not cause harm to Wikimedia infrastructure. While you're editing, the message MediaWiki:Wikimedia-copyrightwarning contains additional guidance.

API documentation
The generated documentation for the API generally falls under the license of the code implementing the API, for example GPL v2 and above. (You're unlikely to reuse this, unless you build your own API libraries on top of)
 * MediaWiki action API modules help display a "License:" link that gives this license, for example Special:ApiHelp/query+textextracts shows a link to Special:Version/License/TextExtracts for the API module provided by the TextExtracts extension.