# Rest API

### Intro

XP contracts are accessible on-chain and off through our API service. No need to introduce web3.js into your stack if it's not needed. There are also no gas fees when using the off-chain Rest API service.

{% hint style="info" %}
Advantages

1. No need to integrate web3.js into your backend.
2. No need to show tx status and wait, our backend will queue and send off the transaction, so no need to create a bunch of UI status visuals.
   {% endhint %}


---

# 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://docs.xp-protocol.io/products/xp-protocol/integrations/rest-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.
