# API

On their own, websites, Excel spreadsheets and the like are very useful. They can provide an infinite range of ways of messing with data. However, what if you wanted to re-use specific 'ways of messing with data'? Excel provides a system of Data Queries, whereby your spreadsheet can connect to other places in order to request data or calculations. The mechanism by which the provider enables Excel to request data is called an API - an interface for an application. The user doesn't need to know anything about the API other than what data or function is wanted.

The same applies to a web app. Your app can request data from other apps or provide data itself all via APIs.

Excel can connect to other Excel files, databases or web apps. A web app can connect to databases and other web apps.

In terms of a web app, the usual way to understand an API is as a special type of URL. So for example I could have a URL like <https://www.somedata.com/get-data> which would return some data to my website when requested.

Don't worry about the mechanics of making requests and receiving responses for now\...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://johnkazer.gitbook.io/core-web-dev-concepts/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
