python 및 머신러닝 교육, 슬로우캠퍼스

API 목록, reference (상세 설명)

https://en.wikipedia.org/w/api.php



http://www.mediawiki.org/wiki/API:Properties



위키피디아 편집

http://en.wikipedia.org/w/index.php?title=Raccoon&action=edit   

http://en.wikipedia.org/w/index.php?title=Red_panda&action=edit



검색 결과

https://en.wikipedia.org/w/api.php?action=opensearch&search=%EC%84%9C%EC%9A%B8&format=json



이미지 목록


http://en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=images


http://en.wikipedia.org/w/api.php?action=query&titles=Red%20panda&prop=images


https://en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=info&format=json


http://commons.wikimedia.org/wiki/Special:Export/File:knife.jpg


https://en.wikipedia.org/w/api.php?action=query&titles=File:RedPandaDescent.JPG&prop=imageinfo&iiprop=size|url|sha1|dimensions

 iiprop              - What image information to get:
                         timestamp     - Adds timestamp for the uploaded version
                         user          - Adds the user who uploaded the image version
                         userid        - Add the user ID that uploaded the image version
                         comment       - Comment on the version
                         parsedcomment - Parse the comment on the version
                         url           - Gives URL to the image and the description page
                         size          - Adds the size of the image in bytes and the height, width and page count (if applicable)
                         dimensions    - Alias for size
                         sha1          - Adds SHA-1 hash for the image
                         mime          - Adds MIME type of the image
                         thumbmime     - Adds MIME type of the image thumbnail (requires url and param iiurlwidth)
                         mediatype     - Adds the media type of the image
                         metadata      - Lists Exif metadata for the version of the image
                         archivename   - Adds the file name of the archive version for non-latest versions
                         bitdepth      - Adds the bit depth of the version
                        Values (separate with '|'): timestamp, user, userid, comment, parsedcomment, url, size, dimensions, sha1, mime, thumbmime,
                            mediatype, metadata, archivename, bitdepth
                        Default: timestamp|user

* prop=pageimages (pi) *
  Returns information about images on the page such as thumbnail and presence of photos.

This module requires read rights
Parameters:
  piprop              - What information to return
                         thumbnail - URL and dimensions of image associated with page, if any
                         name - image title
                        Values (separate with '|'): thumbnail, name
                        Default: thumbnail|name
  pithumbsize         - Thumbnail width
                        Default: 50
  pilimit             - Properties of how many pages to return
                        No more than 50 (100 for bots) allowed
                        Default: 1
  picontinue          - When more results are available, use this to continue



https://en.wikipedia.org/w/api.php?action=query&titles=File:RedPandaDescent.JPG&prop=imageinfo&iiprop=size|url|dimensions&iiurlwidth&iiurlheight


<?xml version="1.0"?>
<api>
  <query>
    <pages>
      <page ns="6" title="File:RedPandaDescent.JPG" missing="" imagerepository="shared">
        <imageinfo>
          <ii size="9196411" width="3185" height="4247" thumberror="Error creating thumbnail: Invalid thumbnail parameters or image file with more than 12.5 million pixels" url="https://upload.wikimedia.org/wikipedia/commons/4/4c/RedPandaDescent.JPG" descriptionurl="https://commons.wikimedia.org/wiki/File:RedPandaDescent.JPG" />
        </imageinfo>
      </page>
    </pages>
  </query>
</api>


https://commons.wikimedia.org/wiki/File:RedPandaDescent.JPG


https://en.wikipedia.org/w/api.php?action=query&titles=File:knife.jpg&prop=info&format=json
{
  • query
    {
    • normalized
      [
      • {
        • from"File:knife.jpg",
        • to"File:Knife.jpg"
        }
      ],
    • pages
      {
      • -1
        {
        • ns6,
        • title"File:Knife.jpg",
        • missing"",
        • contentmodel"wikitext",
        • pagelanguage"en"
        }
      }
    }
}


'Open API' 카테고리의 다른 글

Freebase API  (0) 2013.07.18
Restful API 잘 정의하기  (0) 2013.07.18
각종 데이타 API 및 RSS  (0) 2013.07.11
StackOverflow API 사용  (0) 2013.07.11
DB활용 공모전  (0) 2013.07.11

WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,