> For the complete documentation index, see [llms.txt](https://docs.bodt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bodt.io/data-source/wordpress-api-integration.md).

# WordPress API Integration

Bodt.io provides direct integration with WordPress API. Direct integration with API has the following advantages over the regular web-scraping way.&#x20;

* We are able to train our models with higher-quality data from your website
* You can choose what content types (posts/pages/products etc.) to index. This provides an easy way to control the data you want to use with the bodt.&#x20;
* Using APIs directly helps you avoid scraping issues like blocking by ISPs, etc.&#x20;
* You are able to add protected content using credentials specifically for Bodt.&#x20;
* The entire process is much faster than regular scraping

### Add WordPress Site

To add a new WordPress website, navigate to the "Data Sources" sidebar and Click on "Add Source". Choose "WordPress" as the source and click on it.&#x20;

A new form opens up that will request details for your WordPress setup. You need to provide the following details

**Website Name**\
Name of the WordPress site you want to use.&#x20;

**Website URL**\
The URL to your WordPress setup. Do use a complete URL, including the https/http prefix.&#x20;

**Content Types**\
You will need to choose content types that you would like to use to train the model. We will need at least one content type to train the model.&#x20;

**Credentials**\
If you would want to use protected content (behind WordPress login) to train our model, please create an application password for our app. [Learn more about the application password](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/#Getting-Credentials).

Add the username and password for the application password for us to access your protected content.&#x20;

Once you fill in all the details, click on "Add Source" to save all the details.&#x20;

<figure><img src="/files/2XfXuwWXzSHCvGeg0Ed2" alt=""><figcaption><p>Add WordPress Source for Bodt.io</p></figcaption></figure>

### Train Model

To train a model choose the links you want to use to train our AI models and click on "Train Selected".&#x20;

In case you want to use all the URLs, click on "Train All" and the system will use all website links to train the bot.&#x20;

### Remove a link

In case you want to remove the URLs used earlier as part of the training data, simply click on the "Delete" link next to it. It will remove the URL from the system and will not be used further to answer any queries.&#x20;

### Delete the WordPress Source

If you would like to remove the entire website as the source for bodt, simply navigate to the required source and click on the "Delete Source" button to remove it from the system.&#x20;

### Tutorial

{% embed url="<https://www.loom.com/share/4a8dc0dec5634f0dbd09dc62f63c0b01?sid=b4fd0a4f-0369-40a1-8769-3ccc02eeb369>" %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.bodt.io/data-source/wordpress-api-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
