Preferences
Manage your content preferences: muted keywords, advanced mute filters, and personalization settings.
Muted Keywords
Muted keywords let you hide tweets containing specific words, phrases, or hashtags from your timelines and notifications.
account.mutedKeywords()
Get all your currently muted keywords. Uses the v1.1 mutes/keywords/list endpoint.
const keywords = await client.account.mutedKeywords();
console.log(`${keywords.length} muted keywords`);account.updateMutedKeyword(params?)
Create or update a muted keyword. Uses the v1.1 mutes/keywords/update endpoint.
| Param | Type | Description |
|---|---|---|
params.id | string | The keyword mute ID (omit to create a new mute) |
params.keyword | string | The word, phrase, or hashtag to mute |
params.mute_surfaces | string | Where to apply the mute (e.g. "home_timeline,notifications") |
params.duration | number | Duration in seconds (0 for forever, 86400 for 24 hours, etc.) |
// Mute a keyword everywhere, forever
await client.account.updateMutedKeyword({
keyword: "spoiler",
mute_surfaces: "home_timeline,notifications",
duration: 0,
});
// Mute a keyword for 24 hours
await client.account.updateMutedKeyword({
keyword: "gameofthrones",
mute_surfaces: "home_timeline,notifications",
duration: 86400,
});
// Update an existing muted keyword
await client.account.updateMutedKeyword({
id: "keyword_id_123",
keyword: "spoiler",
mute_surfaces: "home_timeline",
duration: 604800, // 7 days
});account.deleteMutedKeyword(keywordId)
Remove a muted keyword. Uses the v1.1 mutes/keywords/destroy endpoint.
await client.account.deleteMutedKeyword("keyword_id_123");Advanced Mute Filters
Advanced filters let you automatically hide tweets from accounts that match certain criteria, such as new accounts, accounts without profile pictures, or unverified accounts.
account.advancedFilters()
Get your current advanced mute filter settings. Uses the v1.1 mutes/advanced_filters endpoint (GET).
const filters = await client.account.advancedFilters();
console.log(filters);account.updateAdvancedFilters(params?)
Update your advanced mute filter settings. Uses the v1.1 mutes/advanced_filters endpoint (POST).
| Param | Type | Description |
|---|---|---|
params.mute_new_accounts | boolean | Hide tweets from recently created accounts |
params.mute_not_following | boolean | Hide tweets from accounts you don't follow |
params.mute_default_profile_image | boolean | Hide tweets from accounts with default avatars |
params.mute_no_confirmed_email | boolean | Hide tweets from accounts without a confirmed email |
params.mute_no_confirmed_phone | boolean | Hide tweets from accounts without a confirmed phone |
await client.account.updateAdvancedFilters({
mute_new_accounts: true,
mute_not_following: false,
mute_default_profile_image: true,
mute_no_confirmed_email: true,
mute_no_confirmed_phone: false,
});Tip
Advanced mute filters are a great way to reduce spam and low-quality content in your notifications without having to manually block or mute individual accounts.
Personalization
account.personalizationInterests()
Get the interests Twitter has inferred about you based on your activity. These interests are used to personalize your timeline, ads, and recommendations. Uses the v1.1 account/personalization/twitter_interests endpoint.
Deprecated
The web client no longer calls account/personalization/twitter_interests. Use account.personalizationData().
const interests = await client.account.personalizationInterests();
console.log(interests);account.personalizationData()
Get the data X inferred about you: interests, languages, location history, login history and ad audiences. Needs client.elevate(password). Uses the v1.1 account/personalization/p13n_data endpoint.
account.personalizationPreferences()
Get your personalization and ads preferences.
account.setPersonalizationPreferences(preferences)
Update personalization and ads preferences, such as { allow_ads_personalization: false }.
account.partnerInterests()
Get the partner interests used for ads.
account.emailAdvertiserList()
Ask X to email you the list of advertisers that targeted you.
account.setOptoutCookies(allowAdsPersonalization)
Set the ads personalization opt-out cookie.
account.syncOptoutSettings(settings?)
Sync the logged-out personalization settings: allow_ads_personalization, link_logged_out_devices and share_data_with_third_party.
account.dataArchive()
Get the status and download links of your data archive. Needs client.elevate(password).
account.requestDataArchive(url?)
Request a new data archive.
account.preferences()
Get your user preferences. The old UserPreferences op is gone, so this merges four Relay queries: profile_customizationQuery, about_your_accountQuery, grokSettingsQuery and AudienceAndTaggingQuery. Each one also has its own getter and setter on the settings page.
const prefs = await client.account.preferences();
// { allow_video_downloads: true, allow_grok_memory: false, inferred_location_resolution_preference: "Country", ... }Full example
// View all muted keywords
const keywords = await client.account.mutedKeywords();
console.log(`Currently muting ${keywords.length} keywords`);
// Mute spoilers for a week. New mutes can also go through client.safety.muteKeyword()
await client.account.updateMutedKeyword({
keyword: "spoilers",
mute_surfaces: "home_timeline,notifications",
duration: 604800,
});
// Mute a hashtag forever
await client.account.updateMutedKeyword({
keyword: "#Spoiler",
mute_surfaces: "home_timeline,notifications",
duration: 0,
});
// Remove a muted keyword when you're done
await client.account.deleteMutedKeyword("keyword_id_123");
// Check current advanced filters
const filters = await client.account.advancedFilters();
console.log(`Advanced filters: ${JSON.stringify(filters)}`);
// Enable aggressive spam filtering
await client.account.updateAdvancedFilters({
mute_new_accounts: true,
mute_default_profile_image: true,
mute_no_confirmed_email: true,
mute_no_confirmed_phone: true,
});
// See what Twitter thinks you're interested in
const interests = await client.account.personalizationInterests();
console.log(`Twitter thinks you're interested in: ${JSON.stringify(interests)}`);
// Get general preferences
const prefs = await client.account.preferences();
console.log(`Preferences: ${JSON.stringify(prefs)}`);account.supportedLanguages()
The list of languages X supports (code, name, local name, status). Uses the GraphQL languageSupportedLanguagesQuery.
const langs = await client.account.supportedLanguages();
// [{ code: "en", name: "English", local_name: "English", status: "production" }, ...]account.altTextPrompt()
Get how x.com reminds you to add alt text to images: "None", "Nudge", "Prompt" or "Require". Uses the GraphQL accessibilityAltTextPreferenceQuery.
const prompt = await client.account.altTextPrompt(); // "None"account.setAltTextPrompt(promptType)
Untested
This mutation was built from the x.com web bundle and has not been run against a live account.
Change the alt text reminder. Uses the GraphQL accessibilityAltTextPreferenceMutation. Takes the same values account.altTextPrompt() returns.
await client.account.setAltTextPrompt("Require");account.setEducationFlag(flag)
Untested
This mutation was built from the x.com web bundle and has not been run against a live account.
Mark an x.com education prompt as seen so it stops showing. Uses the GraphQL useClientEducationFlagMutation. Flags in the web bundle include "AltTextEducation", "GrokEducation", "MuteKeywordEducation", "PinnedRepliesEducation" and "DownloadableVideosInform".
await client.account.setEducationFlag("GrokEducation");account.underTheHood()
Get your "Under the hood" report, which lists the checks Twitter runs on your account and the period they cover. Uses the GraphQL UserUnderTheHoodReport query. When Twitter includes report_json, it is parsed for you.
Deprecated
The web client dropped UserUnderTheHoodReport and has no replacement, so this call uses the legacy op table. It still answered on 2026-11-30.
const { report_info } = await client.account.underTheHood();
// { report_period: "August 2026", eligibility_checks: [{ key: "Account at least 1 year old", value: true }, ...] }