# CSV export using API

**URL:** <https://community.graylog.org/t/csv-export-using-api/3113>\
**Category:** Graylog Central (peer support)\
**Created:** [November 8, 2017, 10:27pm UTC](https://community.graylog.org/t/csv-export-using-api/3113 "2017-11-08T22:27:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mantil](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Mantil](https://community.graylog.org/u/Mantil)\
**Post date:** [November 8, 2017, 10:27pm UTC](https://community.graylog.org/t/csv-export-using-api/3113/1 "2017-11-08T22:27:07Z")

</div>

Can a search result be output to csv via API. I see the option within the interface under “More Actions”. But not finding where I can do this under the api browser.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [November 9, 2017, 7:26am UTC](https://community.graylog.org/t/csv-export-using-api/3113/2 "2017-11-09T07:26:54Z")

</div>

> [@Mantil](#):
>
> Can a search result be output to csv via API.

Yes, absolutely!

You can request the search results of a query in CSV format by using the regular search resources (e. g. `/search/universal/absolute`) and setting the HTTP `Accept` header to `text/csv` or use the `/export` resource (e. g. `/search/universal/absolute/export`).

---

<div class="post-metadata">

**Author:** ![Mantil](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Mantil](https://community.graylog.org/u/Mantil)\
**Post date:** [November 9, 2017, 2:40pm UTC](https://community.graylog.org/t/csv-export-using-api/3113/3 "2017-11-09T14:40:00Z")

</div>

Thank you so much Jochen. I was even looking for an export resource but somehow my eyeballs must not be working. Again thank you for the response. This is gonna come in super handy.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [November 23, 2017, 2:40pm UTC](https://community.graylog.org/t/csv-export-using-api/3113/4 "2017-11-23T14:40:16Z")

</div>

Closed on November 23, 2017, 2:40pm UTC

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