# API call: get results in the same format for DESCRIBE and SELECT including language of literals

**URL:** <https://community.stardog.com/t/api-call-get-results-in-the-same-format-for-describe-and-select-including-language-of-literals/4223>\
**Category:** Support\
**Created:** [January 31, 2023, 12:32pm UTC](https://community.stardog.com/t/api-call-get-results-in-the-same-format-for-describe-and-select-including-language-of-literals/4223 "2023-01-31T12:32:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasBo](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JasBo](https://community.stardog.com/u/JasBo)\
**Post date:** [January 31, 2023, 12:32pm UTC](https://community.stardog.com/t/api-call-get-results-in-the-same-format-for-describe-and-select-including-language-of-literals/4223/1 "2023-01-31T12:32:31Z")

</div>

Hello community,

when calling STARDOGs API with a POST request using Postman, when sending a SELECT query, I get the result in XML format:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/9/9e1f189c72be5bd59fae2c3d40b9f0ff1a4a9efa.png)

but when a DESCRIBE query is thrown at it, it responds with what looks like TURTLE syntax:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/a/a34d21f4bec69844d41891e31e5818539931f4d5.png)

Is there a way to get a consistent response?

Thank you!

---

<div class="post-metadata">

**Author:** ![Lars\_Heling](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/lars_heling/32/1657_2.png) [@Lars\_Heling](https://community.stardog.com/u/Lars_Heling)\
**Post date:** [January 31, 2023, 12:45pm UTC](https://community.stardog.com/t/api-call-get-results-in-the-same-format-for-describe-and-select-including-language-of-literals/4223/2 "2023-01-31T12:45:09Z")

</div>

Hi Jasper,

the difference in the result format is caused by the query type that you are using (i.e., SELECT vs DESCRIBE). Simply speaking: SELECT returns a set of mappings from variables to RDF terms and DESCRIBE returns an RDF graph (set of RDF triples).

See also the specification for details on [Describe](https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#describe):  
"The `DESCRIBE` form returns a single result RDF graph containing RDF data about resources."  
And for [Select](https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#select):  
"The SELECT form of results returns variables and their bindings directly. " They can be encoded in different formats: [SPARQL 1.1 Query Results JSON Format](http://www.w3.org/TR/sparql11-results-json/), [SPARQL Query Results XML Format](http://www.w3.org/TR/rdf-sparql-XMLres/) or [SPARQL 1.1 Query Results CSV and TSV Formats](http://www.w3.org/TR/sparql11-results-csv-tsv/).

I hope this clarifies the difference.  
Best regards

Lars

---

<div class="post-metadata">

**Author:** ![JasBo](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JasBo](https://community.stardog.com/u/JasBo)\
**Post date:** [January 31, 2023, 1:23pm UTC](https://community.stardog.com/t/api-call-get-results-in-the-same-format-for-describe-and-select-including-language-of-literals/4223/3 "2023-01-31T13:23:47Z")

</div>

Hi @Lars_Heling,  
thanks for the quick reply!

That makes sense.

So to just get all the infos provided by `DESCRIBE` in the same format,  
I would basically have to run a simple ` select * where{?s ?p ?o .}` query  
on the RDF graph resulting from the `DESCRIBE <myIRI>`, right?

(or just go ahead and run `SELECT * WHERE {<myIRI> ?p ?o .}` on my original data in the first place,  
though this also returns all the blank nodes)

---

<div class="post-metadata">

**Author:** ![Lars\_Heling](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/lars_heling/32/1657_2.png) [@Lars\_Heling](https://community.stardog.com/u/Lars_Heling)\
**Post date:** [January 31, 2023, 1:50pm UTC](https://community.stardog.com/t/api-call-get-results-in-the-same-format-for-describe-and-select-including-language-of-literals/4223/4 "2023-01-31T13:50:22Z")

</div>

Hi @JasBo,

yes, as you suggested you can also use the `SELECT * WHERE {<myIRI> ?p ?o .}` query to get the same result. This returns all outgoing edges of `<myIRI>`. See also details in the [documentation](https://docs.stardog.com/tutorials/learn-sparql#describe-queries).

Best regards  
Lars
