Extract Content from a Web Page

Extract the main content from a web page. This API is useful for extracting the main text, title, and images from a web page. It can be used to create a summary of the content of a web page, or to extract the main content of a web page to display it in a different format.

Not only the main text but also the entire HTML of the main content will be returned.

GET
https://api.apileague.com/extract-content
Example Request and Response
GET
https://api.apileague.com/{{ examples.getExtractContent }}
{
    "title": "Happy-Go-Lucky Australia Is Feeling Neither Happy, Nor Lucky",
    "main_text": "For nearly three decades, Australia seemed to have a sort of get-out-of-jail card that allowed it to glide through [...]",
    "main_html": "<article>[...]</article>",
    "images": [
        "https://static01.nyt.com/images/2024/03/19/multimedia/00oz-misery-kbjt/00oz-misery-kbjt-superJumbo.jpg?quality=75&auto=webp"
    ]
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}