# Http Request API not working as expected (Output Wrong)

**URL:** <https://community.n8n.io/t/http-request-api-not-working-as-expected-output-wrong/90080>\
**Category:** Questions\
**Created:** [March 19, 2025, 9:10am UTC](https://community.n8n.io/t/http-request-api-not-working-as-expected-output-wrong/90080 "2025-03-19T09:10:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![beadle](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/beadle/32/59690_2.png) [@beadle](https://community.n8n.io/u/beadle)\
**Post date:** [March 19, 2025, 9:10am UTC](https://community.n8n.io/t/http-request-api-not-working-as-expected-output-wrong/90080/1 "2025-03-19T09:10:29Z")

</div>

Randomly run into this issue with a http request to stable in which the response is returned not in JSON, and the AI simply can’t understand the text.

The tool connected to the agent is for searching for and retrieving an access token associated with the user ID.

When the http request is in a node by itself it returns the JSON formatted as normal.

Must be a bug surely.

##Current Output

```auto
response": 
"{\n "rows": [\n {\n "Name": "Billy Bob",\n "chatID": 6163060301,\n "access_token": "THAAPbe5ORJM1BYlVSQVpURTg0ZAHhnM1VnYl9EN2NBU2RFZAElJVEx2WGhuX3BJd0xSZA2ZAFNmVFOXVzUTdzOWozYm1XR18tYTl3cjM4TzNZASDBSNlBQd2lyMGlTSWViWlp0NndGRUstTWhUVXVKWHU2WXF1VmtYWWR1em1GTlhxeGswZAwZDZDr",\n "_locked": null,\n "_locked_by": null,\n "_archived": false,\n "_creator": "1cca2c7fad2a44c3ae25143f2e87e14c@auth.local",\n "_ctime": "2025-03-19T09:27:48.203+01:00",\n "_last_modifier": "1cca2c7fad2a44c3ae25143f2e87e14c@auth.local",\n "_mtime": "2025-03-19T09:27:51.357+01:00",\n "_id": "dlRKgk2oT5W9yPun7vqRAQ"\n },\n {\n "Name": "Beadle10",\n "chatID": 6163060305,\n "access_token": "THAAPbe5ORJM1BYlZAzUmhOMTc5UjM4Qlp4eFlIME1OZAk12eXdWbjR4N1pnRERQQ2plTU51ODZATeXpicnhpTnlwWGZARRXJoc1FYeXdzWVZASSnR6Q21OM1hUSUNEdk8zTGgtSEN3Tmt4WDRDMDYwRVJUWDNWdHp6cDY2ZAEFwZAGxySzaaaaZAZAUQZDZD",\n "_locked": null,\n "_locked_by": null,\n "_archived": false,\n "_creator": 

```

##Expected Output

```auto
"rows": 
[
{
"Name": 
"Billy Bob",
"chatID": 
6163060301,
"access_token": 
"THAAPbe5ORJM1BYlVSQVpURTg0ZAHhnM1VnYl9EN2NBU2RFZAElJVEx2WGhuX3BJd0xSZA2ZAFNmVFOXVzUTdzOWozYm1XR18tYTl3cjM4TzNZASDBSNlBQd2lyMGlTSWViWlp0NndGRUstTWhUVXVKWHU2WXF1VmtYWWR1em1GTlhxeGswZAwZDZDr",
"_locked": 
null,
"_locked_by": 
null,
"_archived": 
false,
"_creator": 
"1cca2c7fad2a44c3ae25143f2e87e14c@auth.local",
"_ctime": 
"2025-03-19T09:27:48.203+01:00",
"_last_modifier": 
"1cca2c7fad2a44c3ae25143f2e87e14c@auth.local",
"_mtime": 
"2025-03-19T09:27:51.357+01:00",
"_id": 
"dlRKgk2oT5W9yPun7vqRAQ"
},

```

## Information on your n8n setup

- **n8n version:** Latest
- **Database (default: SQLite):** SQLite
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** main
- \*\*Running n8n via (Docker, npm, n8n cloud, desktop app):\*\*Docker
- **Operating system:** Mac

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [March 19, 2025, 9:51am UTC](https://community.n8n.io/t/http-request-api-not-working-as-expected-output-wrong/90080/2 "2025-03-19T09:51:43Z")

</div>

hello @beadle

try to set the JSON for the HTTP Requests AI node explicitly

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/4/c/4c593f62230708435f1672b8be8ed3ab667cbcc6.png)

---

<div class="post-metadata">

**Author:** ![beadle](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/beadle/32/59690_2.png) [@beadle](https://community.n8n.io/u/beadle)\
**Post date:** [March 20, 2025, 7:06am UTC](https://community.n8n.io/t/http-request-api-not-working-as-expected-output-wrong/90080/3 "2025-03-20T07:06:02Z")

</div>

Still hasn’t fixed the issue.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [June 18, 2025, 7:06am UTC](https://community.n8n.io/t/http-request-api-not-working-as-expected-output-wrong/90080/4 "2025-06-18T07:06:20Z")

</div>

Closed on June 18, 2025, 7:06am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
