# endpoint\_URL to get a json response to an HTTP request

**URL:** <https://community.stardog.com/t/endpoint-url-to-get-a-json-response-to-an-http-request/1606>\
**Category:** Support\
**Created:** [April 19, 2019, 7:02pm UTC](https://community.stardog.com/t/endpoint-url-to-get-a-json-response-to-an-http-request/1606 "2019-04-19T19:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patricia\_Andolz\_Sant](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/patricia_andolz_sant/32/405_2.png) [@Patricia\_Andolz\_Sant](https://community.stardog.com/u/Patricia_Andolz_Sant)\
**Post date:** [April 19, 2019, 7:02pm UTC](https://community.stardog.com/t/endpoint-url-to-get-a-json-response-to-an-http-request/1606/1 "2019-04-19T19:02:48Z")

</div>

Hi,

I want to execute a query via HTTP, but I need that stardog returned the response in a json format. Is it posible?

If so, which URL I have to use? (Currently I'm using: "[http://192.168.1.46:5820/EVCP/query?query=](http://192.168.1.46:5820/EVCP/query?query=)", where EVCP is the DB created in stardog.)

I've tryied to use "[http://192.168.1.46:5820/EVCP/query?query=?format=json](http://192.168.1.46:5820/EVCP/query?query=?format=json)" and "[http://192.168.1.46:5820/EVCP/sparql?format=json&query=](http://192.168.1.46:5820/EVCP/sparql?format=json&query=)", but neither of them worked.

Thanks!

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [April 19, 2019, 7:12pm UTC](https://community.stardog.com/t/endpoint-url-to-get-a-json-response-to-an-http-request/1606/2 "2019-04-19T19:12:32Z")

</div>

Hi and welcome!

If you have control of the HTTP headers being sent, you can simply include `Accept: application/sparql-results+json` and you'll get the query results in a JSON format. If you do not, Stardog Studio allows you to run a query and then export the results out to a JSON file.

---

<div class="post-metadata">

**Author:** ![Patricia\_Andolz\_Sant](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/patricia_andolz_sant/32/405_2.png) [@Patricia\_Andolz\_Sant](https://community.stardog.com/u/Patricia_Andolz_Sant)\
**Post date:** [April 20, 2019, 8:08am UTC](https://community.stardog.com/t/endpoint-url-to-get-a-json-response-to-an-http-request/1606/3 "2019-04-20T08:08:05Z")

</div>

Thanks Stephen for your answer!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 4, 2019, 8:08am UTC](https://community.stardog.com/t/endpoint-url-to-get-a-json-response-to-an-http-request/1606/4 "2019-05-04T08:08:10Z")

</div>

Closed on May 4, 2019, 8:08am UTC

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