Wikipedia Revision Compare API
Get Wikipedia Revision Compare data via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no proxies required. Powered by Wikimedia, configure supported query parameters and filters, and retrieve structured data including base revision identifier, target revision identifier, diff line number, diff record type code, and diff source text to review article edits, build a change viewer, and connect history to comparison.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
Wikipedia Revision Compare API
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Overview
Wikipedia Revision Compare API
Place the base revision ID in from and the target revision ID in to. The response contains diff records plus from and to revision metadata, including section references where provided.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | Required path: from and to, positive revision IDs from the same article. |
| Selected implementation | wikimedia · Wikipedia Revision Comparison |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Review article edits: Inspect source differences between two known revisions.
- Build a change viewer: Render diff records with revision identifiers and line context.
- Connect history to comparison: Use revision IDs from a separate article-history lookup.
Returned Data
| Field | Meaning |
|---|---|
from.id |
Base revision identifier |
to.id |
Target revision identifier |
diff[].lineNumber |
Diff line number |
diff[].type |
Diff record type code |
diff[].text |
Diff source text |
diff[].offset |
Source offsets for comparison |
from.sections[] |
Base revision section metadata |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request GET --get \
https://api.openany.si/v1/agent-apis/wikimedia/revision/1382821990/compare/1382916556 \
-H "Authorization: Bearer ${OPENANY_API_KEY}"
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The request below is a calling template; use the published contract and returned response for the selected implementation.
Published Wikipedia Revision Compare API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
wikimediaCurrent Wikipedia Revision Compare API · GET · View API reference | $0 / call | 0 | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.
Total $0
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/wikimedia/revision/{from}/compare/{to}- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
from | URL path parameterspath | integer | Yes | Base revision ID. minimum: 1 |
to | URL path parameterspath | integer | Yes | Target revision ID from the same article. minimum: 1 |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
diffobject[]lineNumberintegeroffsetobjectfromintegertointeger
textstringtypeintegerhighlightRangesobject[]lengthintegerstartintegertypeinteger
fromobjectidintegersectionsobject[]headingstringlevelintegeroffsetinteger
slot_rolestring
toobjectidintegersectionsobject[]headingstringlevelintegeroffsetinteger
slot_rolestring
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 2
Review these request fields before running. Keep the published provider and request method unchanged.
from- Base revision ID.
to- Target revision ID from the same article.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/wikimedia/revision/1382821990/compare/1382916556' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "diff": [ { "lineNumber": 94, "offset": { "from": 12128, "to": 12128 }, "text": "The [[Modern English]] word {{anchor|Name|Etymology}} ''Earth'' developed, via [[Middle English]], from an [[Old English]] noun most often spelled ''{{linktext|lang=ang|eorðe}}''.<ref name=\"oedearth\">{{cite book|title=Oxford English Dictionary|edition=3|chapter=earth, ''n.1''|publisher=[[Oxford University Press]]|place=[[Oxford]], England|year=2010|isbn=978-0-19-957112-3|doi=10.1093/acref/9780199571123.001.0001}}</ref> It has cognates in every [[Germanic language]], from which {{lang|gem-x-proto|erþō}} has been reconstructed. In its earliest attestation, the word ''{{lang|ang|eorðe}}'' was used to translate the many senses of Latin ''{{linktext|lang=la|terra}}'' and Greek {{Wktl|grc|γῆ|gē}}: the ground, its soil, dry land, the human world, the surface of the world (including the sea), and the globe itself. As with [[Roman Empire|Roman]] {{langr|la|[[Terra (goddess)|Terra]]}} (or {{langr|la|Tellus}}) and [[Greeks|Greek]] {{langr|grc-Latn|[[Gaia]]}}, Earth may have been a [[earth goddess|personified goddess]] in [[Germanic paganism]]: late [[Norse mythology]] included {{langr|non|[[Jörð]]}} ('Earth'), a giantess often given as the mother of [[Thor]].<ref>{{cite book|last=Simek|first=Rudolf|author-link=Rudolf Simek|translator-last=Hall|translator-first=Angela|title=Dictionary of Northern Mythology|page=179|publisher=[[D. S. Brewer]]|year=2007|isbn=978-0-85991-513-7}}</ref>", "type": 0 }, { "lineNumber": 95, "offset": { "from": 13531, "to": 13531 }, "text": "", "type": 0 }, { "highlightRanges": [ { "length": 4, "start": 932, "type": 1 } ], "lineNumber": 96, "offset": { "from": 13532, "to": 13532 }, "text": "Historically, ''Earth'' has been written in lowercase. During the [[Early Middle English]] period, its [[Definite article|definite sense]] as \"the globe\" began being expressed using the phrase ''the earth''. By the period of [[Early Modern English]], [[Capitalization in English#History of English capitalization|capitalization of nouns began to prevail]], and ''the earth'' was also written ''the Earth'', particularly when referenced along with other heavenly bodies. More recently, the name is sometimes simply given as ''Earth'', by analogy with the names of the [[Solar System|other planets]], though ''earth'' and forms with ''the earth'' remain common.<ref name=\"oedearth\" /> [[Style guide|House styles]] now vary: [[Oxford spelling]] recognizes the lowercase form as the more common, with the capitalized form an acceptable variant. Another convention capitalizes ''Earth'' when appearing as a name, such as a description of the \"Earth's atmosphere\", but employs the lowercase when it is preceded by ''the'', such as \"the atmosphere of the earth\". It almost always appears in lowercase in colloquial expressions such as \"what on earth are you doing?\"<ref>{{cite book|title=The New Oxford Dictionary of English|edition=1st|chapter=earth|publisher=[[Oxford University Press]]|location=Oxford|year=1998|isbn=978-0-19-861263-6}}</ref>", "type": 3 }, { "lineNumber": 97, "offset": { "from": 14871, "to": 14867 }, "text": "", "type": 0 }, { "lineNumber": 98, "offset": { "from": 14872, "to": 14868 }, "text": "The name ''Terra'' {{IPAc-en|ˈ|t|ɛr|ə}} {{respell|TERR|ə}} is occasionally used in scientific writing; it also sees use in science fiction to distinguish humanity's inhabited planet from others,<ref>{{OED|Terra}}</ref> while in poetry ''Tellus'' {{IPAc-en|ˈ|t|ɛ|l|ə|s}} {{respell|TELL|əs}} has been used to denote personification of the Earth.<ref>{{OED|Tellus}}</ref> ''Terra'' is also the name of the planet in some [[Romance languages]], languages that evolved from Latin, like Italian and Portuguese, while in other Romance languages the word gave rise to names with slightly altered spellings, like the Spanish {{lang|es|Tierra}} and the French {{lang|fr|Terre}}. The Latinate form {{lang|la|Gaea}} ({{IPAc-en|lang|'|dʒ|iː|.|ə}} {{respell|DJEE|ə}}) of the Greek poetic name {{tlit|grc|[[Gaia]]}} ({{IPA|grc|ɡâi̯.a|lang|label=}} or {{IPA|el|ɡâj.ja|}}) is rare, though the alternative spelling ''Gaia'' has become common due to the [[Gaia hypothesis]], in which case its pronunciation is {{IPAc-en|ˈ|g|aɪ|.|ə}} {{respell|GYE|ə}} rather than the more traditional English {{IPAc-en|ˈ|g|eɪ|.|ə}} {{respell|GAY|ə}}.<ref>{{OED|Gaia}}</ref>", "type": 0 } ], "from": { "id": 1382821990, "sections": [ { "heading": "== Etymology ==", "level": 2, "offset": 12112 }, { "heading": "== Natural history ==", "level": 2, "offset": 16956 }, { "heading": "=== Formation ===", "level": 3, "offset": 17033 }, { "heading": "=== After formation ===", "level": 3, "offset": 21087 }, { "heading": "=== Origin of life and evolution ===", "level": 3, "offset": 28770 }, { "heading": "=== Future ===", "level": 3, "offset": 37519 }, { "heading": "== Composition and structure ==", "level": 2, "offset": 40987 }, { "heading": "=== Chemical composition ===", "level": 3, "offset": 43321 }, { "heading": "=== Internal structure ===", "level": 3, "offset": 44506 }, { "heading": "=== Internal heat ===", "level": 3, "offset": 48459 }, { "heading": "=== Tectonic plates ===", "level": 3, "offset": 51072 }, { "heading": "=== Crust ===", "level": 3, "offset": 54372 }, { "heading": "=== <span class=\"anchor\" id=\"Surface\"></span> Surface ===", "level": 3, "offset": 56201 }, { "heading": "===Surface topography===", "level": 3, "offset": 67817 }, { "heading": "=== Shape ===", "level": 3, "offset": 68854 }, { "heading": "==Gravity and magnetic field==", "level": 2, "offset": 73087 }, { "heading": "=== Magnetic field ===", "level": 3, "offset": 73118 }, { "heading": "=== Gravitational field ===", "level": 3, "offset": 78896 }, { "heading": "== <span class=\"anchor\" id=\"Earth–Moon system\"></span> Moon and orbital space ==", "level": 2, "offset": 80189 }, { "heading": "=== Moon ===", "level": 3, "offset": 80315 }, { "heading": "=== Asteroids and artificial satellites ===", "level": 3, "offset": 89669 }, { "heading": "== Orbit and rotation ==", "level": 2, "offset": 92430 }, { "heading": "=== Rotation ===", "level": 3, "offset": 92455 }, { "heading": "=== Orbit and location ===", "level": 3, "offset": 94713 }, { "heading": "=== Axial tilt and seasons ===", "level": 3, "offset": 97487 }, { "heading": "== Atmosphere and climate==", "level": 2, "offset": 103535 }, { "heading": "===Exosphere===", "level": 3, "offset": 107244 }, { "heading": "=== Upper atmosphere ===", "level": 3, "offset": 108671 }, { "heading": "===Troposphere===", "level": 3, "offset": 110349 }, { "heading": "=== Weather and climate ===", "level": 3, "offset": 111574 }, { "heading": "== Hydrosphere ==", "level": 2, "offset": 118842 }, { "heading": "== Biosphere ==", "level": 2, "offset": 126252 }, { "heading": "===Challenges for life on Earth===", "level": 3, "offset": 129751 }, { "heading": "== Human geography ==", "level": 2, "offset": 133684 }, { "heading": "=== Natural resources and land use ===", "level": 3, "offset": 140471 }, { "heading": "=== Environmental impact ===", "level": 3, "offset": 145211 }, { "heading": "== In culture ==", "level": 2, "offset": 152002 }, { "heading": "==See also==", "level": 2, "offset": 164117 }, { "heading": "== Notes ==", "level": 2, "offset": 164501 }, { "heading": "== References ==", "level": 2, "offset": 167569 }, { "heading": "== External links ==", "level": 2, "offset": 224462 } ], "slot_role": "main" }, "to": { "id": 1382916556, "sections": [ { "heading": "== Etymology ==", "level": 2, "offset": 12112 }, { "heading": "== Natural history ==", "level": 2, "offset": 16952 }, { "heading": "=== Formation ===", "level": 3, "offset": 17029 }, { "heading": "=== After formation ===", "level": 3, "offset": 21083 }, { "heading": "=== Origin of life and evolution ===", "level": 3, "offset": 28766 }, { "heading": "=== Future ===", "level": 3, "offset": 37515 }, { "heading": "== Composition and structure ==", "level": 2, "offset": 40983 }, { "heading": "=== Chemical composition ===", "level": 3, "offset": 43317 }, { "heading": "=== Internal structure ===", "level": 3, "offset": 44502 }, { "heading": "=== Internal heat ===", "level": 3, "offset": 48455 }, { "heading": "=== Tectonic plates ===", "level": 3, "offset": 51068 }, { "heading": "=== Crust ===", "level": 3, "offset": 54368 }, { "heading": "=== <span class=\"anchor\" id=\"Surface\"></span> Surface ===", "level": 3, "offset": 56197 }, { "heading": "===Surface topography===", "level": 3, "offset": 67813 }, { "heading": "=== Shape ===", "level": 3, "offset": 68850 }, { "heading": "==Gravity and magnetic field==", "level": 2, "offset": 73083 }, { "heading": "=== Magnetic field ===", "level": 3, "offset": 73114 }, { "heading": "=== Gravitational field ===", "level": 3, "offset": 78892 }, { "heading": "== <span class=\"anchor\" id=\"Earth–Moon system\"></span> Moon and orbital space ==", "level": 2, "offset": 80185 }, { "heading": "=== Moon ===", "level": 3, "offset": 80311 }, { "heading": "=== Asteroids and artificial satellites ===", "level": 3, "offset": 89665 }, { "heading": "== Orbit and rotation ==", "level": 2, "offset": 92426 }, { "heading": "=== Rotation ===", "level": 3, "offset": 92451 }, { "heading": "=== Orbit and location ===", "level": 3, "offset": 94709 }, { "heading": "=== Axial tilt and seasons ===", "level": 3, "offset": 97483 }, { "heading": "== Atmosphere and climate==", "level": 2, "offset": 103531 }, { "heading": "===Exosphere===", "level": 3, "offset": 107240 }, { "heading": "=== Upper atmosphere ===", "level": 3, "offset": 108667 }, { "heading": "===Troposphere===", "level": 3, "offset": 110345 }, { "heading": "=== Weather and climate ===", "level": 3, "offset": 111570 }, { "heading": "== Hydrosphere ==", "level": 2, "offset": 118838 }, { "heading": "== Biosphere ==", "level": 2, "offset": 126248 }, { "heading": "===Challenges for life on Earth===", "level": 3, "offset": 129747 }, { "heading": "== Human geography ==", "level": 2, "offset": 133680 }, { "heading": "=== Natural resources and land use ===", "level": 3, "offset": 140467 }, { "heading": "=== Environmental impact ===", "level": 3, "offset": 145207 }, { "heading": "== In culture ==", "level": 2, "offset": 151998 }, { "heading": "==See also==", "level": 2, "offset": 164113 }, { "heading": "== Notes ==", "level": 2, "offset": 164497 }, { "heading": "== References ==", "level": 2, "offset": 167565 }, { "heading": "== External links ==", "level": 2, "offset": 224458 } ], "slot_role": "main" } }