Если это ваш объект JSON, вам нужно пройти весь объект, чтобы добраться до значения, которое вы хотите извлечь.
{
"batchcomplete":"",
"query":{
"pages":{
"30327":{
"pageid":30327,
"ns":0,
"title":"The Terminator",
"extract":"The Terminator is a 1984 American science fiction film directed by James Cameron. It stars Arnold Schwarzenegger as the Terminator, a cyborg assassin sent back in time from 2029 to 1984 to kill Sarah Connor (Linda Hamilton), whose son will one day become a savior against machines in a post-apocalyptic future. Michael Biehn plays Kyle Reese, a reverent soldier sent back in time to protect Sarah. The screenplay is credited to Cameron and producer Gale Anne Hurd, while co-writer William Wisher Jr. received a credit for additional dialogue. Executive producers John Daly and Derek Gibson of Hemdale Film Corporation were instrumental in financing and production.The Terminator topped the United States box office for two weeks and helped launch Cameron's film career and solidify Schwarzenegger's status as a leading man. Its success led to a franchise consisting of several sequels, a television series, comic books, novels and video games. In 2008, The Terminator was selected by the Library of Congress for preservation in the National Film Registry as \"culturally, historically, or aesthetically significant\"."
}
}
}
}
Что-то вроде:
result = json["query"]["pages"]["30327"]["extract"]
Но, конечно, вы должны искать свойство надлежащим образом, перебирая свойства / массивы и проверяя, существуют ли ключи.
EDIT
Если вы знаете, что структура всегда одна и та же, но идентификатор отличается, тогда вы можете попробовать что-то вроде этого для обработки произвольных идентификаторов.
for key, value in d["query"]["pages"].items():
result = value["extract"]
print(result)