I want to get the first paragraph of a Wikipedia article.
What is the API query to do so?
See this section on the MediaWiki docs
These are the key parameters.
prop=revisions&rvprop=content&rvsection=0
rvsection = 0 specifies to only return the lead section.
See this example.
To get the HTML, you can use similarly use action=parse http://en.wikipedia.org/w/api.php?action=parse§ion=0&prop=text&page=pizza
Note, that you'll have to strip out any templates or infoboxes.