I am new to WordPress and I have been hacking around the API in order to correct the links in my old blog posts that I imported when I moved from BlogEngine.net to WP.  In doing so, I found a lot of people questioning how to find out what their $siteid is.

As it turns out, it is quite simple to get this information.

I did it like this:

  1. Install the chrome postman extension.  It is free and allows you to make JSON requests from chrome.
  2. Enter the URL: https://public-api.wordpress.com/rest/v1/sites/www.yoursitenamehere.com
  3. Choose GET in the drop down box.
  4. Press the Send button.
  5. The results displayed will show your siteid as ID and some other information.

*Note you replace the www.yoursitenamehere.com text in step 1 with your actual fully qualified domain name.

Example of getting $siteid for a wordpress site.