API:Get the contents of a page
This page is part of the MediaWiki Action API documentation. |
There are some main methods for retrieving page content via the API:
- Get the wikitext of a page using the
raw
action. - Get the contents of a page using the Revisions API (as wikitext).
- Get the contents of a page using the Parse API (as HTML or wikitext).
- Get plain text or limited HTML extracts of a page using the API of the TextExtracts extension.
Method 1: Use the raw action
[edit]A very quick way to get the wikitext of a page is to use the same URL used to view it normally, but with the value of action
changed from view
to raw
.
If the normal URL is https://en.wikipedia.org/w/index.php?title=Pet_door&action=view
then the raw
URL is https://en.wikipedia.org/w/index.php?title=Pet_door&action=raw
– this URL will serve a file called api-result.php
with the following contents.
Response |
---|
a:2:{s:13:"batchcomplete";s:0:"";s:5:"query";a:2:{s:10:"normalized";a:1:{i:0;a:2:{s:4:"from";s:8:"Pet_door";s:2:"to";s:8:"Pet door";}}s:5:"pages";a:1:{i:3276454;a:4:{s:6:"pageid";i:3276454;s:2:"ns";i:0;s:5:"title";s:8:"Pet door";s:7:"extract";s:1700:"A pet door or pet flap (also referred to in more specific terms, such as cat flap, cat door, kitty door, dog flap, dog door, or doggy/doggie door) is a small opening to allow pets to enter and exit a building on their own without needing a human to open the door. Originally simple holes, the modern form is a hinged and often spring-loaded panel or flexible flap, and some are electronically controlled. They offer a degree of protection against wind, rain, and larger-bodied intruders entering the dwelling. Similar hatches can let dogs through fences at stiles. A related concept is the pet gate, which is easy for humans to open but acts as a secure pet barrier.
== Purpose ==
A pet door is found to be convenient by many owners of companion animals, especially dogs and cats, because it lets the pets come and go as they please, reducing the need for pet-owners to let or take the pet outside manually, and curtailing unwanted behaviour such as loud vocalisation to be let outside, scratching on doors or walls, and (especially in the case of dogs) excreting in the house. They also help to ensure that a pet left outdoors can safely get back into the house unattended, in the case of inclement weather.
== Features ==
The simplest type are bottom-weighted flaps hung from the top of the opening, which swing shut on their own, but may be spring-aided to increase wind resistance. These flaps often feature magnets around the edges to help keep the door closed against weather and wind. Some pet doors, made of rigid materials, have side-mounted hinges and swing open like saloon doors, and usually have a spring or other contrivance to force their closure after the pet has gone through.";}}}}
|
Method 2: Use the Revisions API
[edit]The Revisions API can be used to retrieve the content of a page as Wikitext .
This can be done by specifying the title of the page in the titles
parameter and setting the rvprop
parameter to content
.
For more options, see API:Revisions .
Example
[edit]GET request to obtain the wikitext content of the page Pet door.
Response
[edit]Response |
---|
{
"batchcomplete": true,
"query": {
"normalized": [
{
"fromencoded": false,
"from": "Pet_door",
"to": "Pet door"
}
],
"pages": [
{
"pageid": 3276454,
"ns": 0,
"title": "Pet door",
"revisions": [
{
"slots": {
"main": {
"contentmodel": "wikitext",
"contentformat": "text/x-wiki",
"content": "[[File:Doggy door exit.JPG|thumb|A dog exiting through a pet door]]\nA '''pet door''' or '''pet flap''' (also referred to in more specific terms, such as '''cat flap''', '''cat door''', '''dog door''', or '''doggy door''') is a small opening to allow [[pet]]s to enter and exit a building on their own without needing a person to open the door. Originally simple holes, the modern form is a hinged and often spring-loaded panel or flexible flap, and some are electronically controlled. They offer a degree of protection against wind, rain, and larger-bodied intruders entering the dwelling. Similar hatches can let dogs through fences at stiles. A related concept is the '''pet gate''', which is easy for humans to open but acts as a secure pet barrier, as well as the '''automated left- or right-handed pet doors'''.<ref>{{Cite web|url=http://www.gizmag.com/passive-house-petwalk-door/31162/|title=World's first Passive House-certified pet door unveiled at Ecobuild 2014|website=www.gizmag.com|access-date=2016-07-07}}</ref>\n\n==Purpose==\nA pet door is found to be convenient by many owners of companion animals, especially dogs and cats, because it lets the pets come and go as they please, reducing the need for pet-owners to let or take the pet outside manually, and curtailing unwanted behaviour such as loud vocalisation to be let outside, scratching on doors or walls, and (especially in the case of dogs) [[Excretion|excreting]] in the house. They also help to ensure that a pet left outdoors can safely get back into the house in the case of inclement weather.\n\n==Features==\n[[File:Cat flap.jpg|thumb|A cat flap in action]]\nThe simplest type are bottom-weighted flaps hung from the top of the opening, which swing shut on their own, but may be spring-aided to increase wind resistance. These flaps often feature magnets around the edges to help keep the door closed against weather and wind. Some pet doors have side-mounted hinges and swing open like saloon doors. These pet doors usually have a spring or other contrivance to force their closure after the pet has gone through. Instead of a rubber flap, saloon style doors are often made from plastic, acrylic, or plexiglass, and the panels are fitted with weather seal to help keep weather outside.\n\nAnother common feature is an adjustable catch to restrict the opening of the device to either one direction or the other; for example, to allow the pet to come in for the night, but not go out again until the owner releases the catch the next morning. Some pets, mostly cats with their retractile claws and flexible paws, learn to circumvent one-way pet doors, especially the \"flap-within-flap\" design.\n\nMost also have a locking mechanism of some kind, and can be closed off by sliding a rigid plate into parallel rails on the left and right of the interior side of the pet door, useful during bad weather or when the owners are traveling with their pets.\n\nPet doors are generally designed to be safe for any pet. The panels are often designed with soft [[Polyvinyl chloride|vinyl]] that does not trap or injure the animal. Cheap, easily replaceable pet doors are made from plastic and may not always be robust enough for large, boisterous pets.\n\nPet doors are most often fitted in a plywood or plastic paneled door, into which it is straightforward to cut a large round hole, but can also be fitted in brickwork or (if a sealed unit is obtained with the hole already provided) in a double glazed door. The latter is a relatively expensive option but may be the only alternative in some cases. Removable pet doors suitable for [[sliding glass door]]s are also available.\n\nInnovation has contributed to a new generation of more expensive pet doors making use of specific materials, automation, time control devices, and/or sophisticated sensors to deal with common problems like poor insulation and drafts, higher noise levels, insufficient pet safety and access difficulties.<ref>{{Cite web|url=http://www.trendhunter.com/trends/pet-door|title=Automated Pet Doors : pet door|access-date=2016-07-07}}</ref><ref>{{Cite web|url=http://www.ubergizmo.com/2014/03/petwalk-automatic-pet-door-prevents-wet-paw-marks-around-the-home/|title=PetWALK Automatic Pet Door Prevents Wet Paw Marks Around The Home|date=2014-03-13|website=Ubergizmo|language=en-US|access-date=2016-07-07}}</ref>\n\n==History==\nThe ''[[Oxford English Dictionary]]'' records the first use of the phrase \"cat flap\" in 1957 and \"cat door\" in 1959,<ref>''Oxford English Dictionary'' (full ed.), 2005.</ref> but the idea is much older.\n\n[[File:Gatera de ademuz.jpg|thumb|left|A ''{{lang|es|gatera}}'' (farm cat hole) in [[Rincón de Ademuz]], Valencia, Spain]]\nIn rural areas, cat doors (often simple holes) in the walls, doors or even roofs of grain and flour storage spaces have long been used to welcome [[feral cat]]s to hunt rodent pests that feed on these stores. Human semi-domestication of [[wildcat]]s dates back to at least 7,500 BC in [[Cyprus]],<ref name=\"NatGeo 2004\">{{cite web\n |title=Oldest Known Pet Cat? 9500-year-old Burial Found on Cyprus\n |url= http://news.nationalgeographic.com/news/2004/04/0408_040408_oldestpetcat.html\n |accessdate=March 6, 2007\n |date=April 8, 2004\n |work=National Geographic News\n |publisher=National Geographic Society\n}}</ref> and the domestic cat was a part of everyday life in grain-dependent [[ancient Egypt]] (ca. 6,000 BC onward). In modern times, this function is mostly lost, but in some rural areas, such as [[Valencia, Spain|Valencia]], Spain, and [[Vaunage]], France, farm cat doors and holes ({{lang-es|gateras}}, {{lang-fr|chatières}}) are still common.\n\nThe 14th-century [[English literature|English]] writer [[Geoffrey Chaucer]] described a simple cat hole in the \"Miller's Tale\" from his ''[[Canterbury Tales]]'' (late 14th century). In the narrative, a servant whose knocks go unanswered uses the cat door to peek in:<blockquote>{{lang|enm|An hole he foond, ful lowe upon a bord<br />Ther as the cat was wont in for to crepe,<br />And at the hole he looked in ful depe,<br />And at the last he hadde of hym a sighte.}}</blockquote>\n\nIn an apparent [[Early modern period|early modern]] example of [[urban legend]], the invention of the pet door was attributed to [[Isaac Newton]] (1642–1727) in a story (authored anonymously and published in a column of anecdotes in 1893) to the effect that Newton foolishly made a large hole for his adult cat and a small one for her kittens, not realizing the kittens would follow the mother through the large one.<ref>{{Cite web\n |title=Random Readings: Philosophy and Common Sense\n |author=Anonymous (\"The Country Parson\")<!--Not to be confused with Frank A. Clark who used that name in the 1960s!-->\n |editor=E. H. Sears & Rufus Ellis\n |work=The Monthly Religious Magazine\n |year=1863\n |volume=29-30\n |page=298\n |publisher=Leonard C. Bowles Press\n |location=Boston, MA\n |url= https://books.google.com/books?id=PXYUAAAAYAAJ&pg=PA298\n}}</ref> Two Newton biographers cite passages saying that Newton kept \"neither cat nor dog in his chamber\".<ref>Brodetsky, S. (2007) [first pub. 1927]. ''Sir Isaac Newton''. Upton Press. p. 100. {{ISBN|1406769991}}.</ref><ref>More, Louis Trenchard (1937). ''Isaac Newton: a Biography''. C. Scribner's Sons.</ref> Yet over 60 years earlier, a member of Newton's alma mater Trinity College, one J. M. F. Wright, reported this same story (from an unknown source) in his 1827 memoir, adding: \"Whether this account be true or false, indisputably true is it that there are in the door to this day two plugged holes of the proper dimensions for the respective egresses of cat and kitten.\"<ref>Wright, J. F. M. (1827). ''Alma Mater''. Volume 1. p. 17.</ref>\n\nModern cat flaps are popular in some countries, even in urban environments, particularly the [[United Kingdom]] where it is estimated that about 74% of cats have access to the outdoors.<ref>{{cite web|url=http://www.petplan.co.uk/petcensus/censusinfo.pdf |title=Petplan Pet Census 2011 |publisher=Petplan |page=15 |accessdate=September 11, 2012}}</ref>\n\nDog doors are common in suburban North America, where they mostly lead to fenced-in yards. Pet doors are also common between suburban homes and their attached garages, so that pet-related mess (cat box, dog food, etc.) can be kept in the garage with pets having free access.\n\n==Electronic pet doors==\n[[File:Wall mounted catflap.jpg|thumb|200px|A [[Integrated circuit|microchip]]-enabled, selective-access cat and small dog door running through a wall]]\nSeveral types of pet doors that allow selective access are available. The advantages of this type of pet door over simpler models are improved weather resistance, and home security against strays and other unwanted animals. Some use a [[permanent magnet]] mounted on the pet's collar to activate a matching [[electromagnet]]ic mechanism that unlatches the door panel when the magnet comes within range; several pets can be fitted with collars that match the same door. Pet doors with [[Consumer IR|infrared]] locks open only when a collar-mounted device transmits the correct code to the latch's receiver, allowing owners to have multiple flaps that different pets can use, e.g. a small cat flap to the back yard and a large dog door accessing a [[dog run]]. Either type can be used to selectively allow one pet outside access, while denying it to another (e.g., an ill animal that needs to stay indoors).\n\nSome of the newest models use [[radio-frequency identification]] to electronically read a pet's [[Microchip implant (animal)|microchip implant]]. This removes the need for a cat to wear a collar, which could become lost. Other high-end doors use a key with RFID. The key is attached to the pet's collar, and the electric door only opens for the assigned keys.\n\n==Dog stiles==\n[[File:Dog door demonstration - geograph.org.uk - 718920.jpg|thumb|left|A man lets a dog through the lift-up hatch at a stile in [[Medway]], [[England]].|247x247px]]\nIn [[England]], [[Ireland]], and other areas with large numbers of livestock fences and walls in areas through which people walk on footpaths, [[stile]]s often have wooden, lift-up dog hatchways next to them, because dogs are not good at climbing stile steps and are often too heavy to lift over a fence.\n\n==Pet gates==\nA related idea to the pet door is the pet gate, an easily human-operated portal that keeps pets in (or out) and thwarts their attempts to open it by using a thumb-operated switch or a smooth door handle, and which is tall enough that it cannot be jumped over by the type of pet for which it was designed. Styles vary, but they are typically made of wooden or metal bars or a wire lattice, and have adjustable widths so that they can be used to span arbitrary entrances, hallways or windows. Common uses are to keep pets inside while ventilating a room by opening an unscreened door, or keeping pets out of a baby's room or a dining area.{{clear|left}}\n\n==Pet barriers==\nPet barriers are typically made of fabric and are especially used to secure staircases.<ref>{{cite web|last1=Woods|first1=Amanda|title=7 Important Measures to Pet Proof Your Home|url=https://medium.com/@woodsamanda399/7-important-measures-to-pet-proof-your-home-bdd3e33ae4c8|accessdate=23 August 2017}}</ref> They are available in banister-to-banister and wall-to-banister options and are customizable and portable.\n\n== References ==\n{{reflist}}\n\n{{Commons category|Pet doors}}\n\n[[Category:Door furniture]]\n[[Category:Pet equipment]]"
}
}
}
]
}
]
}
}
|
Method 3: Use the Parse API
[edit]The Parse API can be used to retrieve page content in either HTML format (parsed) or Wikitext format (unparsed).
This can be done by specifying a page with the page
parameter or a revision with the oldid
parameter.
To retrieve HTML, set prop
to text
.
To retrieve Wikitext, set prop
to wikitext
.
Example 1
[edit]GET request to get parsed HTML content of a page: Pet door
Response
[edit]Response |
---|
{
"parse": {
"title": "Pet door",
"pageid": 3276454,
"text": "<div class=\"mw-parser-output\"><div class=\"thumb tright\"><div class=\"thumbinner\" style=\"width:252px;\"><a href=\"/wiki/File:Doggy_door_exit.JPG\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/7/71/Doggy_door_exit.JPG/250px-Doggy_door_exit.JPG\" decoding=\"async\" width=\"250\" height=\"188\" class=\"thumbimage\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/7/71/Doggy_door_exit.JPG/375px-Doggy_door_exit.JPG 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/71/Doggy_door_exit.JPG/500px-Doggy_door_exit.JPG 2x\" data-file-width=\"1600\" data-file-height=\"1200\" /></a> <div class=\"thumbcaption\"><div class=\"magnify\"><a href=\"/wiki/File:Doggy_door_exit.JPG\" class=\"internal\" title=\"Enlarge\"></a></div>A dog exiting through a pet door</div></div></div>\n<p>A <b>pet door</b> or <b>pet flap</b> (also referred to in more specific terms, such as <b>cat flap</b>, <b>cat door</b>, <b>dog door</b>, or <b>doggy door</b>) is a small opening to allow <a href=\"/wiki/Pet\" title=\"Pet\">pets</a> to enter and exit a building on their own without needing a person to open the door. Originally simple holes, the modern form is a hinged and often spring-loaded panel or flexible flap, and some are electronically controlled. They offer a degree of protection against wind, rain, and larger-bodied intruders entering the dwelling. Similar hatches can let dogs through fences at stiles. A related concept is the <b>pet gate</b>, which is easy for humans to open but acts as a secure pet barrier, as well as the <b>automated left- or right-handed pet doors</b>.<sup id=\"cite_ref-1\" class=\"reference\"><a href=\"#cite_note-1\">[1]</a></sup>\n</p>\n<div id=\"toc\" class=\"toc\"><input type=\"checkbox\" role=\"button\" id=\"toctogglecheckbox\" class=\"toctogglecheckbox\" style=\"display:none\" /><div class=\"toctitle\" lang=\"en\" dir=\"ltr\"><h2>Contents</h2><span class=\"toctogglespan\"><label class=\"toctogglelabel\" for=\"toctogglecheckbox\"></label></span></div>\n<ul>\n<li class=\"toclevel-1 tocsection-1\"><a href=\"#Purpose\"><span class=\"tocnumber\">1</span> <span class=\"toctext\">Purpose</span></a></li>\n<li class=\"toclevel-1 tocsection-2\"><a href=\"#Features\"><span class=\"tocnumber\">2</span> <span class=\"toctext\">Features</span></a></li>\n<li class=\"toclevel-1 tocsection-3\"><a href=\"#History\"><span class=\"tocnumber\">3</span> <span class=\"toctext\">History</span></a></li>\n<li class=\"toclevel-1 tocsection-4\"><a href=\"#Electronic_pet_doors\"><span class=\"tocnumber\">4</span> <span class=\"toctext\">Electronic pet doors</span></a></li>\n<li class=\"toclevel-1 tocsection-5\"><a href=\"#Dog_stiles\"><span class=\"tocnumber\">5</span> <span class=\"toctext\">Dog stiles</span></a></li>\n<li class=\"toclevel-1 tocsection-6\"><a href=\"#Pet_gates\"><span class=\"tocnumber\">6</span> <span class=\"toctext\">Pet gates</span></a></li>\n<li class=\"toclevel-1 tocsection-7\"><a href=\"#Pet_barriers\"><span class=\"tocnumber\">7</span> <span class=\"toctext\">Pet barriers</span></a></li>\n<li class=\"toclevel-1 tocsection-8\"><a href=\"#References\"><span class=\"tocnumber\">8</span> <span class=\"toctext\">References</span></a></li>\n</ul>\n</div>\n\n<h2><span class=\"mw-headline\" id=\"Purpose\">Purpose</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=1\" title=\"Edit section: Purpose\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<p>A pet door is found to be convenient by many owners of companion animals, especially dogs and cats, because it lets the pets come and go as they please, reducing the need for pet-owners to let or take the pet outside manually, and curtailing unwanted behaviour such as loud vocalisation to be let outside, scratching on doors or walls, and (especially in the case of dogs) <a href=\"/wiki/Excretion\" title=\"Excretion\">excreting</a> in the house. They also help to ensure that a pet left outdoors can safely get back into the house in the case of inclement weather.\n</p>\n<h2><span class=\"mw-headline\" id=\"Features\">Features</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=2\" title=\"Edit section: Features\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<div class=\"thumb tright\"><div class=\"thumbinner\" style=\"width:252px;\"><a href=\"/wiki/File:Cat_flap.jpg\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Cat_flap.jpg/250px-Cat_flap.jpg\" decoding=\"async\" width=\"250\" height=\"314\" class=\"thumbimage\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Cat_flap.jpg/375px-Cat_flap.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/36/Cat_flap.jpg/500px-Cat_flap.jpg 2x\" data-file-width=\"860\" data-file-height=\"1081\" /></a> <div class=\"thumbcaption\"><div class=\"magnify\"><a href=\"/wiki/File:Cat_flap.jpg\" class=\"internal\" title=\"Enlarge\"></a></div>A cat flap in action</div></div></div>\n<p>The simplest type are bottom-weighted flaps hung from the top of the opening, which swing shut on their own, but may be spring-aided to increase wind resistance. These flaps often feature magnets around the edges to help keep the door closed against weather and wind. Some pet doors have side-mounted hinges and swing open like saloon doors. These pet doors usually have a spring or other contrivance to force their closure after the pet has gone through. Instead of a rubber flap, saloon style doors are often made from plastic, acrylic, or plexiglass, and the panels are fitted with weather seal to help keep weather outside.\n</p><p>Another common feature is an adjustable catch to restrict the opening of the device to either one direction or the other; for example, to allow the pet to come in for the night, but not go out again until the owner releases the catch the next morning. Some pets, mostly cats with their retractile claws and flexible paws, learn to circumvent one-way pet doors, especially the \"flap-within-flap\" design.\n</p><p>Most also have a locking mechanism of some kind, and can be closed off by sliding a rigid plate into parallel rails on the left and right of the interior side of the pet door, useful during bad weather or when the owners are traveling with their pets.\n</p><p>Pet doors are generally designed to be safe for any pet. The panels are often designed with soft <a href=\"/wiki/Polyvinyl_chloride\" title=\"Polyvinyl chloride\">vinyl</a> that does not trap or injure the animal. Cheap, easily replaceable pet doors are made from plastic and may not always be robust enough for large, boisterous pets.\n</p><p>Pet doors are most often fitted in a plywood or plastic paneled door, into which it is straightforward to cut a large round hole, but can also be fitted in brickwork or (if a sealed unit is obtained with the hole already provided) in a double glazed door. The latter is a relatively expensive option but may be the only alternative in some cases. Removable pet doors suitable for <a href=\"/wiki/Sliding_glass_door\" title=\"Sliding glass door\">sliding glass doors</a> are also available.\n</p><p>Innovation has contributed to a new generation of more expensive pet doors making use of specific materials, automation, time control devices, and/or sophisticated sensors to deal with common problems like poor insulation and drafts, higher noise levels, insufficient pet safety and access difficulties.<sup id=\"cite_ref-2\" class=\"reference\"><a href=\"#cite_note-2\">[2]</a></sup><sup id=\"cite_ref-3\" class=\"reference\"><a href=\"#cite_note-3\">[3]</a></sup>\n</p>\n<h2><span class=\"mw-headline\" id=\"History\">History</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=3\" title=\"Edit section: History\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<p>The <i><a href=\"/wiki/Oxford_English_Dictionary\" title=\"Oxford English Dictionary\">Oxford English Dictionary</a></i> records the first use of the phrase \"cat flap\" in 1957 and \"cat door\" in 1959,<sup id=\"cite_ref-4\" class=\"reference\"><a href=\"#cite_note-4\">[4]</a></sup> but the idea is much older.\n</p>\n<div class=\"thumb tleft\"><div class=\"thumbinner\" style=\"width:252px;\"><a href=\"/wiki/File:Gatera_de_ademuz.jpg\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Gatera_de_ademuz.jpg/250px-Gatera_de_ademuz.jpg\" decoding=\"async\" width=\"250\" height=\"188\" class=\"thumbimage\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Gatera_de_ademuz.jpg/375px-Gatera_de_ademuz.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/98/Gatera_de_ademuz.jpg/500px-Gatera_de_ademuz.jpg 2x\" data-file-width=\"960\" data-file-height=\"720\" /></a> <div class=\"thumbcaption\"><div class=\"magnify\"><a href=\"/wiki/File:Gatera_de_ademuz.jpg\" class=\"internal\" title=\"Enlarge\"></a></div>A <i><i lang=\"es\" title=\"Spanish language text\">gatera</i></i> (farm cat hole) in <a href=\"/wiki/Rinc%C3%B3n_de_Ademuz\" title=\"Rincón de Ademuz\">Rincón de Ademuz</a>, Valencia, Spain</div></div></div>\n<p>In rural areas, cat doors (often simple holes) in the walls, doors or even roofs of grain and flour storage spaces have long been used to welcome <a href=\"/wiki/Feral_cat\" title=\"Feral cat\">feral cats</a> to hunt rodent pests that feed on these stores. Human semi-domestication of <a href=\"/wiki/Wildcat\" title=\"Wildcat\">wildcats</a> dates back to at least 7,500 BC in <a href=\"/wiki/Cyprus\" title=\"Cyprus\">Cyprus</a>,<sup id=\"cite_ref-NatGeo_2004_5-0\" class=\"reference\"><a href=\"#cite_note-NatGeo_2004-5\">[5]</a></sup> and the domestic cat was a part of everyday life in grain-dependent <a href=\"/wiki/Ancient_Egypt\" title=\"Ancient Egypt\">ancient Egypt</a> (ca. 6,000 BC onward). In modern times, this function is mostly lost, but in some rural areas, such as <a href=\"/wiki/Valencia,_Spain\" class=\"mw-redirect\" title=\"Valencia, Spain\">Valencia</a>, Spain, and <a href=\"/wiki/Vaunage\" title=\"Vaunage\">Vaunage</a>, France, farm cat doors and holes (<a href=\"/wiki/Spanish_language\" title=\"Spanish language\">Spanish</a>: <i lang=\"es\">gateras</i>, <a href=\"/wiki/French_language\" title=\"French language\">French</a>: <i lang=\"fr\">chatières</i>) are still common.\n</p><p>\nThe 14th-century <a href=\"/wiki/English_literature\" title=\"English literature\">English</a> writer <a href=\"/wiki/Geoffrey_Chaucer\" title=\"Geoffrey Chaucer\">Geoffrey Chaucer</a> described a simple cat hole in the \"Miller's Tale\" from his <i><a href=\"/wiki/Canterbury_Tales\" class=\"mw-redirect\" title=\"Canterbury Tales\">Canterbury Tales</a></i> (late 14th century). In the narrative, a servant whose knocks go unanswered uses the cat door to peek in:</p><blockquote><p><i lang=\"enm\" title=\"Middle English language text\">An hole he foond, ful lowe upon a bord<br />Ther as the cat was wont in for to crepe,<br />And at the hole he looked in ful depe,<br />And at the last he hadde of hym a sighte.</i></p></blockquote>\n<p>In an apparent <a href=\"/wiki/Early_modern_period\" title=\"Early modern period\">early modern</a> example of <a href=\"/wiki/Urban_legend\" title=\"Urban legend\">urban legend</a>, the invention of the pet door was attributed to <a href=\"/wiki/Isaac_Newton\" title=\"Isaac Newton\">Isaac Newton</a> (1642–1727) in a story (authored anonymously and published in a column of anecdotes in 1893) to the effect that Newton foolishly made a large hole for his adult cat and a small one for her kittens, not realizing the kittens would follow the mother through the large one.<sup id=\"cite_ref-6\" class=\"reference\"><a href=\"#cite_note-6\">[6]</a></sup> Two Newton biographers cite passages saying that Newton kept \"neither cat nor dog in his chamber\".<sup id=\"cite_ref-7\" class=\"reference\"><a href=\"#cite_note-7\">[7]</a></sup><sup id=\"cite_ref-8\" class=\"reference\"><a href=\"#cite_note-8\">[8]</a></sup> Yet over 60 years earlier, a member of Newton's alma mater Trinity College, one J. M. F. Wright, reported this same story (from an unknown source) in his 1827 memoir, adding: \"Whether this account be true or false, indisputably true is it that there are in the door to this day two plugged holes of the proper dimensions for the respective egresses of cat and kitten.\"<sup id=\"cite_ref-9\" class=\"reference\"><a href=\"#cite_note-9\">[9]</a></sup>\n</p><p>Modern cat flaps are popular in some countries, even in urban environments, particularly the <a href=\"/wiki/United_Kingdom\" title=\"United Kingdom\">United Kingdom</a> where it is estimated that about 74% of cats have access to the outdoors.<sup id=\"cite_ref-10\" class=\"reference\"><a href=\"#cite_note-10\">[10]</a></sup>\n</p><p>Dog doors are common in suburban North America, where they mostly lead to fenced-in yards. Pet doors are also common between suburban homes and their attached garages, so that pet-related mess (cat box, dog food, etc.) can be kept in the garage with pets having free access.\n</p>\n<h2><span class=\"mw-headline\" id=\"Electronic_pet_doors\">Electronic pet doors</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=4\" title=\"Edit section: Electronic pet doors\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<div class=\"thumb tright\"><div class=\"thumbinner\" style=\"width:202px;\"><a href=\"/wiki/File:Wall_mounted_catflap.jpg\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Wall_mounted_catflap.jpg/200px-Wall_mounted_catflap.jpg\" decoding=\"async\" width=\"200\" height=\"150\" class=\"thumbimage\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Wall_mounted_catflap.jpg/300px-Wall_mounted_catflap.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Wall_mounted_catflap.jpg/400px-Wall_mounted_catflap.jpg 2x\" data-file-width=\"2816\" data-file-height=\"2112\" /></a> <div class=\"thumbcaption\"><div class=\"magnify\"><a href=\"/wiki/File:Wall_mounted_catflap.jpg\" class=\"internal\" title=\"Enlarge\"></a></div>A <a href=\"/wiki/Integrated_circuit\" title=\"Integrated circuit\">microchip</a>-enabled, selective-access cat and small dog door running through a wall</div></div></div>\n<p>Several types of pet doors that allow selective access are available. The advantages of this type of pet door over simpler models are improved weather resistance, and home security against strays and other unwanted animals. Some use a <a href=\"/wiki/Permanent_magnet\" class=\"mw-redirect\" title=\"Permanent magnet\">permanent magnet</a> mounted on the pet's collar to activate a matching <a href=\"/wiki/Electromagnet\" title=\"Electromagnet\">electromagnetic</a> mechanism that unlatches the door panel when the magnet comes within range; several pets can be fitted with collars that match the same door. Pet doors with <a href=\"/wiki/Consumer_IR\" title=\"Consumer IR\">infrared</a> locks open only when a collar-mounted device transmits the correct code to the latch's receiver, allowing owners to have multiple flaps that different pets can use, e.g. a small cat flap to the back yard and a large dog door accessing a <a href=\"/wiki/Dog_run\" class=\"mw-redirect\" title=\"Dog run\">dog run</a>. Either type can be used to selectively allow one pet outside access, while denying it to another (e.g., an ill animal that needs to stay indoors).\n</p><p>Some of the newest models use <a href=\"/wiki/Radio-frequency_identification\" title=\"Radio-frequency identification\">radio-frequency identification</a> to electronically read a pet's <a href=\"/wiki/Microchip_implant_(animal)\" title=\"Microchip implant (animal)\">microchip implant</a>. This removes the need for a cat to wear a collar, which could become lost. Other high-end doors use a key with RFID. The key is attached to the pet's collar, and the electric door only opens for the assigned keys.\n</p>\n<h2><span class=\"mw-headline\" id=\"Dog_stiles\">Dog stiles</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=5\" title=\"Edit section: Dog stiles\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<div class=\"thumb tleft\"><div class=\"thumbinner\" style=\"width:187px;\"><a href=\"/wiki/File:Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg\" class=\"image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg/185px-Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg\" decoding=\"async\" width=\"185\" height=\"247\" class=\"thumbimage\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg/278px-Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg/370px-Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg 2x\" data-file-width=\"480\" data-file-height=\"640\" /></a> <div class=\"thumbcaption\"><div class=\"magnify\"><a href=\"/wiki/File:Dog_door_demonstration_-_geograph.org.uk_-_718920.jpg\" class=\"internal\" title=\"Enlarge\"></a></div>A man lets a dog through the lift-up hatch at a stile in <a href=\"/wiki/Medway\" title=\"Medway\">Medway</a>, <a href=\"/wiki/England\" title=\"England\">England</a>.</div></div></div>\n<p>In <a href=\"/wiki/England\" title=\"England\">England</a>, <a href=\"/wiki/Ireland\" title=\"Ireland\">Ireland</a>, and other areas with large numbers of livestock fences and walls in areas through which people walk on footpaths, <a href=\"/wiki/Stile\" title=\"Stile\">stiles</a> often have wooden, lift-up dog hatchways next to them, because dogs are not good at climbing stile steps and are often too heavy to lift over a fence.\n</p>\n<h2><span class=\"mw-headline\" id=\"Pet_gates\">Pet gates</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=6\" title=\"Edit section: Pet gates\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2><p>\nA related idea to the pet door is the pet gate, an easily human-operated portal that keeps pets in (or out) and thwarts their attempts to open it by using a thumb-operated switch or a smooth door handle, and which is tall enough that it cannot be jumped over by the type of pet for which it was designed. Styles vary, but they are typically made of wooden or metal bars or a wire lattice, and have adjustable widths so that they can be used to span arbitrary entrances, hallways or windows. Common uses are to keep pets inside while ventilating a room by opening an unscreened door, or keeping pets out of a baby's room or a dining area.</p><div style=\"clear:left;\"></div>\n<h2><span class=\"mw-headline\" id=\"Pet_barriers\">Pet barriers</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=7\" title=\"Edit section: Pet barriers\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<p>Pet barriers are typically made of fabric and are especially used to secure staircases.<sup id=\"cite_ref-11\" class=\"reference\"><a href=\"#cite_note-11\">[11]</a></sup> They are available in banister-to-banister and wall-to-banister options and are customizable and portable.\n</p>\n<h2><span class=\"mw-headline\" id=\"References\">References</span><span class=\"mw-editsection\"><span class=\"mw-editsection-bracket\">[</span><a href=\"/w/index.php?title=Pet_door&action=edit&section=8\" title=\"Edit section: References\">edit</a><span class=\"mw-editsection-bracket\">]</span></span></h2>\n<div class=\"reflist\" style=\"list-style-type: decimal;\">\n<div class=\"mw-references-wrap mw-references-columns\"><ol class=\"references\">\n<li id=\"cite_note-1\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-1\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.gizmag.com/passive-house-petwalk-door/31162/\">\"World's first Passive House-certified pet door unveiled at Ecobuild 2014\"</a>. <i>www.gizmag.com</i><span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">2016-07-07</span></span>.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=www.gizmag.com&rft.atitle=World%27s+first+Passive+House-certified+pet+door+unveiled+at+Ecobuild+2014&rft_id=http%3A%2F%2Fwww.gizmag.com%2Fpassive-house-petwalk-door%2F31162%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><style data-mw-deduplicate=\"TemplateStyles:r935243608\">.mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:\"\\\"\"\"\\\"\"\"'\"\"'\"}.mw-parser-output .id-lock-free a,.mw-parser-output .citation .cs1-lock-free a{background:url(\"//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png\")no-repeat;background-position:right .1em center}.mw-parser-output .id-lock-limited a,.mw-parser-output .id-lock-registration a,.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url(\"//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png\")no-repeat;background-position:right .1em center}.mw-parser-output .id-lock-subscription a,.mw-parser-output .citation .cs1-lock-subscription a{background:url(\"//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png\")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url(\"//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png\")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}</style></span>\n</li>\n<li id=\"cite_note-2\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-2\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.trendhunter.com/trends/pet-door\">\"Automated Pet Doors : pet door\"</a><span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">2016-07-07</span></span>.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Automated+Pet+Doors+%3A+pet+door&rft_id=http%3A%2F%2Fwww.trendhunter.com%2Ftrends%2Fpet-door&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/></span>\n</li>\n<li id=\"cite_note-3\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-3\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.ubergizmo.com/2014/03/petwalk-automatic-pet-door-prevents-wet-paw-marks-around-the-home/\">\"PetWALK Automatic Pet Door Prevents Wet Paw Marks Around The Home\"</a>. <i>Ubergizmo</i>. 2014-03-13<span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">2016-07-07</span></span>.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Ubergizmo&rft.atitle=PetWALK+Automatic+Pet+Door+Prevents+Wet+Paw+Marks+Around+The+Home&rft.date=2014-03-13&rft_id=http%3A%2F%2Fwww.ubergizmo.com%2F2014%2F03%2Fpetwalk-automatic-pet-door-prevents-wet-paw-marks-around-the-home%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/></span>\n</li>\n<li id=\"cite_note-4\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-4\">^</a></b></span> <span class=\"reference-text\"><i>Oxford English Dictionary</i> (full ed.), 2005.</span>\n</li>\n<li id=\"cite_note-NatGeo_2004-5\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-NatGeo_2004_5-0\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\"><a rel=\"nofollow\" class=\"external text\" href=\"http://news.nationalgeographic.com/news/2004/04/0408_040408_oldestpetcat.html\">\"Oldest Known Pet Cat? 9500-year-old Burial Found on Cyprus\"</a>. <i>National Geographic News</i>. National Geographic Society. April 8, 2004<span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">March 6,</span> 2007</span>.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=National+Geographic+News&rft.atitle=Oldest+Known+Pet+Cat%3F+9500-year-old+Burial+Found+on+Cyprus&rft.date=2004-04-08&rft_id=http%3A%2F%2Fnews.nationalgeographic.com%2Fnews%2F2004%2F04%2F0408_040408_oldestpetcat.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/></span>\n</li>\n<li id=\"cite_note-6\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-6\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\">Anonymous (\"The Country Parson\") (1863). E. H. Sears & Rufus Ellis (ed.). <a rel=\"nofollow\" class=\"external text\" href=\"https://books.google.com/books?id=PXYUAAAAYAAJ&pg=PA298\">\"Random Readings: Philosophy and Common Sense\"</a>. <i>The Monthly Religious Magazine</i>. Boston, MA: Leonard C. Bowles Press. p. 298.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=The+Monthly+Religious+Magazine&rft.atitle=Random+Readings%3A+Philosophy+and+Common+Sense&rft.pages=298&rft.date=1863&rft.au=Anonymous+%28%22The+Country+Parson%22%29&rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DPXYUAAAAYAAJ%26pg%3DPA298&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/></span>\n</li>\n<li id=\"cite_note-7\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-7\">^</a></b></span> <span class=\"reference-text\">Brodetsky, S. (2007) [first pub. 1927]. <i>Sir Isaac Newton</i>. Upton Press. p. 100. <link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/><a href=\"/wiki/International_Standard_Book_Number\" title=\"International Standard Book Number\">ISBN</a> <a href=\"/wiki/Special:BookSources/1406769991\" title=\"Special:BookSources/1406769991\">1406769991</a>.</span>\n</li>\n<li id=\"cite_note-8\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-8\">^</a></b></span> <span class=\"reference-text\">More, Louis Trenchard (1937). <i>Isaac Newton: a Biography</i>. C. Scribner's Sons.</span>\n</li>\n<li id=\"cite_note-9\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-9\">^</a></b></span> <span class=\"reference-text\">Wright, J. F. M. (1827). <i>Alma Mater</i>. Volume 1. p. 17.</span>\n</li>\n<li id=\"cite_note-10\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-10\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\"><a rel=\"nofollow\" class=\"external text\" href=\"http://www.petplan.co.uk/petcensus/censusinfo.pdf\">\"Petplan Pet Census 2011\"</a> <span class=\"cs1-format\">(PDF)</span>. Petplan. p. 15<span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">September 11,</span> 2012</span>.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Petplan+Pet+Census+2011&rft.pages=15&rft.pub=Petplan&rft_id=http%3A%2F%2Fwww.petplan.co.uk%2Fpetcensus%2Fcensusinfo.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/></span>\n</li>\n<li id=\"cite_note-11\"><span class=\"mw-cite-backlink\"><b><a href=\"#cite_ref-11\">^</a></b></span> <span class=\"reference-text\"><cite class=\"citation web\">Woods, Amanda. <a rel=\"nofollow\" class=\"external text\" href=\"https://medium.com/@woodsamanda399/7-important-measures-to-pet-proof-your-home-bdd3e33ae4c8\">\"7 Important Measures to Pet Proof Your Home\"</a><span class=\"reference-accessdate\">. Retrieved <span class=\"nowrap\">23 August</span> 2017</span>.</cite><span title=\"ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=7+Important+Measures+to+Pet+Proof+Your+Home&rft.aulast=Woods&rft.aufirst=Amanda&rft_id=https%3A%2F%2Fmedium.com%2F%40woodsamanda399%2F7-important-measures-to-pet-proof-your-home-bdd3e33ae4c8&rfr_id=info%3Asid%2Fen.wikipedia.org%3APet+door\" class=\"Z3988\"></span><link rel=\"mw-deduplicated-inline-style\" href=\"mw-data:TemplateStyles:r935243608\"/></span>\n</li>\n</ol></div></div>\n<table role=\"presentation\" class=\"mbox-small plainlinks sistersitebox\" style=\"background-color:#f9f9f9;border:1px solid #aaa;color:#000\">\n<tbody><tr>\n<td class=\"mbox-image\"><img alt=\"\" src=\"//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/30px-Commons-logo.svg.png\" decoding=\"async\" width=\"30\" height=\"40\" class=\"noviewer\" srcset=\"//upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/45px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/59px-Commons-logo.svg.png 2x\" data-file-width=\"1024\" data-file-height=\"1376\" /></td>\n<td class=\"mbox-text plainlist\">Wikimedia Commons has media related to <i><b><a href=\"https://commons.wikimedia.org/wiki/Category:Pet_doors\" class=\"extiw\" title=\"commons:Category:Pet doors\"><span style=\"\">Pet doors</span></a></b></i>.</td></tr>\n</tbody></table>\n<!-- \nNewPP limit report\nParsed by mw1280\nCached time: 20200114194811\nCache expiry: 2592000\nDynamic content: false\nComplications: [vary‐revision‐sha1]\nCPU time usage: 0.364 seconds\nReal time usage: 0.493 seconds\nPreprocessor visited node count: 761/1000000\nPreprocessor generated node count: 0/1500000\nPost‐expand include size: 14770/2097152 bytes\nTemplate argument size: 738/2097152 bytes\nHighest expansion depth: 15/40\nExpensive parser function count: 0/500\nUnstrip recursion depth: 1/20\nUnstrip post‐expand size: 24623/5000000 bytes\nNumber of Wikibase entities loaded: 0/400\nLua time usage: 0.248/10.000 seconds\nLua memory usage: 11.77 MB/50 MB\n-->\n<!--\nTransclusion expansion time report (%,ms,calls,template)\n100.00% 447.841 1 -total\n 44.33% 198.547 1 Template:Reflist\n 40.44% 181.107 2 Template:Lang\n 29.24% 130.944 7 Template:Cite_web\n 11.61% 51.996 1 Template:Commons_category\n 10.28% 46.019 1 Template:ISBN\n 3.30% 14.784 1 Template:Catalog_lookup_link\n 3.21% 14.389 1 Template:Error-small\n 3.12% 13.986 1 Template:Commons\n 2.71% 12.155 1 Template:Small\n-->\n\n<!-- Saved in parser cache with key enwiki:pcache:idhash:3276454-0!thumbsize=5!tmh-videojs and timestamp 20200114194811 and revision id 931122620\n -->\n</div>"
}
}
|
Example 2
[edit]GET request to get the original wikitext content of a page: Pet door
Response
[edit]Response |
---|
{
"parse": {
"title": "Pet door",
"pageid": 3276454,
"wikitext": "[[File:Doggy door exit.JPG|thumb|A dog exiting through a pet door]]\nA '''pet door''' or '''pet flap''' (also referred to in more specific terms, such as '''cat flap''', '''cat door''', '''dog door''', or '''doggy door''') is a small opening to allow [[pet]]s to enter and exit a building on their own without needing a person to open the door. Originally simple holes, the modern form is a hinged and often spring-loaded panel or flexible flap, and some are electronically controlled. They offer a degree of protection against wind, rain, and larger-bodied intruders entering the dwelling. Similar hatches can let dogs through fences at stiles. A related concept is the '''pet gate''', which is easy for humans to open but acts as a secure pet barrier, as well as the '''automated left- or right-handed pet doors'''.<ref>{{Cite web|url=http://www.gizmag.com/passive-house-petwalk-door/31162/|title=World's first Passive House-certified pet door unveiled at Ecobuild 2014|website=www.gizmag.com|access-date=2016-07-07}}</ref>\n\n==Purpose==\nA pet door is found to be convenient by many owners of companion animals, especially dogs and cats, because it lets the pets come and go as they please, reducing the need for pet-owners to let or take the pet outside manually, and curtailing unwanted behaviour such as loud vocalisation to be let outside, scratching on doors or walls, and (especially in the case of dogs) [[Excretion|excreting]] in the house. They also help to ensure that a pet left outdoors can safely get back into the house in the case of inclement weather.\n\n==Features==\n[[File:Cat flap.jpg|thumb|A cat flap in action]]\nThe simplest type are bottom-weighted flaps hung from the top of the opening, which swing shut on their own, but may be spring-aided to increase wind resistance. These flaps often feature magnets around the edges to help keep the door closed against weather and wind. Some pet doors have side-mounted hinges and swing open like saloon doors. These pet doors usually have a spring or other contrivance to force their closure after the pet has gone through. Instead of a rubber flap, saloon style doors are often made from plastic, acrylic, or plexiglass, and the panels are fitted with weather seal to help keep weather outside.\n\nAnother common feature is an adjustable catch to restrict the opening of the device to either one direction or the other; for example, to allow the pet to come in for the night, but not go out again until the owner releases the catch the next morning. Some pets, mostly cats with their retractile claws and flexible paws, learn to circumvent one-way pet doors, especially the \"flap-within-flap\" design.\n\nMost also have a locking mechanism of some kind, and can be closed off by sliding a rigid plate into parallel rails on the left and right of the interior side of the pet door, useful during bad weather or when the owners are traveling with their pets.\n\nPet doors are generally designed to be safe for any pet. The panels are often designed with soft [[Polyvinyl chloride|vinyl]] that does not trap or injure the animal. Cheap, easily replaceable pet doors are made from plastic and may not always be robust enough for large, boisterous pets.\n\nPet doors are most often fitted in a plywood or plastic paneled door, into which it is straightforward to cut a large round hole, but can also be fitted in brickwork or (if a sealed unit is obtained with the hole already provided) in a double glazed door. The latter is a relatively expensive option but may be the only alternative in some cases. Removable pet doors suitable for [[sliding glass door]]s are also available.\n\nInnovation has contributed to a new generation of more expensive pet doors making use of specific materials, automation, time control devices, and/or sophisticated sensors to deal with common problems like poor insulation and drafts, higher noise levels, insufficient pet safety and access difficulties.<ref>{{Cite web|url=http://www.trendhunter.com/trends/pet-door|title=Automated Pet Doors : pet door|access-date=2016-07-07}}</ref><ref>{{Cite web|url=http://www.ubergizmo.com/2014/03/petwalk-automatic-pet-door-prevents-wet-paw-marks-around-the-home/|title=PetWALK Automatic Pet Door Prevents Wet Paw Marks Around The Home|date=2014-03-13|website=Ubergizmo|language=en-US|access-date=2016-07-07}}</ref>\n\n==History==\nThe ''[[Oxford English Dictionary]]'' records the first use of the phrase \"cat flap\" in 1957 and \"cat door\" in 1959,<ref>''Oxford English Dictionary'' (full ed.), 2005.</ref> but the idea is much older.\n\n[[File:Gatera de ademuz.jpg|thumb|left|A ''{{lang|es|gatera}}'' (farm cat hole) in [[Rincón de Ademuz]], Valencia, Spain]]\nIn rural areas, cat doors (often simple holes) in the walls, doors or even roofs of grain and flour storage spaces have long been used to welcome [[feral cat]]s to hunt rodent pests that feed on these stores. Human semi-domestication of [[wildcat]]s dates back to at least 7,500 BC in [[Cyprus]],<ref name=\"NatGeo 2004\">{{cite web\n |title=Oldest Known Pet Cat? 9500-year-old Burial Found on Cyprus\n |url= http://news.nationalgeographic.com/news/2004/04/0408_040408_oldestpetcat.html\n |accessdate=March 6, 2007\n |date=April 8, 2004\n |work=National Geographic News\n |publisher=National Geographic Society\n}}</ref> and the domestic cat was a part of everyday life in grain-dependent [[ancient Egypt]] (ca. 6,000 BC onward). In modern times, this function is mostly lost, but in some rural areas, such as [[Valencia, Spain|Valencia]], Spain, and [[Vaunage]], France, farm cat doors and holes ({{lang-es|gateras}}, {{lang-fr|chatières}}) are still common.\n\nThe 14th-century [[English literature|English]] writer [[Geoffrey Chaucer]] described a simple cat hole in the \"Miller's Tale\" from his ''[[Canterbury Tales]]'' (late 14th century). In the narrative, a servant whose knocks go unanswered uses the cat door to peek in:<blockquote>{{lang|enm|An hole he foond, ful lowe upon a bord<br />Ther as the cat was wont in for to crepe,<br />And at the hole he looked in ful depe,<br />And at the last he hadde of hym a sighte.}}</blockquote>\n\nIn an apparent [[Early modern period|early modern]] example of [[urban legend]], the invention of the pet door was attributed to [[Isaac Newton]] (1642–1727) in a story (authored anonymously and published in a column of anecdotes in 1893) to the effect that Newton foolishly made a large hole for his adult cat and a small one for her kittens, not realizing the kittens would follow the mother through the large one.<ref>{{Cite web\n |title=Random Readings: Philosophy and Common Sense\n |author=Anonymous (\"The Country Parson\")<!--Not to be confused with Frank A. Clark who used that name in the 1960s!-->\n |editor=E. H. Sears & Rufus Ellis\n |work=The Monthly Religious Magazine\n |year=1863\n |volume=29-30\n |page=298\n |publisher=Leonard C. Bowles Press\n |location=Boston, MA\n |url= https://books.google.com/books?id=PXYUAAAAYAAJ&pg=PA298\n}}</ref> Two Newton biographers cite passages saying that Newton kept \"neither cat nor dog in his chamber\".<ref>Brodetsky, S. (2007) [first pub. 1927]. ''Sir Isaac Newton''. Upton Press. p. 100. {{ISBN|1406769991}}.</ref><ref>More, Louis Trenchard (1937). ''Isaac Newton: a Biography''. C. Scribner's Sons.</ref> Yet over 60 years earlier, a member of Newton's alma mater Trinity College, one J. M. F. Wright, reported this same story (from an unknown source) in his 1827 memoir, adding: \"Whether this account be true or false, indisputably true is it that there are in the door to this day two plugged holes of the proper dimensions for the respective egresses of cat and kitten.\"<ref>Wright, J. F. M. (1827). ''Alma Mater''. Volume 1. p. 17.</ref>\n\nModern cat flaps are popular in some countries, even in urban environments, particularly the [[United Kingdom]] where it is estimated that about 74% of cats have access to the outdoors.<ref>{{cite web|url=http://www.petplan.co.uk/petcensus/censusinfo.pdf |title=Petplan Pet Census 2011 |publisher=Petplan |page=15 |accessdate=September 11, 2012}}</ref>\n\nDog doors are common in suburban North America, where they mostly lead to fenced-in yards. Pet doors are also common between suburban homes and their attached garages, so that pet-related mess (cat box, dog food, etc.) can be kept in the garage with pets having free access.\n\n==Electronic pet doors==\n[[File:Wall mounted catflap.jpg|thumb|200px|A [[Integrated circuit|microchip]]-enabled, selective-access cat and small dog door running through a wall]]\nSeveral types of pet doors that allow selective access are available. The advantages of this type of pet door over simpler models are improved weather resistance, and home security against strays and other unwanted animals. Some use a [[permanent magnet]] mounted on the pet's collar to activate a matching [[electromagnet]]ic mechanism that unlatches the door panel when the magnet comes within range; several pets can be fitted with collars that match the same door. Pet doors with [[Consumer IR|infrared]] locks open only when a collar-mounted device transmits the correct code to the latch's receiver, allowing owners to have multiple flaps that different pets can use, e.g. a small cat flap to the back yard and a large dog door accessing a [[dog run]]. Either type can be used to selectively allow one pet outside access, while denying it to another (e.g., an ill animal that needs to stay indoors).\n\nSome of the newest models use [[radio-frequency identification]] to electronically read a pet's [[Microchip implant (animal)|microchip implant]]. This removes the need for a cat to wear a collar, which could become lost. Other high-end doors use a key with RFID. The key is attached to the pet's collar, and the electric door only opens for the assigned keys.\n\n==Dog stiles==\n[[File:Dog door demonstration - geograph.org.uk - 718920.jpg|thumb|left|A man lets a dog through the lift-up hatch at a stile in [[Medway]], [[England]].|247x247px]]\nIn [[England]], [[Ireland]], and other areas with large numbers of livestock fences and walls in areas through which people walk on footpaths, [[stile]]s often have wooden, lift-up dog hatchways next to them, because dogs are not good at climbing stile steps and are often too heavy to lift over a fence.\n\n==Pet gates==\nA related idea to the pet door is the pet gate, an easily human-operated portal that keeps pets in (or out) and thwarts their attempts to open it by using a thumb-operated switch or a smooth door handle, and which is tall enough that it cannot be jumped over by the type of pet for which it was designed. Styles vary, but they are typically made of wooden or metal bars or a wire lattice, and have adjustable widths so that they can be used to span arbitrary entrances, hallways or windows. Common uses are to keep pets inside while ventilating a room by opening an unscreened door, or keeping pets out of a baby's room or a dining area.{{clear|left}}\n\n==Pet barriers==\nPet barriers are typically made of fabric and are especially used to secure staircases.<ref>{{cite web|last1=Woods|first1=Amanda|title=7 Important Measures to Pet Proof Your Home|url=https://medium.com/@woodsamanda399/7-important-measures-to-pet-proof-your-home-bdd3e33ae4c8|accessdate=23 August 2017}}</ref> They are available in banister-to-banister and wall-to-banister options and are customizable and portable.\n\n== References ==\n{{reflist}}\n\n{{Commons category|Pet doors}}\n\n[[Category:Door furniture]]\n[[Category:Pet equipment]]"
}
}
|
Method 4: Use the TextExtracts API
[edit]The TextExtracts extension provides an API which allows you to retrieve plain-text or limited HTML extracts of page content. See Extension:TextExtracts for additional documentation.
Example
[edit]Get request to extract 10 sentences from the page w:Pet door.
Response
[edit]Response |
---|
{
"batchcomplete": true,
"query": {
"normalized": [
{
"fromencoded": false,
"from": "Pet_door",
"to": "Pet door"
}
],
"pages": [
{
"pageid": 3276454,
"ns": 0,
"title": "Pet door",
"extract": "A pet door or pet flap (also referred to in more specific terms, such as cat flap, cat door, dog door, or doggy door) is a small opening to allow pets to enter and exit a building on their own without needing a person to open the door. Originally simple holes, the modern form is a hinged and often spring-loaded panel or flexible flap, and some are electronically controlled. They offer a degree of protection against wind, rain, and larger-bodied intruders entering the dwelling. Similar hatches can let dogs through fences at stiles. A related concept is the pet gate, which is easy for humans to open but acts as a secure pet barrier, as well as the automated left- or right-handed pet doors.\n\n\n== Purpose ==\nA pet door is found to be convenient by many owners of companion animals, especially dogs and cats, because it lets the pets come and go as they please, reducing the need for pet-owners to let or take the pet outside manually, and curtailing unwanted behaviour such as loud vocalisation to be let outside, scratching on doors or walls, and (especially in the case of dogs) excreting in the house. They also help to ensure that a pet left outdoors can safely get back into the house in the case of inclement weather.\n\n\n== Features ==\n\nThe simplest type are bottom-weighted flaps hung from the top of the opening, which swing shut on their own, but may be spring-aided to increase wind resistance. These flaps often feature magnets around the edges to help keep the door closed against weather and wind. Some pet doors have side-mounted hinges and swing open like saloon doors."
}
]
}
}
|
Additional notes
[edit]The content extracted directly from Wikipedia can be inserted into any MediaWiki wiki through Extension:InterwikiExtracts . The content extracted comes in the form of limited wikitext, omitting loading templates, links to files or pages.