Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:
md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>Results
Theme Data
{
"search": {
"provider": "local",
"options": {
"locales": {
"root": {
"translations": {
"button": {
"buttonText": "搜尋文件",
"buttonAriaLabel": "搜尋文件"
},
"modal": {
"noResultsText": "沒有找到相關結果",
"resetButtonTitle": "清除搜尋條件",
"footer": {
"selectText": "選擇",
"navigateText": "切換"
}
}
}
},
"en": {
"translations": {
"button": {
"buttonText": "Search docs",
"buttonAriaLabel": "Search docs"
},
"modal": {
"noResultsText": "No results found",
"resetButtonTitle": "Clear query",
"footer": {
"selectText": "Select",
"navigateText": "Navigate"
}
}
}
}
}
}
},
"siteTitle": "XOProxy Documentation",
"nav": [
{
"text": "Return to main site",
"link": "https://XoProxy.seekingdream.cn",
"target": "_blank"
},
{
"text": "Guide",
"link": "/en/introduce/introduce-home"
}
],
"sidebar": [
{
"text": "Getting Started",
"items": [
{
"text": "Overview",
"link": "/en/introduce/introduce-home"
},
{
"text": "Sign Up & Log In",
"link": "/en/introduce/introduce-login"
}
]
},
{
"text": "Static Residential Proxies",
"items": [
{
"text": "Order Proxies",
"link": "/en/static-proxy/order"
},
{
"text": "Manage Orders",
"link": "/en/static-proxy/manage-orders"
},
{
"text": "How to Use Your Static Residential Proxies",
"link": "/en/static-proxy/how-to-use"
},
{
"text": "Manage Auto-Renewal",
"link": "/en/static-proxy/auto-renew"
}
]
},
{
"text": "Account Settings",
"items": [
{
"text": "Account Dashboard",
"link": "/en/account/dashboard"
},
{
"text": "Change Password",
"link": "/en/account/change-password"
},
{
"text": "Orders & Invoices",
"link": "/en/account/invoices"
},
{
"text": "XoProxy Wallet",
"link": "/en/account/wallet"
}
]
},
{
"text": "FAQ",
"items": [
{
"text": "General Questions",
"collapsed": true,
"items": [
{
"text": "Where can I see the proxies I purchased?",
"link": "/en/problem-set/where-to-view-purchased-proxies.md"
},
{
"text": "Do you offer both IPv4 and IPv6 proxies?",
"link": "/en/problem-set/ipv4-and-ipv6-proxies.md"
},
{
"text": "Do you provide rotating proxies?",
"link": "/en/problem-set/do-you-offer-rotating-proxies.md"
},
{
"text": "What types of authentication do your proxies support?",
"link": "/en/problem-set/supported-authentication-methods.md"
},
{
"text": "Do you support city-level targeting?",
"link": "/en/problem-set/city-level-targeting-supported.md"
},
{
"text": "Can I purchase proxies for a specific city?",
"link": "/en/problem-set/buy-proxies-for-a-specific-city.md"
},
{
"text": "Are XOProxy proxies private or shared?",
"link": "/en/problem-set/private-vs-shared-proxies.md"
},
{
"text": "Which internet protocols does XOProxy support?",
"link": "/en/problem-set/supported-internet-protocols.md"
},
{
"text": "Can I integrate the proxies with third-party apps, bots, and automation tools?",
"link": "/en/problem-set/integrate-proxies-with-apps-bots-automation.md"
},
{
"text": "Do XOProxy residential IPs have bandwidth limits?",
"link": "/en/problem-set/isp-residential-bandwidth-limits.md"
},
{
"text": "What types of IPs can I purchase?",
"link": "/en/problem-set/ip-types-you-can-buy.md"
},
{
"text": "What is the difference between static residential (ISP) proxies and datacenter proxies?",
"link": "/en/problem-set/isp-proxies-vs-datacenter-proxies.md"
},
{
"text": "What is the difference between static residential proxies and residential proxies?",
"link": "/en/problem-set/static-residential-vs-residential-proxies.md"
},
{
"text": "What is the difference between unlimited proxies and dynamic residential proxies?",
"link": "/en/problem-set/unlimited-proxies-vs-rotating-residential-proxies.md"
}
]
},
{
"text": "Getting Started",
"collapsed": true,
"items": [
{
"text": "How long can a sticky IP session last?",
"link": "/en/getting-started/how-long-can-a-sticky-session-last.md"
},
{
"text": "Why are all my proxy details the same? Did I only get one IP address?",
"link": "/en/getting-started/why-proxy-info-looks-the-same-did-i-get-only-one-ip.md"
},
{
"text": "How many concurrent sessions can I use?",
"link": "/en/getting-started/how-many-sessions-can-i-use-at-once.md"
},
{
"text": "How do I use the test command for username/password authentication?",
"link": "/en/getting-started/how-to-use-test-commands-for-username-password-auth.md"
},
{
"text": "Can the same IP address be whitelisted for multiple accounts?",
"link": "/en/getting-started/can-the-same-ip-be-whitelisted-by-multiple-accounts.md"
},
{
"text": "What is username/password authentication and how does it work?",
"link": "/en/getting-started/what-is-username-password-auth-and-how-it-works.md"
},
{
"text": "What is the API and how do I use it to access proxies?",
"link": "/en/getting-started/what-is-an-api-and-how-to-access-proxies-via-api.md"
},
{
"text": "How do I use residential proxies on my iPhone?",
"link": "/en/getting-started/how-to-use-residential-proxies-on-iphone.md"
}
]
},
{
"text": "Static Residential Proxies",
"collapsed": true,
"items": [
{
"text": "Are there any limitations when using static residential proxies?",
"link": "/en/static-proxy/static-isp-proxy-limitations.md"
},
{
"text": "Can I renew my static residential proxy orders?",
"link": "/en/static-proxy/can-i-renew-static-isp-proxy-orders.md"
},
{
"text": "Does XOProxy offer unlimited bandwidth for static residential proxies?",
"link": "/en/static-proxy/does-xoproxy-offer-unlimited-bandwidth-for-static-isp-proxies.md"
},
{
"text": "What authentication methods are supported for static residential proxies?",
"link": "/en/static-proxy/supported-authentication-methods-for-static-isp-proxies.md"
},
{
"text": "How do I set up static residential proxies?",
"link": "/en/static-proxy/how-to-set-up-static-isp-proxies.md"
},
{
"text": "Are static residential (ISP) proxies good?",
"link": "/en/static-proxy/are-static-isp-proxies-good.md"
},
{
"text": "How much do static residential (ISP) proxies cost?",
"link": "/en/static-proxy/how-much-do-static-isp-proxies-cost.md"
},
{
"text": "What can I use static residential (ISP) proxies for?",
"link": "/en/static-proxy/what-can-i-use-static-isp-proxies-for.md"
},
{
"text": "How do static residential (ISP) proxies work?",
"link": "/en/static-proxy/how-do-static-isp-proxies-work.md"
},
{
"text": "What are static residential (ISP) proxies?",
"link": "/en/static-proxy/what-is-a-static-isp-proxy.md"
}
]
},
{
"text": "Billing & Account",
"collapsed": true,
"items": [
{
"text": "Do you offer a free trial?",
"link": "/en/payment/do-you-offer-a-free-trial.md"
},
{
"text": "How long does it take for my payments to appear in my account?",
"link": "/en/payment/how-long-does-it-take-for-payment-to-reflect.md"
},
{
"text": "Can I request a refund?",
"link": "/en/payment/can-i-request-a-refund.md"
},
{
"text": "How do I purchase proxies?",
"link": "/en/payment/how-to-buy-proxies.md"
},
{
"text": "What happens if my account has not been active for a long time?",
"link": "/en/payment/hat-if-my-account-is-not-active-for-a-long-time.md"
},
{
"text": "Why is my account blocked and how do I re-verify it?",
"link": "/en/payment/why-is-my-account-blocked-and-how-to-re-verify.md"
},
{
"text": "How does billing work with XOProxy?",
"link": "/en/payment/how-xoproxy-billing-works.md"
},
{
"text": "Which payment methods can I use to purchase proxies?",
"link": "/en/payment/available-payment-methods.md"
},
{
"text": "Will I receive an invoice?",
"link": "/en/payment/will-i-receive-an-invoice.md"
}
]
},
{
"text": "Troubleshooting",
"collapsed": true,
"items": [
{
"text": "Payment issues",
"link": "/en/troubleshooting/payment-issues"
},
{
"text": "Unable to connect",
"link": "/en/troubleshooting/unable-to-connect"
},
{
"text": "IP location mismatch",
"link": "/en/troubleshooting/location-mismatch"
},
{
"text": "Why are my proxies slow?",
"link": "/en/troubleshooting/why-are-my-proxies-slow.md"
},
{
"text": "Why am I unable to renew my static residential ISP proxies?",
"link": "/en/troubleshooting/why-cant-i-renew-static-isp-proxies.md"
},
{
"text": "What should I do if the connection times out or I cannot connect?",
"link": "/en/troubleshooting/what-to-do-if-network-times-out-or-cannot-connect.md"
},
{
"text": "Why is the detected IP location inconsistent?",
"link": "/en/troubleshooting/why-ip-geolocation-detection-is-inconsistent.md"
},
{
"text": "Is my proxy IP address the same as my DNS?",
"link": "/en/troubleshooting/is-my-proxy-ip-the-same-as-dns.md"
}
]
}
]
}
],
"footer": {
"message": "Released under the MIT License.",
"copyright": "Copyright © 2025 Static Residential Proxies"
}
}Page Data
{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "en/api-examples.md",
"filePath": "en/api-examples.md",
"lastUpdated": 1764131379000
}Page Frontmatter
{
"outline": "deep"
}More
Check out the documentation for the full list of runtime APIs.