# Fetching Data

## Metadata
- Author: [[nextjs.org]]
- Full Title: Fetching Data
- Category: #articles
- Summary: Fetching data for an application can be done through various approaches such as APIs, ORMs, and SQL. APIs serve as an intermediary layer between the application code and the database, while SQL allows for direct interaction with the database. React Server Components offer benefits like support for promises and the ability to execute on the server. In the case of fetching data for a dashboard overview page, different components can be used to display revenue charts, latest invoices, and other relevant information. Parallel data fetching can be implemented to avoid request waterfalls and improve performance.
- URL: https://nextjs.org/learn/dashboard-app/fetching-data
## Highlights
- APIs are an intermediary layer between your application code and database. There are a few cases where you might use an API:
• If you're using third-party services that provide an API.
• If you're fetching data from the client, you want to have an API layer that runs on the server to avoid exposing your database secrets to the client.
In Next.js, you can create API endpoints using [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers). ([View Highlight](https://read.readwise.io/read/01jjn6gcnm8g9x5075mm2d5s52))