> For the complete documentation index, see [llms.txt](https://learnhtml.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnhtml.gitbook.io/project/appml-api.md).

# AppML API (ok)

![](/files/-MHaj4A9I2jyGmu6uP1Q)

C:\xampp\htdocs\abc\index.php

```
<!DOCTYPE html>
<html lang="en-US">
<title>Customers</title>
<link rel="stylesheet" href="style.css">
<script src="https://www.w3schools.com/appml/2.0.3/appml.js"></script>
<body>
  <p id="demo"></p>
  <script type="text/javascript">
	  var myObj, myArr, len, i, txt = "";
	  // Create an AppML object and fetch the data
	  myObj = new AppML();
	  myObj.dataSource = "customers.php";
	  myObj.getData();
	  // Locate the data records
	  myArr = myObj.data.records;
	  len = myArr.length;
	  // Display the records
	  for (i = 0; i < len; i++) { txt += myArr[i].CustomerName + "<br>"; } document.getElementById("demo").innerHTML = txt;
  </script>
</body>
</html>
```

C:\xampp\htdocs\abc\customers.php

```
{
  "records": [
    { "CustomerName": "Alfreds Futterkiste", "City": "Berlin", "Country": "Germany" },
    { "CustomerName": "Ana Trujillo Emparedados y helados", "City": "México D.F.", "Country": "Mexico" },
    { "CustomerName": "Antonio Moreno Taquería", "City": "México D.F.", "Country": "Mexico" },
    { "CustomerName": "Around the Horn", "City": "London", "Country": "UK" },
    { "CustomerName": "B's Beverages", "City": "London", "Country": "UK" },
    { "CustomerName": "Berglunds snabbköp", "City": "Luleå", "Country": "Sweden" },
    { "CustomerName": "Blauer See Delikatessen", "City": "Mannheim", "Country": "Germany" },
    { "CustomerName": "Blondel père et fils", "City": "Strasbourg", "Country": "France" },
    { "CustomerName": "Bólido Comidas preparadas", "City": "Madrid", "Country": "Spain" },
    { "CustomerName": "Bon app'", "City": "Marseille", "Country": "France" },
    { "CustomerName": "Bottom-Dollar Marketse", "City": "Tsawassen", "Country": "Canada" },
    { "CustomerName": "Cactus Comidas para llevar", "City": "Buenos Aires", "Country": "Argentina" },
    { "CustomerName": "Centro comercial Moctezuma", "City": "México D.F.", "Country": "Mexico" },
    { "CustomerName": "Chop-suey Chinese", "City": "Bern", "Country": "Switzerland" },
    { "CustomerName": "Comércio Mineiro", "City": "São Paulo", "Country": "Brazil" }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://learnhtml.gitbook.io/project/appml-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.
