Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

XML-RPC WordPress API/Categories & Tags

Methods related to categories and tags. As of WordPress 3.4, clients should prefer methods from the Taxonomies component.

wp.getCategories

Retrieve list of categories.

Parameters

  • int blogid
  • string username
  • string password

Return Values

  • array
    • struct
      • string categoryId
      • string parentId
      • string categoryName
      • string categoryDescription
      • string description: Name of the category, equivalent to categoryName.
      • string htmlUrl
      • string rssUrl

Errors

  • 401

Replacement

As of WordPress 3.4, it is preferable to use the wp.getTerms method, with category as the taxonomy_name parameter.

wp.suggestCategories

Retrieve list of categories that start with a given string.

Added in WordPress 2.2.

Parameters

  • int blogid
  • string username
  • string password
  • string category: Beginning of category name.
  • int max_results

Return Values

  • array
    • struct
      • string category_id
      • string category_name

Errors

  • 401

Replacement

As of WordPress 3.4, it is preferable to use the wp.getTerms method, with category as the taxonomy_name parameter and the category prefix as the search parameter.

wp.newCategory

Create a category.

Added in WordPress 2.2.

Parameters

  • int blogid
  • string username
  • string password
  • struct category
    • string name
    • string description
    • int parent_id
    • string slug

Return Values

  • int category_id

Errors

Replacement

As of WordPress 3.4, it is preferable to use the wp.newTerm method, with category as the taxonomy_name parameter.

wp.deleteCategory

Delete an existing category.

Added in WordPress 2.5.

Parameters

  • int blogid
  • string username
  • string password
  • int category_id

Return Values

  • bool true

Errors

Replacement

As of WordPress 3.4, it is preferable to use the wp.deleteTerm method, with category as the taxonomy_name parameter.

wp.getTags

Retrieve list of all tags.

Added in WordPress 2.7.

Parameters

  • int blogid
  • string username
  • string password

Return Values

  • array
    • struct
      • int tag_id
      • string name
      • string slug
      • int count
      • string html_url
      • string rss_url

Errors

  • 401

Replacement

As of WordPress 3.4, it is preferable to use the wp.getTerms method, with post_tag as the taxonomy_name parameter.