# Persist REST API response data in database

**URL:** <https://community.neo4j.com/t/persist-rest-api-response-data-in-database/58566>\
**Category:** Import / Export\
**Tags:** import, migrated\
**Created:** [February 2, 2023, 10:55pm UTC](https://community.neo4j.com/t/persist-rest-api-response-data-in-database/58566 "2023-02-02T22:55:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zorro05](https://avatars.discourse-cdn.com/v4/letter/z/ec9cab/32.png) [@zorro05](https://community.neo4j.com/u/zorro05)\
**Post date:** [February 2, 2023, 10:55pm UTC](https://community.neo4j.com/t/persist-rest-api-response-data-in-database/58566/1 "2023-02-02T22:55:36Z")

</div>

Hi, excited to join and hoping you guys can help make my first step.

I would like to find out if it were possible with NEO4J to persist REST API response data in database?

So I want to import data into my database (from REST API) to then query that.

Possible and any pointers as to how?

Thanks.

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [February 10, 2023, 11:03am UTC](https://community.neo4j.com/t/persist-rest-api-response-data-in-database/58566/2 "2023-02-10T11:03:16Z")

</div>

Check out apoc.load.json

How you persist the response depends on the data that you get back.

> **[Importing JSON data from a REST API into Neo4j - Getting Started](https://neo4j.com/docs/getting-started/current/data-import/json-rest-api-import/)**
>
> This article demonstrates some techniques for loading data from JSON-based REST APIs into Neo4j.

Usually it makes sense to deconstruct the response into nodes and relationships.

Here is an stackoverflow example

> **[Load JSON - APOC Documentation](https://neo4j.com/docs/apoc/5/import/load-json/#load-json-examples-stackoverflow)**
>
> This section describes procedures that can be used to import JSON data from web APIs or files.

[![](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/3/7/3773fde27ec6dcc7d8c28a776fa69c098c196e82.jpeg "Loading Data from JSON Web APIs into Neo4j with apoc.load.json (#4)") ](https://www.youtube.com/watch?v=M1P1IlQdb5M)
