Format of REST API URL for state.source.api

With the package wp-source we have to set a URL for the REST API server that is going to provide the data. This URL is set as the value of state.source.api

module.exports = {
  packages: [
      name: "@frontity/wp-source",
      state: {
        source: {
          api: "",

The format of this URL may vary depending on the type of Wordpress installation you want to use as a source of data.

For a self-hosted WordPress site (i.e. local or web based) it would be something like:

For a site it would be something like:

In the case of self-hosted WordPress site, most of the sites recommend using the following format

As I understand this shows you only the part of the data that is under the namespace /wp/v2

For example If we go to we can see

Captura de pantalla 2020-07-01 a las 18.31.44

But if we go to we only see the part corresponding to /wp/v2

So, I understand the format required is just so Frontity can also acesss to other namespaces like:

  • contact-form-7/v1 → Contact Form plugin data
  • yoast/v1 & yoast/v1/myyoast → Yoast plugin data
  • acf/v3 → Advanced Custom Fields plugin data
  • and others…

But what happens to the sites hosted in where is using ?

For example:

Isn’t this showing just the namespace /wp/v2?
I understand the free sites doesn’t allow you to install plugins but paid ones do.
What happen to these wordpress sites that have plugins installed?
Is there a different URL to be set in these cases?

And regarding self-hosted sites…
Couldn’t be Frontity smart enough to accepts either and and take only the part that works? Is it doing this right now?

It’s really not clear to me either and I cannot find this info online. lists a number of routes that are fixed and I cannot see a way to access data from e.g. acf plugin if you pay for the premium hosting on and install the Advanced Custom Fields Plugin

@David do you have some idea here? Is is possible to access data from WP plugins in a namespace different than wp/v2 for sites hosted on

If I understand you correctly you are suggesting that frontity accepts both formats as a parameter to state.source.api, correct? I think this might work, because the site content is always fetched from the /wp/v2 endpoint, and we are actually always attaching the /wp/v2 here if he site is But if the If the user wants to fetch custom data from a different plugin they have to do sth like:


So, in that case, we don’t need the wp/v2.

The only thing that maybe conflicts with this is if we have some plans for wp-source v2.0 that would have a built-in way of fetching data from plugins that support the WP REST API… @luisherranz Do you have any plans of this sort ?

1 Like

From my understanding, the weird REST API URL ( is only used for the /wp/v2 endpoint, which is the only thing you have in the free tier of anyway.

Once you want to install plugins, you need to upgrade to the Business plan. You also get a custom domain.

In that plan, you should be able to use to access the REST API, just like any other self-hosted WordPress site.

I believe that is how it works, but I haven’t confirmed it yet. So it’d be awesome to confirm it 100% :slight_smile:

@juanma maybe you could upgrade a site to the Business plan and explore it a bit more.

Yeah, Luis is right. I don’t remember where I read that though, I just did a quick search on the internet and I didn’t found anything about that. :slightly_frowning_face:

@Pablo can you help with this?
I’d like to upgrade to the business plan this site →
So we can still plugins and check how the REST API behaves in in business mode

After upgrading the site to a “Business plan” I managed to install some plugins and find out that a new URL is provided as a subdomain of which give you access to all the namespaces of the REST API

I have created a guide to explain what is the REST API URL of a WP site depending on the type of installation