# Need API Response in HTML Format

**URL:** <https://community.postman.com/t/need-api-response-in-html-format/35870>\
**Category:** Help Hub\
**Created:** [June 2, 2022, 9:59am UTC](https://community.postman.com/t/need-api-response-in-html-format/35870 "2022-06-02T09:59:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imurein](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@imurein](https://community.postman.com/u/imurein)\
**Post date:** [June 2, 2022, 9:59am UTC](https://community.postman.com/t/need-api-response-in-html-format/35870/1 "2022-06-02T09:59:00Z")

</div>

Hi,  
I am hitting the URL to get a response in HTML Format. But I could not able to get it. I have added the header as Accept - text/html. But still, I could not able to visualize it in HTML Format. I have attached the image of the response which I got.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/c/ecb7d898f6571a3cd7850b20e56b44645660ca77.png)  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/f/1f92fd5ed8cdd375369164b23572326175fd0e58.png)

Could anyone please give me some suggestions?  
Thank you.

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [June 3, 2022, 3:21am UTC](https://community.postman.com/t/need-api-response-in-html-format/35870/2 "2022-06-03T03:21:59Z")

</div>

Hi @imurein

The server response looks like JSON. If you display this as HTML in the visualiser you will likely only see it as plain text.

The header you have added is the request header and won’t change the response (it only effects the data being sent to the server, not that coming back).

To change the response header you would need access to the code being sent back from the server. Which (as far as I’m aware) would be either dev code or mock servers.

* * *

You can try visualising it using something like this:

```auto
const jsonData = pm.response.text()

pm.visualizer.set(`
<body>
<P>${jsonData}
</body>
`);

```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![imurein](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@imurein](https://community.postman.com/u/imurein)\
**Post date:** [June 3, 2022, 3:37am UTC](https://community.postman.com/t/need-api-response-in-html-format/35870/3 "2022-06-03T03:37:57Z")

</div>

Hi @w4dd325,

Ok, I got it. thanks for your insights on this. I was little doubt about that. Now It is clarified.
