Api
HTML API
Through HTML Api we can fetch the html and other details about a content or page
The following is an example of a request and response:
const response =await $fetch('https://cdn.builder.io/api/v1/html/YOUR_MODEL_NAME?apiKey=YOUR_API_KEY&url=PAGE_URL')
console.log("Response Data:", response.data)
//In this response you can access the html of the requested page url
Query Params
Name | Required | Description |
---|---|---|
apiKey | Yes | API KEY |
url | Yes | The current URL of the visitor on your site.?url=https://your-site.com/about?foo=bar |
For more Params Click here |