# 编写APIs

Laravel 开发人员最常见的任务是创建API，通常是JSON和REST或者类REST，用于第三方与Laravel应用程序数据进行交互。

Laravel使得使用JSON变的容易，资源控制器已经围绕REST verbs和模式进行了结构化。在本章中你将学习基础的API编写概念，Laravel为编写API提供工具，当你编写第一个API的时要考虑外部工具和组织系统。


---

# 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://liseen315.gitbook.io/laravel/bian-xie-apis.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.
