# How to check if the API response is the same as that of the database

**URL:** <https://community.postman.com/t/how-to-check-if-the-api-response-is-the-same-as-that-of-the-database/21508>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [March 17, 2021, 4:48pm UTC](https://community.postman.com/t/how-to-check-if-the-api-response-is-the-same-as-that-of-the-database/21508 "2021-03-17T16:48:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mirellae2e](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mirellae2e](https://community.postman.com/u/mirellae2e)\
**Post date:** [March 17, 2021, 4:48pm UTC](https://community.postman.com/t/how-to-check-if-the-api-response-is-the-same-as-that-of-the-database/21508/1 "2021-03-17T16:48:42Z")

</div>

\*\*  
We will use postman to automate our apis. I need help to validate that the API response is correct with what is in the database.\*\*

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [March 18, 2021, 12:32am UTC](https://community.postman.com/t/how-to-check-if-the-api-response-is-the-same-as-that-of-the-database/21508/2 "2021-03-18T00:32:36Z")

</div>

@mirellae2e Welcome to the community 💐

Kindly go through this [link](https://community.postman.com/t/how-to-best-ask-questions-on-community-to-get-the-answers-you-need/16912) and provide some more details here.

From your question, I understand that you are looking to validate the response from Postman against the DB values of yours. But what is already existing here? 🙂

Do you have any API’s calls/requests available to hit and get response from your DB? Or you need manually verify your DB for values? What DB you are using? Roughly how many fields we need to validate? If there are very few fields we can hardcode it to any variable and store in Postman, but in that case the data will not be refreshed for every run.

You can consider the [Data driven approach](https://community.postman.com/t/api-testing-a-beginners-view-data-driven-testing-in-postman/20302), to extract the DB results every time and then we can validate against the response from Postman.

Kindly provide some more details with screenshots/existing setup of yours to guide you better 😊
