Import Joomla! Articles Using Web Services API
One of the new features for Joomla 4 is the Web Services API. You can use the Web Services API to import articles and content between various Joomla! websites. The first step is to get your Joomla API Token to be able to use the Web Services API.
1. Get API Token from Source Website
- Log into your Joomla 4 Administration backend
- Go to the User Menu (top right of screen)
- Select Edit Account
- Click on the Joomla API Token tab
- Copy your token
2. Create a New Single Import at Destination
- Navigate to TF Import -> Singles.
- Click on New.
- Select Type: API
- Select the Joomla! category you want to import the article.
Under the API tab, use the following settings:
Base Url: https://example.com/api/index.php/v1/content/articles
You can check the Joomla! core API endpoints.
Curl Method: GET
Json to Array: Yes
Array Keys: data,attributes
Curl Headers: Key - Authorization; Value - Bearer <your token>
Under the Link Tab,
Link to Save: Enter the Joomla Article ID from the source website to import.
Click Preview. Under the Content tab, you should see the source content in the form of array.
4. Set Rules to Get Content
Finally, you can set the grabber and processor rules to get different parts of content like title, text, images, tags, custom fields.