Policies/en/API-Usage-Guidelines
This is a draft version. Source: adapted notably from the Wikimedia Foundation Governance Wiki, https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_API_Usage_Guidelines (CC BY-SA 4.0), with changes. Status: proposal, to be adopted. See the detailed disclaimer.
In simple words: computer programs (bots, scripts, apps) can read the published content of the platform through technical doors called APIs. This page proposes the rules for using those doors: do not overload the servers, identify your program, respect the content licenses. It also proposes a WikiDeal specific rule: outside programs could read, but not modify, the platform; only one internal AI service, managed by WikiDeal, could write to it.
API usage guidelines
APIs
The Ynternet.org Foundation intends to enforce limits on operators' use of the APIs of the WikiDeal Markets and Portals (collectively, "the Platform"). Some of these limits are described below. The limits in this policy would exist to maintain the performance and stability of the APIs, to promote the fair allocation of server resources, and to ensure that community members can use the APIs to further the mission of the Platform.
In this policy, an "operator" is defined as any person who deploys software that causes the APIs to be called. In other words, the operator controls how often the APIs will be called. For example, this includes people who write on-wiki "gadgets" (even if they do not run them), and people who run bots (even if they did not write them). If limits are imposed on an operator's use, they may not circumvent these limits. For example, operators are required to follow all instructions to delay or reduce the rate of further requests they receive in a response from an API. The specific numerical limits on any endpoint may change from time to time (for example, as current and predicted future load changes).
When using the Platform APIs, an operator must:
- Correctly identify and label user agents, with up-to-date contact information;
- Follow rate limiting requests (for example, throttling notifications) they may receive;
- Follow the requirements of the content licenses when republishing downloaded or cached data; and
- Behave responsibly if their software is automatically consuming content at a large scale.
When using the Platform APIs, an operator must not:
- Send traffic via concurrent connections to the APIs resulting in a degradation of service to others or endangering the stability of the site;
- Request data at a high rate, far beyond common use cases, such as in spikes or in a manner intentionally meant to circumvent this policy;
- Spread API requests over multiple user agents to hide excessive use by a single operator; or
- Send high traffic originating from a single source or targeting a specific Market, Portal or resource that ends up blocking others from using or accessing that resource.
Operators should use the APIs within the guidelines described in this policy and other technical documentation for each API. For the avoidance of doubt, the existence of this policy would not require members of the WikiDeal community to get prior permission before using the APIs in a manner consistent with this policy. Rather, the aim is that people be aware of uses that could result in disruption of their API usage, so operators know how to use the shared resources of the Platform properly.
If your use case might fall outside the bounds of the policy described here and you would like to receive an exception or clarification, please submit a request to info@wikideal.net.
In situations where a limit may affect an operator's use, the Foundation may contact the operator to discuss the nature of the limits and any exceptions that may be needed. This is only possible if the operator's scripts include up-to-date contact information.
The Foundation would reserve the right to enforce this policy through blocking API access, disabling a program, or any similar action. Any choice to take or not take an enforcement action in a given situation would not be a waiver of any future action under this policy. In situations when this policy is enforced, any action taken could be lifted at the Foundation's discretion if the requesting party takes action to reduce the harm or unfairness caused. For example:
- Reducing the rate of the API requests being sent;
- Implementing an exponential backoff, where a throttling notification is sent to the operator, and in response, they slow down their rate of requests automatically; or
- Following user agent naming conventions, such that the operator can be contacted if usage becomes problematic.
WikiDeal specific provision: read-only third-party access
This section is specific to WikiDeal and has no equivalent in the source policy. It follows the initial hypothesis recorded in the Key questions:
- Third-party bots, scripts and API clients could read the published content of the Platform, within the limits described above, but could not modify it: no takeover of the wiki by third-party bots or APIs is intended to be allowed.
- Only one internal AI service, WikiDeal Internal AI, managed by WikiDeal, could modify the wiki through programmatic means.
- Delegating control of a user account through an API would not be allowed.
Sub-licensing
Operators (or those acting on their behalf) may not sublicense, lease, assign, or guarantee the availability or functionality of a Platform API to any third party. It is not permissible to implement an API client that white labels in a manner that obscures the identity of the ultimate service provider of the APIs. For the avoidance of doubt, this term does nothing to limit the use and republication of the published content of the Platform in accordance with the free licenses that content is licensed under.
Retiring APIs
The Foundation may retire or modify APIs. Operators that use APIs beyond an announced end-of-service date should expect the API to become unavailable without further warning or to experience significant degradation in performance. It is expected that operators update to use appropriate alternatives in advance of the end-of-service date. The Foundation may provide notice regarding updates and deprecations of APIs to the contact information that is provided per the user agent requirements.
Modifications to this policy
This policy is intended to be a public summary of some of the limitations imposed on operators regarding their use of the Platform APIs. As such, it could be modified to more fully describe current limits or reflect future changes, following the process described in the Terms of Use proposal.
See also
- Terms of Use, section 12 (API terms)
- Key questions (infrastructure policies and the WikiDeal Internal AI exception)
- All policies