Connect Retool to Yoast SEO for WordPress via the WordPress REST API, which exposes Yoast SEO meta fields (meta title, meta description, focus keyphrase, SEO score, readability score) on post and page endpoints. Build a content SEO audit dashboard that identifies pages with missing meta descriptions, poor focus keyphrases, or low SEO scores across all WordPress posts without opening the WordPress editor.
| Fact | Value |
|---|---|
| Tool | Yoast SEO (WordPress) |
| Category | SEO |
| Method | REST API Resource |
| Difficulty | Beginner |
| Time required | 20 minutes |
| Last updated | April 2026 |
Build a Yoast SEO Content Audit Dashboard in Retool
Managing SEO metadata across hundreds or thousands of WordPress posts is tedious in the WordPress admin interface — you must open each post individually to view and edit Yoast SEO fields. Content teams and SEO managers dealing with large WordPress sites need a way to audit SEO completeness across all posts at once, identify pages with missing meta descriptions, spot focus keyphrase gaps, and prioritize which content to improve next.
Retool connects to Yoast SEO data through the WordPress REST API. When the Yoast SEO plugin is active, it enriches the standard /wp-json/wp/v2/posts response with a 'yoast_head_json' object containing structured SEO metadata: the rendered meta title, meta description, focus keyphrase, canonical URL, og:image, and for Yoast Premium users, SEO score and readability score. This data is available alongside WordPress's own post metadata without any additional plugin or API configuration.
A Retool SEO audit dashboard built on this foundation can display all posts in a Table with SEO completeness indicators — highlighting posts with empty meta descriptions, missing focus keyphrases, or titles that exceed 60 characters. SEO managers can then edit meta fields for specific posts directly from a Retool form that sends a PUT request to the WordPress API, updating Yoast fields without leaving the dashboard. This workflow is particularly valuable for agencies managing SEO across multiple WordPress client sites, each configured as a separate Retool resource.
Integration method
Yoast SEO does not have its own standalone API. Instead, Yoast SEO fields are exposed through the WordPress REST API as part of the standard post and page response objects. When Yoast SEO is active on a WordPress site, the /wp-json/wp/v2/posts and /wp-json/wp/v2/pages endpoints include a 'yoast_head_json' object with all Yoast meta fields. Connect to WordPress REST API using Application Passwords authentication and query post/page endpoints — Yoast data is included automatically. All Retool requests proxy server-side, so WordPress credentials never reach the browser.
Prerequisites
- A WordPress site with Yoast SEO plugin installed and activated (free version exposes meta fields; Premium exposes SEO and readability scores)
- WordPress 5.6 or higher — required for Application Passwords authentication
- Admin or Editor access to the WordPress site to create an Application Password
- A Retool account with permission to create Resources
- Your WordPress site URL (e.g., https://yoursite.com) for the REST API base URL
Step-by-step guide
Generate a WordPress Application Password for Retool
WordPress Application Passwords are the modern, secure authentication method for REST API access and do not require sharing your main WordPress login credentials. To create one, log in to your WordPress admin dashboard and navigate to Users → Profile (or Users → All Users → select your user account). Scroll down to the 'Application Passwords' section — if you do not see this section, ensure your WordPress site uses HTTPS (Application Passwords require SSL). In the 'New Application Password Name' field, enter a descriptive label like 'Retool SEO Dashboard'. Click the 'Add New Application Password' button. WordPress generates a 24-character password displayed once — copy it immediately and save it securely. The password is shown in grouped format like 'Ab12 Cd34 Ef56 Gh78 Ij90 Kl12'. When using it in Retool, you can include spaces or omit them — WordPress accepts both formats. The Application Password is separate from your WordPress account password: if the Retool integration is ever compromised, you revoke only the Application Password without affecting your account. In Retool's Settings → Configuration Variables, add two variables: WORDPRESS_USERNAME (your WordPress admin username, not email) and WORDPRESS_APP_PASSWORD (the generated Application Password). Mark WORDPRESS_APP_PASSWORD as secret. Your username is the short name shown in the WordPress admin sidebar, not your display name or email address.
Pro tip: Create a dedicated WordPress user account specifically for the Retool integration (e.g., 'retool-api' with Editor role) rather than using your personal admin account. This limits access scope and makes credential management cleaner if team members change.
Expected result: You have a WordPress Application Password stored as a secret configuration variable in Retool, alongside your WordPress username.
Create the WordPress REST API Resource in Retool
In Retool, click the Resources tab and Add Resource. Select REST API from the list. Name it 'WordPress API' or include your site name for clarity (e.g., 'YourSite WordPress API') if you manage multiple WordPress sites in Retool. In the Base URL field, enter your WordPress site's REST API base URL in the format: https://yoursite.com/wp-json/wp/v2. Replace 'yoursite.com' with your actual domain. Do not include a trailing slash. The /wp-json/wp/v2 path is the standard REST API namespace for WordPress core and Yoast SEO data — all post, page, category, and tag endpoints are under this prefix. Scroll to the Authentication section and select Basic Auth from the dropdown. In the Username field, enter {{ retoolContext.configVars.WORDPRESS_USERNAME }}. In the Password field, enter {{ retoolContext.configVars.WORDPRESS_APP_PASSWORD }}. WordPress Application Passwords work with Basic Auth — WordPress automatically recognizes them as separate from account passwords. In the Headers section, add a default header: Content-Type = application/json. Click Save Changes. Test the resource by creating a quick GET query to /posts?per_page=1 — if the response includes post data and a 'yoast_head_json' key in the first result, the Yoast SEO fields are successfully being returned. If 'yoast_head_json' is absent, verify that Yoast SEO is active on the WordPress site.
Pro tip: If you manage multiple WordPress client sites, create a separate Retool resource for each site (named by client domain). This allows building a single multi-site dashboard that queries each resource independently and aggregates SEO data across all clients.
Expected result: A WordPress API resource appears in Retool and a test query to /posts?per_page=1 returns a post object containing a 'yoast_head_json' field with Yoast SEO data.
Build a query to retrieve all posts with Yoast SEO fields
With the resource created, open or create a Retool app. In the Code panel, create a new query, select your WordPress API resource, set Method to GET, and Path to /posts. Yoast SEO fields are included by default in the standard post response — no additional fields parameter is needed. Add URL parameters to control the query behavior: key 'per_page', value {{ perPageSelect.value || 100 }} (WordPress maximum is 100 per request); key 'status', value 'publish' (or 'any' to include drafts); key 'orderby', value 'modified'; key 'order', value 'desc'. This retrieves the 100 most recently modified published posts. For sites with more than 100 posts, add pagination: include a key 'page', value {{ pagination.page || 1 }}. Name this query 'getPosts' and enable 'Run query when app loads'. Write a JavaScript transformer to extract the Yoast fields from each post and calculate a SEO completeness score. The yoast_head_json object contains keys like: title (meta title), description (meta description), schema (structured data), og_image (Open Graph image array), and for Yoast Premium: article_modified_time and author. Extract these fields and flatten them into a single object per post for clean Table display. Also extract WordPress native fields: post ID, slug, post date, and the post title from post.title.rendered.
1// Transformer: extract Yoast SEO fields from WordPress posts2const posts = data || [];3return posts.map(post => {4 const yoast = post.yoast_head_json || {};5 const metaTitle = yoast.title || '';6 const metaDesc = yoast.description || '';7 const keyphrase = post.meta?._yoast_wpseo_focuskw || yoast.og_title || '';8 const hasOgImage = !!(yoast.og_image && yoast.og_image.length > 0);910 // Calculate SEO completeness score (0-100)11 let score = 0;12 if (metaTitle) score += 30;13 if (metaTitle.length >= 30 && metaTitle.length <= 60) score += 10;14 if (metaDesc) score += 30;15 if (metaDesc.length >= 120 && metaDesc.length <= 155) score += 10;16 if (keyphrase) score += 20;1718 return {19 id: post.id,20 title: post.title?.rendered || '(no title)',21 slug: post.slug,22 meta_title: metaTitle,23 meta_title_length: metaTitle.length,24 meta_description: metaDesc,25 meta_desc_length: metaDesc.length,26 focus_keyphrase: keyphrase,27 has_og_image: hasOgImage ? 'Yes' : 'No',28 seo_score: score,29 last_modified: new Date(post.modified).toLocaleDateString()30 };31});Pro tip: The focus keyphrase (focus keyword) may appear either in post.meta._yoast_wpseo_focuskw or may not be exposed in the REST API by default. If it is missing from responses, install the 'Yoast SEO API' plugin or add a WordPress REST API filter to expose the Yoast meta fields in the post response.
Expected result: The getPosts query returns an array of post objects with flattened Yoast SEO fields and a calculated SEO completeness score for each post.
Build the SEO audit dashboard UI
With post data returning Yoast fields, build the audit dashboard. From the component panel, drag a Table component onto the canvas and bind its Data property to {{ getPosts.data }}. Configure the visible columns: title (set to render as a link to https://yoursite.com/?p={{ row.id }}), meta_title_length, meta_description (truncate with ellipsis), meta_desc_length, focus_keyphrase, seo_score, and last_modified. Apply conditional column formatting to the seo_score column: green background for scores >= 80, yellow for 50-79, red for < 50. Apply character length warning formatting to meta_title_length: red text for values > 60 or < 30. Do the same for meta_desc_length: red for values > 155 or < 120. Add a row of summary stats above the table: total post count, average SEO score, count of posts with empty meta descriptions, and count of posts missing focus keyphrases — calculate these with JavaScript transformers referencing getPosts.data. Add a search Text Input component bound to the Table's search property for filtering by post title or slug. Below the table, add a Container that shows when a row is selected: display the selected post's full meta title and meta description in Text components, with character count indicators. Add a Select component for the per_page value (options: 10, 25, 50, 100) and trigger query refresh when it changes via event handler.
1// JavaScript query: calculate SEO audit summary stats2const posts = getPosts.data || [];3const avgScore = posts.length > 04 ? (posts.reduce((sum, p) => sum + p.seo_score, 0) / posts.length).toFixed(0)5 : 0;6const missingMetaDesc = posts.filter(p => !p.meta_description).length;7const missingKeyphrase = posts.filter(p => !p.focus_keyphrase).length;8const titleTooLong = posts.filter(p => p.meta_title_length > 60).length;910return {11 total_posts: posts.length,12 avg_seo_score: avgScore + '/100',13 missing_meta_desc: missingMetaDesc,14 missing_keyphrase: missingKeyphrase,15 title_too_long: titleTooLong16};Pro tip: Add a 'Pages' toggle to your dashboard so users can switch between auditing Posts and Pages. Create a second query with Path /pages using the same transformer, and toggle between the two queries using a Segment Control component bound to the table's data source.
Expected result: A SEO audit dashboard displays all WordPress posts with Yoast SEO completeness scores, character length warnings, and summary statistics highlighting the biggest SEO gaps.
Add meta field editing capability from Retool
The final step makes the dashboard actionable: allow SEO managers to update Yoast meta fields directly from Retool without opening WordPress. When a Table row is selected, show an edit form. Add a Text Input component named 'metaTitleInput' with label 'Meta Title' and default value {{ postsTable.selectedRow.meta_title }}. Add a Multiline Text Input named 'metaDescInput' with label 'Meta Description' and default value {{ postsTable.selectedRow.meta_description }}. Add character count Text components below each input: 'Characters: {{ metaTitleInput.value.length }}/60' and 'Characters: {{ metaDescInput.value.length }}/155'. Add an Update button. Create a PUT query named 'updatePost': select the WordPress API resource, set Method to PUT, and Path to /posts/{{ postsTable.selectedRow.id }}. Set Body Type to JSON and Body to: { "meta": { "_yoast_wpseo_title": "{{ metaTitleInput.value }}", "_yoast_wpseo_metadesc": "{{ metaDescInput.value }}" } }. Add a Confirm Modal to the Update button before triggering the query. In the updatePost query's On Success event handler, add 'Trigger query → getPosts' to refresh the list, and 'Show notification' with message 'SEO meta updated for ' + postsTable.selectedRow.title. Note: Yoast SEO meta fields must be registered for REST API exposure — if the PUT request succeeds but changes don't appear in WordPress, add a code snippet to your WordPress theme's functions.php or a custom plugin that calls register_rest_field() to expose and allow writing to the Yoast meta keys. For complex multi-site SEO management workflows, RapidDev can help configure the full WordPress REST API exposure and Retool dashboard architecture.
1// WordPress functions.php snippet to expose Yoast meta fields in REST API2// Add to your theme's functions.php or a custom plugin3add_action('rest_api_init', function() {4 $yoast_fields = [5 '_yoast_wpseo_title',6 '_yoast_wpseo_metadesc',7 '_yoast_wpseo_focuskw'8 ];9 foreach ($yoast_fields as $field) {10 register_rest_field('post', $field, [11 'get_callback' => function($post) use ($field) {12 return get_post_meta($post['id'], $field, true);13 },14 'update_callback' => function($value, $post) use ($field) {15 update_post_meta($post->ID, $field, sanitize_text_field($value));16 },17 'schema' => ['type' => 'string']18 ]);19 }20});Pro tip: Yoast SEO Premium stores SEO and readability scores in post meta under keys _yoast_wpseo_linkdex (SEO score 0-100) and _yoast_wpseo_content_score. Register these fields in the REST API using the same pattern to display actual Yoast scores in your Retool dashboard.
Expected result: Selected posts can have their Yoast meta title and meta description updated directly from the Retool form, with changes reflected in the list after refresh.
Common use cases
Build a Yoast SEO completeness audit across all WordPress posts
Create a Retool dashboard that queries all WordPress posts and surfaces Yoast SEO field completeness. Display a Table with columns for post title, meta title length, meta description presence, focus keyphrase, and a completeness score calculated by counting non-empty Yoast fields. Filter and sort to immediately identify the lowest-completeness posts that need SEO attention first.
Build a Retool SEO audit dashboard that queries all WordPress posts, extracts Yoast SEO meta fields, calculates a completeness percentage for each post (checking meta title, meta description, and focus keyphrase), and shows a filterable Table sorted by lowest completeness score.
Copy this prompt to try it in Retool
Build a bulk meta description editor for WordPress content
Create a Retool panel where SEO managers can select any WordPress post from a list, view its current Yoast meta title and meta description, edit both fields in a side form, and save changes via the WordPress REST API. Include character count indicators that turn red when meta title exceeds 60 characters or meta description exceeds 155 characters.
Build a Retool panel showing all WordPress posts in a Table. When a row is selected, show the current Yoast meta title and meta description in editable text fields with character counters. Include a Save button that PUTs the updated meta fields back to WordPress.
Copy this prompt to try it in Retool
Build a focus keyphrase gap analysis dashboard
Create a Retool SEO analysis panel that lists all WordPress posts alongside their Yoast focus keyphrases. Display posts grouped by keyphrase (or 'No keyphrase' for empty ones), enabling SEO managers to identify keyword cannibalization where multiple posts target the same keyphrase, and spot content gaps where important keywords are not covered.
Build a Retool dashboard that queries all WordPress posts with their Yoast focus keyphrases, groups posts by keyphrase to identify duplicates, and shows posts with empty keyphrases separately for prioritized optimization.
Copy this prompt to try it in Retool
Troubleshooting
WordPress REST API returns 401 Unauthorized when using Application Password
Cause: Application Passwords require the WordPress site to use HTTPS. Sites serving content over HTTP return 401 errors even with correct credentials. Additionally, some hosting providers and security plugins (like Wordfence or All In One WP Security) disable Application Passwords by default.
Solution: Verify your WordPress site URL uses https:// in the Retool resource Base URL. Check that HTTPS is working by visiting https://yoursite.com in a browser. If your hosting provider disables Application Passwords, check the security plugin settings or contact your host. You can also verify Application Passwords are enabled at your WordPress installation by checking if the Applications Passwords section appears in Users → Profile.
WordPress post responses do not include 'yoast_head_json' field
Cause: Yoast SEO must be installed and activated on the WordPress site for its fields to appear in REST API responses. Some older versions of Yoast SEO (below 14.0) do not include the yoast_head_json structure. Additionally, if the request is made to a non-standard REST endpoint or namespace, Yoast may not inject its data.
Solution: Confirm Yoast SEO is active by visiting WordPress admin → Plugins and verifying Yoast SEO shows 'Active'. Update Yoast SEO to the latest version via Plugins → Yoast SEO → Update. Verify you are querying /wp-json/wp/v2/posts (not a custom namespace) — the standard wp/v2 namespace is where Yoast injects its data. Test by visiting https://yoursite.com/wp-json/wp/v2/posts?per_page=1 in your browser to inspect the raw response.
PUT request to update Yoast meta fields succeeds (200 OK) but changes are not reflected in WordPress
Cause: Yoast SEO meta fields (_yoast_wpseo_title, _yoast_wpseo_metadesc) are not registered for REST API write access by default. WordPress only allows updating REST API fields that are explicitly registered with update_callback in register_rest_field(). Without this registration, the API silently ignores unregistered meta keys in PUT requests.
Solution: Add the register_rest_field() code snippet (shown in Step 5) to your WordPress theme's functions.php or a custom plugin. After adding the code, verify by sending a PUT request and checking the WordPress post in the editor to confirm the Yoast meta fields are updated. Alternatively, use the WordPress Classic Editor API pattern: send the Yoast data as part of the post's 'meta' object, but only if the meta keys are explicitly registered.
Best practices
- Store WordPress credentials (username and Application Password) in Retool Configuration Variables marked as secret — Application Passwords are as sensitive as account passwords for API access purposes
- Implement pagination in your post list query using WordPress's 'page' and 'per_page' parameters rather than setting per_page to maximum (100) — for sites with 500+ posts, pagination keeps individual query response times under 5 seconds
- Calculate SEO completeness scores in JavaScript transformers rather than in the database — WordPress post meta is the source of truth, and scores calculated client-side stay fresh with every data refresh
- Always check meta title character count (target 30-60 chars) and meta description length (target 120-155 chars) in your transformer and flag out-of-range values with conditional table formatting
- Cache the post list query for at least 60 seconds in Retool's Advanced query settings — Yoast SEO fields are stored in WordPress post meta and do not change between user sessions, making caching highly effective for team dashboards
- Add the focus keyphrase as a column to your audit table and sort by it to quickly identify keyword cannibalization — multiple posts targeting the same keyphrase can harm search rankings
- Use Retool Workflows to schedule weekly SEO audit reports: query all posts, calculate completeness scores, filter posts with score below 60, and send the list via email to the content team for systematic improvement
Alternatives
Google Search Console tracks actual search performance (clicks, impressions, average position) rather than on-page metadata — a complementary tool to pair with your Yoast audit dashboard to see which optimization improvements correlate with ranking changes.
The main WordPress integration guide covers the full WordPress REST API for post creation, user management, and media operations — use this alongside the Yoast-specific guide when you need broader content management capabilities beyond just SEO meta fields.
SEMrush provides keyword difficulty, search volume, and competitive analysis data that complements Yoast's on-page optimization — connect both in Retool to build a dashboard that combines your content metadata with external SEO market data.
Frequently asked questions
Does Yoast SEO have its own API, or do I access it through WordPress?
Yoast SEO does not have a standalone API. Its data is exposed through the WordPress REST API. When Yoast SEO is installed and active on a WordPress site, the standard /wp-json/wp/v2/posts and /wp-json/wp/v2/pages endpoints automatically include a 'yoast_head_json' object containing Yoast's meta title, meta description, og:image, schema markup, and other SEO data. You access this data by connecting to the WordPress REST API in Retool — no additional Yoast configuration is required to read the data.
Can I see Yoast's SEO score (red/yellow/green) in Retool?
Yoast's visual SEO score (the red/yellow/green traffic light) is calculated client-side in the WordPress editor and is not directly stored as a retrievable integer via the REST API in the free version of Yoast SEO. Yoast Premium stores the calculated score in post meta under the key '_yoast_wpseo_linkdex' (0-100 integer). To access this in Retool, register the field for REST API access using the register_rest_field() WordPress function shown in Step 5 of this guide.
How do I access Yoast SEO data for WordPress pages (not just posts)?
WordPress pages are accessible at /wp-json/wp/v2/pages with the same Yoast SEO field structure. Create a second Retool query using the same resource with Path /pages and identical URL parameters and transformer. Add a Segment Control or Tab Container to your Retool dashboard to toggle between posts and pages, binding the Table's data property to the currently active query's output.
Can I bulk update Yoast SEO meta fields for many posts at once from Retool?
Yes, using Retool's JavaScript queries with async/await. Create a JavaScript query that iterates over an array of selected posts and sends individual PUT requests to /posts/{id} for each one with a delay between requests to avoid overwhelming WordPress. Use the Table component's selectedRows property to capture multiple selections. For very large bulk operations (100+ posts), use Retool Workflows with a Loop block that processes posts sequentially with configurable retry logic.
My WordPress site has thousands of posts — how do I efficiently audit all of them in Retool?
Use WordPress's pagination parameters ('page' and 'per_page') with per_page set to 100 (the maximum). Add a Retool Pagination component and bind the page parameter to it. For a complete audit of all posts in a single session, use a Retool Workflow that loops through pages automatically: start at page 1, fetch 100 posts, store results to Retool Database, increment the page counter, and repeat until the response returns fewer than 100 posts. Your Retool dashboard then reads from the cached Retool Database instead of querying WordPress on demand.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation