# Convert Web Page to Markdown

*The following example is a request we've prebuilt to demonstrate Gaffa's capabilities on our* [*demo site.*](https://demo.gaffa.dev) ***You can run this request right now in the*** [***Gaffa API Playground***](https://gaffa.dev/dashboard/playground?templateId=article_to_markdown)***.***

Gaffa converts web pages to clean markdown, stripping away styling, scripts, and images. This optimises content for LLM applications by reducing credit usage while preserving essential information.

## API Request

The request below uses the POST endpoint to open the demo site on the article simulator, wait for the article to load, and then generate a markdown from the page's content, which you can download for use in your program.

```json
{
  "url": "https://demo.gaffa.dev/simulate/article?loadTime=3&paragraphs=10&images=3",
  "proxy_location": null,
  "async": false,
  "max_cache_age": 0,
  "settings": {
    "record_request": false,
    "actions": [
      {
        "type": "wait",
        "selector": "article"
      },
      {
        "type": "generate_markdown"
      }
    ]
  }
}
```

## Actions

{% content-ref url="../actions/wait" %}
[wait](https://gaffa.dev/docs/features/browser-requests/actions/wait)
{% endcontent-ref %}

{% content-ref url="../actions/generate-markdown" %}
[generate-markdown](https://gaffa.dev/docs/features/browser-requests/actions/generate-markdown)
{% endcontent-ref %}

## Response

Here's an example of the PDF returned by the request after the article has loaded.

{% file src="<https://2341007864-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyUba6osOT5MkKiV0wmgr%2Fuploads%2FCydkYv9hpkNg5he7uLzd%2FGaffaMarkdownExample.md?alt=media&token=6be5fc19-4cfc-4b3f-93a9-d5759f4ce218>" %}
