Skip to content

WordPress - Get Media

This module allows querying and searching files in the WordPress media library. Supports filters by file type (images, videos, PDF) and text search.

FieldDescriptionExample
urlWordPress site base URLhttps://my-site.com
usernameWordPress usernameadmin
application_passwordApplication password generated in WordPressxxxx xxxx xxxx xxxx
FieldTypeRequiredDescription
credentials_idcredentialsYesWordPress credential
media_idtextNoSpecific ID. If empty, lists all
searchtextNoSearch term
mime_typeselectNoFilter: All, Images, Videos, PDF
per_pagenumberNoResults per query (1-100). Default: 10
{
"success": true,
"media": [
{
"id": 789,
"title": { "rendered": "logo-empresa" },
"source_url": "https://misitio.com/wp-content/uploads/2025/01/logo.png",
"mime_type": "image/png",
"media_details": {
"width": 800,
"height": 600,
"sizes": { "thumbnail": { "source_url": "..." } }
}
}
],
"total": 45
}
{
"mime_type": "image"
}
{
"search": "logo"
}
{
"media_id": "789"
}
  • The media ID can be used as featured_media in the Create/Update Post nodes
  • The source_url field contains the public file URL
  • media_details includes dimensions and thumbnails for images
  • WordpressUploadMedia - Upload new files to the library
  • WordpressCreatePost - Create post with featured image
  • WordpressCreatePage - Create page with featured image