0

How can I get the entire first section/paragraph of a Wikipedia article including the first image with a single request?

What I've tried so far (the following url) returns only a snippet:

http://en.wikipedia.org/w/api.php?format=xml&action=query&list=search&srsearch=camera&srlimit=1

Chad
  • 2,365
  • 6
  • 26
  • 37

2 Answers2

4

If you're wanting the wikitext, use prop=revisions with rvsection=0. If you're wanting HTML, you can add rvparse=1 to that query or you can use action=parse.

Anomie
  • 92,546
  • 13
  • 126
  • 145
0

How can I get the entire first section/paragraph of a Wikipedia article including the first image with a single request?

It's not possible to do that in one request.

hakre
  • 193,403
  • 52
  • 435
  • 836
  • ok, can you please suggest a way to do it even without a single request? sample code maybe? – Chad Jun 18 '11 at 23:36