The fetch_url tool fetches and extracts content from specific URLs during an Agent API request. Use it when your application already knows which page, article, document, or report the model should inspect.Use fetch_url when you need full page content from known URLs. Use web_search when the model first needs to discover relevant pages.
from perplexity import Perplexityclient = Perplexity()response = client.responses.create( model="openai/gpt-5.6-sol", input="Explain Bayesian inference: how prior beliefs are updated to posterior beliefs given new evidence, with a concrete medical-test example.", tools=[ { "type": "fetch_url" } ], instructions="Fetch the URL before summarizing it.",)print(response.output_text)
import Perplexity from '@perplexity-ai/perplexity_ai';const client = new Perplexity();const response = await client.responses.create({ model: 'openai/gpt-5.6-sol', input: 'Explain Bayesian inference: how prior beliefs are updated to posterior beliefs given new evidence, with a concrete medical-test example.', tools: [ { type: 'fetch_url' as const, }, ], instructions: 'Fetch the URL before summarizing it.',});console.log(response.output_text);
curl https://api.perplexity.ai/v1/agent \ -H "Authorization: Bearer $PERPLEXITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-5.6-sol", "input": "Explain Bayesian inference: how prior beliefs are updated to posterior beliefs given new evidence, with a concrete medical-test example.", "tools": [ { "type": "fetch_url" } ], "instructions": "Fetch the URL before summarizing it." }' | jq
Response
{ "id": "resp_02fda963-4ab7-42cc-b446-d446e0dcd3b2", "created_at": 1779391738, "model": "openai/gpt-5.6-sol", "object": "response", "output": [ { "results": [ { "id": 1, "snippet": "The disease you have tested positive for is very rare, so let’s say that only 1 in every 100 people with your symptoms actually have the disease.\nThe test you took is 99% sensitive, and 94% specific...", "title": "Bayes' Theorem and Disease Testing - tom rocks maths", "url": "https://tomrocksmaths.com/2021/08/31/bayes-theorem-and-disease-testing/", "date": "2021-08-31", "last_updated": "2026-05-13", "source": "web" }, { "id": 2, "snippet": "- Suppose that 5 in 1,000 people (0.5%) has a particular disease\n(*prevalence* of the disease).\n- A diagnostic test for the disease has 99% *sensitivity* (if a person has the disease, the test will...", "title": "Sensitivity and Specificity", "url": "https://www.nosco.ch/mathematics/en/sensitivity-specificity.php", "date": null, "last_updated": "2026-05-17", "source": "web" }, { "id": 3, "snippet": "Suppose a blood test used to\ndetect the presence of a particular banned sports drug is **99%\n** **sensitive** and **99% ** **specific**.\nThat is, the test will produce 99% **true positive** results...", "title": "Bayes Theorem - Drug testing", "url": "https://www.mun.ca/biology/scarr/4250_Bayes_Theorem.html", "date": null, "last_updated": "2026-03-14", "source": "web" }, { "id": 4, "snippet": "A: mammogram positive, B: developing breast cancer in next 2 years\nSuppose that 7% of the general population of women will have a positive mammogram.\nWhat is the probability of developing breast...", "title": "[PDF] Predictive values Sensitivity and specificity Bayes' Rule", "url": "https://ani.stat.fsu.edu/~debdeep/p2_s14.pdf", "date": "2014-01-14", "last_updated": "2026-02-16", "source": "web" }, { "id": 5, "snippet": "positive test given the disease\n{ts:800} times the probability\nof disease divided by-- this same probability--\n...\ndisease times probability", "title": "Bayes' Theorem (with Example!) - YouTube", "url": "https://www.youtube.com/watch?v=akClB1J6b28", "date": "2024-12-02", "last_updated": "2026-03-22", "source": "web" }, { "id": 6, "snippet": "So if all you know about a woman is that she does the screening and she gets a positive result, you don't have information about symptoms or anything like that,\n{ts:113} you know that she's either...", "title": "The medical test paradox, and redesigning Bayes' rule - YouTube", "url": "https://www.youtube.com/watch?v=lG4VkPoG3ko", "date": "2020-12-22", "last_updated": "2026-03-31", "source": "web" }, { "id": 7, "snippet": "The Fagan Nomogram was designed to give a post-test probability based on the pre-test probability and the likelihood ratio of the test being conducted.\n...\nUnfortunately the police test is 80% (0.8)...", "title": "Bayesian Statistics - The Bottom Line", "url": "https://www.thebottomline.org.uk/blog/ebm/bayesian-statistics/", "date": "2020-09-11", "last_updated": "2026-05-21", "source": "web" }, { "id": 8, "snippet": "We can apply Bayes' theorem if we know the approximate likelihood that a subject has the disease before they come for screening, this is given by the prevalence of the disease.\n...\nFor an overall...", "title": "Screening Test Errors (Bayes' Theorem) - StatsDirect", "url": "https://www.statsdirect.com/help/clinical_epidemiology/screening_test.htm", "date": null, "last_updated": "2026-03-07", "source": "web" } ], "type": "search_results", "queries": [ "Bayes theorem medical test example", "Bayes rule disease test sensitivity specificity", "Bayesian inference prior posterior example disease test" ] }, { "id": "msg_738a8825-ab21-4f10-bee9-2bdedfa99347", "content": [ { "text": "Bayesian inference is a way to update **beliefs** (probabilities) when new data arrive: the prior belief is combined with how likely the data are under different hypotheses to produce a posterior belief. [web:2]\n\n## Core idea and formula\n\nBayes’ theorem in probability form is: [web:2]\n\n\\[\nP(H \\mid E) = \\frac{P(E \\mid H)\\,P(H)}{P(E \\mid H)\\,P(H) + P(E \\mid \\neg H)\\,P(\\neg H)}\n\\] [web:2]\n\n- \\(H\\): hypothesis (e.g., “patient has the disease”). [web:2] \n- \\(E\\): evidence (e.g., “test result is positive”). [web:2] \n- \\(P(H)\\): prior, belief in \\(H\\) before seeing the test. [web:2] \n- \\(P(H \\mid E)\\): posterior, updated belief in \\(H\\) after seeing the test. [web:2] \n- \\(P(E \\mid H)\\), \\(P(E \\mid \\neg H)\\): how likely the evidence is if \\(H\\) is true or false (this is where test accuracy enters). [web:2]\n\nIn words: posterior = (likelihood × prior) / average likelihood of the evidence across all possibilities. [web:2]\n\n## Connecting to medical test terms\n\nFor diagnostic tests, Bayes’ theorem often uses: [web:2]\n\n- Disease \\(D\\) vs no disease \\(\\overline{D}\\). [web:2] \n- Positive test “+” vs negative “–”. [web:2] \n\nKey quantities:\n\n- **Prevalence**: \\(P(D)\\): prior probability that someone from this population has the disease, before considering the test result. [web:2] \n- **Sensitivity**: \\(P(+ \\mid D)\\): probability the test is positive if the person has the disease (true-positive rate). [web:2] \n- **Specificity**: \\(P(- \\mid \\overline{D})\\): probability the test is negative if the person does not have the disease (true-negative rate). [web:2] \n\nThe two main post-test probabilities are: [web:2] \n\n- \\(P(D \\mid +)\\): probability of disease given a positive result (positive predictive value, PPV). \n- \\(P(\\overline{D} \\mid -)\\): probability of no disease given a negative result (negative predictive value, NPV). \n\nBayes’ theorem gives, for a positive test: [web:2]\n\n\\[\nP(D \\mid +) = \\frac{P(+ \\mid D)\\,P(D)}{P(+ \\mid D)\\,P(D) + P(+ \\mid \\overline{D})\\,P(\\overline{D))}\n\\] [web:2]\n\nand \\(P(+ \\mid \\overline{D}) = 1 - \\text{specificity}\\). [web:2]\n\n## Concrete medical-test example\n\nConsider this concrete scenario: [web:2]\n\n- Disease prevalence in the population: \\(P(D) = 0.5\\%\\) (5 in 1,000 people). \n- Sensitivity of the test: 99% → \\(P(+ \\mid D) = 0.99\\). \n- Specificity of the test: 98% → \\(P(- \\mid \\overline{D}) = 0.98\\), so \\(P(+ \\mid \\overline{D}) = 0.02\\). \n\nQuestion: If a randomly chosen person from this population tests positive, what is the probability they actually have the disease, \\(P(D \\mid +)\\)? [web:2]\n\nPlug into Bayes’ formula: [web:2]\n\n\\[\nP(D \\mid +) = \n\\frac{0.99 \\times 0.005}{0.99 \\times 0.005 + 0.02 \\times 0.995}\n\\approx 0.20\n\\] [web:2]\n\nSo even though the test is quite accurate, a positive result means only about a 20% chance (1 in 5) that the person truly has the disease, because the disease is rare. [web:2]\n\n## Interpreting as prior → posterior update\n\nIn that example, Bayesian inference can be read step by step. [web:2]\n\n- Prior belief: Before testing, chance of disease is 0.5% (prevalence). [web:2] \n- Evidence quality: A positive test is much more likely if the person has disease (0.99) than if they do not (0.02), so it is informative but not perfect. [web:2] \n- Posterior belief: After a positive result, the belief jumps from 0.5% to about 20%; this is the updated probability \\(P(D \\mid +)\\). [web:2] \n\nConceptually, the test “boosts” the prior odds of disease by a factor equal to the likelihood ratio \\(\\text{LR}^+ = \\frac{P(+ \\mid D)}{P(+ \\mid \\overline{D})} = \\frac{0.99}{0.02} \\approx 49.5\\), then converts those updated odds back into a probability. [web:2][web:7] \n\nSo Bayesian inference is precisely this: start with a prior probability, adjust it using how strongly the evidence favors one hypothesis over alternatives, and end with a posterior probability that reflects both the original belief and the new data. [web:2][web:7]", "type": "output_text", "annotations": [], "logprobs": [] } ], "role": "assistant", "status": "completed", "type": "message" } ], "status": "completed", "error": null, "usage": { "input_tokens": 6282, "output_tokens": 1258, "total_tokens": 7540, "cost": { "currency": "USD", "input_cost": 0.01079, "output_cost": 0.02516, "total_cost": 0.03988, "cache_creation_cost": null, "cache_read_cost": 0.00143, "tool_calls_cost": 0.0025 }, "input_tokens_details": { "cache_creation_input_tokens": 0, "cache_read_input_tokens": 3584, "cached_tokens": 3584 }, "tool_calls_details": { "search_web": { "invocation": 1 } }, "output_tokens_details": { "reasoning_tokens": 0 } }, "completed_at": 1779391738}
When fetch_url runs, the response can include a fetch_url_results output item before the final assistant message. Each fetched content item includes the URL, page title, and extracted snippet.
fetch_url is best-effort. When a URL cannot be fully fetched or extracted, the API can still return a completed Agent API response with the final assistant message explaining what content was available. Check each item in fetch_url_results.contents: successful items contain extracted page text, while failed items contain an explicit marker in snippet for the requested URL.Failure markers explain the known reason, such as an HTTP client error, a robots-policy block, or rate limiting. If the upstream fetch returns no item for a requested URL, the API adds an item whose snippet includes no_result_returned. Treat these markers as unavailable content rather than page text.
Case
Response behavior
Paywalls and login walls
fetch_url does not bypass access controls. The corresponding content item contains a failure marker explaining that the origin rejected the request and may require credentials or a non-GET method.
Redirects
HTTP redirects are followed when the destination can be fetched. In the returned fetch_url_results item, the url field reflects the URL you requested, not the final redirect destination.
Non-HTML content
fetch_url extracts whatever text content the server returns at the URL. PDFs, binary downloads, and URLs that serve anti-bot challenge pages may return limited or unrelated extracted content.
Timeouts and unreachable URLs
The corresponding content item contains a failure marker with the available reason. If no upstream result is returned, the marker includes no_result_returned.
Use max_urls to keep fetches bounded and predictable. Fewer URLs usually produce lower latency and leave more context for the model’s reasoning and final answer.
Limit
Value
Maximum URLs per tool call
max_urls can be set from 1 to 10.
Supported URL schemes
Use absolute http:// or https:// URLs. Other schemes (file:, data:, ftp:, browser-extension URLs) are not supported and produce no usable content.
Content size
Fetched content is extracted into snippets for model context and may be truncated for longer pages.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Perplexity","description":"Perplexity API docs. Search: ranked web results with extracted page text for your own model. Agent: hosted models with web search and tools, returning a cited answer. Decisions: calibrated probabilities. Orchestrator (private preview): OpenAI- and Anthropic-format routing. Embeddings: vectors.","colors":{"primary":"#121516","light":"#F7F7F8","dark":"#121516"},"logo":{"light":"https://mintcdn.com/perplexity/gHf_T6roVjp3yaJv/logo/Perplexity_API_Platform.svg?fit=max\u0026auto=format\u0026n=gHf_T6roVjp3yaJv\u0026q=85\u0026s=07cab879ca2ce031bbc3da8b20f7ab90","dark":"https://mintcdn.com/perplexity/gHf_T6roVjp3yaJv/logo/Perplexity_API_Platform_Light.svg?fit=max\u0026auto=format\u0026n=gHf_T6roVjp3yaJv\u0026q=85\u0026s=416d5342d11094201b851dcf3eabdc9d","href":"/docs/getting-started/overview"},"favicon":"https://mintcdn.com/perplexity/1nonjPul2rlRMt-c/favicon.png?fit=max\u0026auto=format\u0026n=1nonjPul2rlRMt-c\u0026q=85\u0026s=f095c28dbad15e333c62683681f3ec20","api":{"examples":{"defaults":"required"}},"background":{"color":{"light":"#F7F7F8","dark":"#121516"}},"navbar":{"primary":{"type":"button","label":"Get Started","href":"https://console.perplexity.ai"}},"footer":{"socials":{"x":"https://x.com/perplexitydevs","discord":"https://discord.com/invite/perplexity-ai","website":"https://community.perplexity.ai"}},"search":{"prompt":"Search"},"seo":{"metatags":{"google-site-verification":"l-0uTKc1Uf60LaNt0Pkw1wLOBFEKoBIhUrv0EMr1J4U"},"indexing":"navigable"},"fonts":{"family":"GT Standard","weight":300,"source":"fonts/GT-Standard-S-Standard-Light.woff2","format":"woff2"},"icons":{"library":"tabler"},"banner":{"content":"For AI agents: see the complete [llms.txt](/llms.txt) documentation index.","dismissible":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"The page you're looking for doesn't exist. Try the [documentation home](/docs/getting-started/overview) or search above."}},"contextual":{"options":["copy","view","perplexity"],"display":"header"},"interaction":{"drilldown":false},"metadata":{"timestamp":false},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":{"style":"regular","name":"message-circle"},"href":"https://community.perplexity.ai"},{"anchor":"Blog","icon":{"style":"regular","name":"pencil"},"href":"https://research.perplexity.ai/articles"},{"anchor":"Changelog","icon":{"style":"regular","name":"clock"},"href":"/docs/resources/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"perplexity","hasAudioNarration":false,"actualSubdomain":"perplexity","customDomains":["docs.perplexity.ai"],"gitSource":{"type":"github","owner":"ppl-ai","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4bbc4c97cf9d1412c3a78","collectionId":"d32fa13a-4c44-455c-bcdb-e59d080f5d9e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4bbc4c97cf9d1412c3a78"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4bbc4c97cf9d1412c3a78","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Docs","count":102},{"language":"default","tag":"Cookbook","count":88},{"language":"default","tag":"Agent API","count":55},{"language":"default","tag":"API Reference","count":36},{"language":"default","tag":"Examples","count":28},{"language":"default","tag":"Resources","count":28},{"language":"default","tag":"Integrations","count":21},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Search API","count":13},{"language":"default","tag":"Tools","count":10}]},"assistantConfig":{"enableStarterQuestions":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"6983db9dfb7ad2556f59e58e","deploymentId":"65a9ccde8bfbe120a55f6d5b","questionText":"What is the Agent API?","status":"active","generatedBy":"manual","createdAt":"2026-02-04T23:51:57.148Z","updatedAt":"2026-02-13T03:11:32.396Z","__v":0},{"_id":"6983db84fb7ad2556f59e4ee","deploymentId":"65a9ccde8bfbe120a55f6d5b","questionText":"Which Agent API model should I use?","status":"active","generatedBy":"manual","createdAt":"2026-02-04T23:51:32.666Z","updatedAt":"2026-02-13T03:11:40.522Z","__v":0},{"_id":"6983db82fb7ad2556f59e4e1","deploymentId":"65a9ccde8bfbe120a55f6d5b","questionText":"How do I create an API key?","status":"active","generatedBy":"manual","createdAt":"2026-02-04T23:51:30.248Z","updatedAt":"2026-02-06T16:17:57.191Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"@font-face{font-family:\"GT Standard\";src:url(/fonts/GT-Standard-S-Standard-Light.woff2) format(\"woff2\");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:\"GT Standard\";src:url(/fonts/GT-Standard-S-Standard-Regular.woff2) format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"GT Standard\";src:url(/fonts/GT-Standard-S-Standard-Medium.woff2) format(\"woff2\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"GT Standard\";src:url(/fonts/GT-Standard-M-Standard-Medium.woff2) format(\"woff2\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"GT Standard\";src:url(/fonts/GT-Standard-M-Standard-Semibold.woff2) format(\"woff2\");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:\"GT Standard\";src:url(/fonts/GT-Standard-L-Standard-Medium.woff2) format(\"woff2\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"GT Standard Mono\";src:url(/fonts/GT-Standard-Mono-Standard-Regular.woff2) format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}.font-mono,kbd,pre,samp{font-family:\"GT Standard Mono\",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}:root{--color-primary:#121516;--color-paperwhite:#fbfaf4;--color-ecru:#F7F7F8;--color-offblack:#121516;--color-dark-turquoise-dark:rgba(34, 128, 140, 0.7);--color-dark-turquoise-light:rgba(44, 160, 171, 1);--color-foreground:#121516;--color-muted-foreground:#6b7280;--color-card:#F7F7F8;--color-border:#DBDDDE;--cb-agent-api-fg:#1a7a85;--cb-agent-api-bg:rgba(34, 128, 140, 0.12);--cb-search-api-fg:#2f6fae;--cb-search-api-bg:rgba(47, 111, 174, 0.12);--cb-embeddings-api-fg:#b05f2e;--cb-embeddings-api-bg:rgba(176, 95, 46, 0.12);--cb-sonar-api-fg:#977621;--cb-sonar-api-bg:rgba(157, 118, 52, 0.16);--cb-decisions-api-fg:#944454;--cb-decisions-api-bg:rgba(148, 68, 84, 0.12);--cb-category-fg:#475569;--cb-category-bg:rgba(71, 85, 105, 0.10);--cb-type-fg:#6b7280;--cb-type-bg:rgba(107, 114, 128, 0.10);--cb-popover-bg:#ffffff;--cb-popover-border:#e5e7eb;--cb-hover:rgba(18, 21, 22, 0.05);--cb-accent-fg:#1a7a85;--sonar-bg:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarbgmainlight.svg\");--reasoning-bg:url(\"https://mintlify-assets.b-cdn.net/perplexity/reasoningbgmainlight.svg\");--deep-research-bg:url(\"https://mintlify-assets.b-cdn.net/perplexity/deepbgmainlight.svg\");--sonar-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarmodelbannerlight.svg\");--sonar-pro-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarpromodelbannerlight.svg\");--sonar-reasoning-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarreasoningbannerlight.svg\");--sonar-reasoning-pro-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarreasoningprobannerlight.svg\");--sonar-deep-research-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonardeepbannerlight.svg\");--search-api-banner:url(\"https://docs.perplexity.ai/models/assets/search_api.png\");--sonar-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarbglight.svg\");--sonar-pro-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarprobglight.svg\");--reasoning-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/reasoningbglight.svg\");--reasoning-pro-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/reasoningprobglight.svg\");--deep-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/deepbglight.svg\")}.dark{--color-primary:#F7F7F8;--color-foreground:#F7F7F8;--color-muted-foreground:#9ca3af;--color-card:rgba(8, 31, 34, 0.3);--color-border:rgba(247, 247, 248, 0.2);--cb-agent-api-fg:#4aa6af;--cb-agent-api-bg:rgba(53, 189, 200, 0.16);--cb-search-api-fg:#6aa8e0;--cb-search-api-bg:rgba(76, 140, 210, 0.18);--cb-embeddings-api-fg:#e0915f;--cb-embeddings-api-bg:rgba(200, 120, 60, 0.22);--cb-sonar-api-fg:#cda456;--cb-sonar-api-bg:rgba(200, 160, 70, 0.20);--cb-decisions-api-fg:#d17f90;--cb-decisions-api-bg:rgba(200, 120, 140, 0.22);--cb-category-fg:#cbd5e1;--cb-category-bg:rgba(148, 163, 184, 0.18);--cb-type-fg:#9ca3af;--cb-type-bg:rgba(156, 163, 175, 0.16);--cb-popover-bg:#15191a;--cb-popover-border:rgba(247, 247, 248, 0.14);--cb-hover:rgba(247, 247, 248, 0.08);--cb-accent-fg:#4aa6af;--sonar-bg:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarbgmain.svg\");--reasoning-bg:url(\"https://mintlify-assets.b-cdn.net/perplexity/reasoningbgmain.svg\");--deep-research-bg:url(\"https://mintlify-assets.b-cdn.net/perplexity/deepbgmain.svg\");--sonar-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarmodelbanner.svg\");--sonar-pro-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarpromodelbanner.svg\");--sonar-reasoning-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarreasoningbanner.svg\");--sonar-reasoning-pro-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarreasoningprobanner.svg\");--sonar-deep-research-banner:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonardeepbanner.svg\");--search-api-banner:url(\"https://docs.perplexity.ai/models/assets/search_api.png\");--sonar-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarbg.svg\");--sonar-pro-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/sonarprobg.svg\");--reasoning-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/reasoningbg.svg\");--reasoning-pro-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/reasoningprobg.svg\");--deep-sq:url(\"https://mintlify-assets.b-cdn.net/perplexity/deepbg.svg\")}h1{font-size:32px;line-height:38px;letter-spacing:.01em;color:#000}h2{font-size:28px;line-height:32px}h3{font-size:22px;line-height:26px}h4{font-weight:600;font-size:18px;line-height:21px}body,h1,h2,h3,h4,h5,h6{font-family:\"GT Standard\",sans-serif}h2,h3,h4,h5,h6{letter-spacing:-.02em}h5{font-size:17px;line-height:22px;color:rgba(18,21,22,.9)}h6{font-size:15px;line-height:17px}.dark h1{color:#fff}.dark .content a:hover,.dark .paragraph-small a:hover,.dark .text-sm a:hover,.dark article a:hover,.dark h2,.dark h3,.dark h4,.dark h6,.dark li a:hover,.dark main a:hover,.dark p a:hover{color:#f7f7f8}.dark h5{color:rgba(247,247,248,.9)}.mdx-content li,.prose [data-as=p],.prose span[data-as=p],p{font-family:\"GT Standard\",sans-serif;font-weight:300;font-size:16px;line-height:140%;letter-spacing:-.03em;color:#545658}.paragraph-large,.text-lg{font-weight:300;font-size:18px;line-height:140%;letter-spacing:-.03em;color:#545658}.font-medium,b,h1,h2,h3,h5,h6,strong{font-weight:500}.paragraph-small,.paragraph-xs,.text-sm,.text-xs{font-weight:300;font-size:14px;line-height:140%;letter-spacing:-.03em;color:#545658}.paragraph-xs,.text-xs{font-weight:400;font-size:13px}.dark .mdx-content li,.dark .paragraph-large,.dark .paragraph-small,.dark .paragraph-xs,.dark .prose [data-as=p],.dark .prose span[data-as=p],.dark .text-lg,.dark .text-sm,.dark .text-xs,.dark p{color:#abb0b3}.content a,article a,main a{text-decoration:underline}.content a,article a,li a,main a,p a{font-family:\"GT Standard\",sans-serif;font-weight:400;color:rgba(18,21,22,.6);transition:color .2s ease}.content a:hover,article a:hover,h2,h3,h4,h6,li a:hover,main a:hover,p a:hover{color:#121516}.dark .content a,.dark article a,.dark li a,.dark main a,.dark p a{color:rgba(247,247,248,.6)}html[data-current-path=\"/docs/cookbook\"] #page-context-menu{display:none!important}.cb-chip:hover{background-color:var(--cb-hover)}.dark .paragraph-small a,.dark .text-sm a{color:#abb0b3}[data-component-part=callout-content] a,[data-component-part=card-content] a,[data-component-part=step-content] a,a.link,li a,p a,span a{border-bottom:none!important;text-decoration:underline!important;text-decoration-thickness:1px!important;text-underline-offset:2px!important}a.model-card-link{border-bottom-width:1px!important;border-bottom-style:solid!important;border-bottom-color:var(--color-border)!important}a.model-card-link:hover{border-bottom-color:var(--color-primary)!important}#content-area li a.cookbook-card,#navbar a,.almond-layout .sidebar-group a,.almond-layout a,a.model-card-link{text-decoration:none!important}#content-area [data-component-part=callout-content] a,#content-area [data-component-part=card-content] a,#content-area [data-component-part=step-content] a,#content-area a.link,#content-area li a,#content-area p a,#content-area td a{text-decoration:underline!important;text-decoration-thickness:1px!important;text-underline-offset:2px!important}#topbar-cta-button a,#topbar-cta-button a span{font-family:\"GT Standard\",sans-serif!important;font-weight:500!important;color:#f7f7f8!important}#topbar-cta-button a,.dark #topbar-cta-button a{background-color:#1a6872!important}#topbar-cta-button{margin-right:36px!important}.dark code,code{padding:4px 8px;border-radius:4px}code{font-family:\"GT Standard Mono\",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-weight:400;font-size:13px;line-height:18px;letter-spacing:-.02em;color:#545658!important;background-color:rgba(18,21,22,.04)!important}.dark code{color:#f7f7f8!important;background-color:rgba(247,247,248,.04)!important}#navbar a img{max-width:165px}#navbar .group .absolute.bg-primary{background-color:var(--color-primary)}.text-5xl{font-size:3rem}.text-paperwhite{color:var(--color-paperwhite)}.text-ecru{color:var(--color-ecru)}.text-offblack{color:var(--color-offblack)}.bg-dark-turquoise{background-color:var(--color-dark-turquoise-light)}.text-foreground{color:var(--color-foreground)}.text-muted-foreground{color:var(--color-muted-foreground)}.bg-card{background-color:var(--color-card)}.border-border{border-color:var(--color-border)}.text-primary{color:var(--color-primary)}.border-primary{border-color:var(--color-primary)}.hover\\:bg-primary\\/90:hover{background-color:rgba(34,128,140,.9)}.bg-primary{background-color:var(--color-primary)}.hover\\:border-primary\\/30:hover{border-color:rgba(34,128,140,.3)}.bg-primary\\/10{background-color:rgba(34,128,140,.1)}.bg-button-active{background-color:#92dce2}.bg-button-primary{background-color:#35bdc8}.bg-quickstart{background-color:#1a6872}.bg-search-box{background-color:rgba(222,247,249,.03)}.border-search-box{border-color:rgba(222,247,249,.3)}.bg-nav-selected{background-color:rgba(247,247,248,.1)}.bg-command-key{background-color:rgba(32,128,141,.3)}.text-command-key{color:rgba(222,247,249,.7)}.text-dark-primary{color:#121516}.btn-default{background-color:#121516;color:#f7f7f8;border-radius:9999px;padding:.75rem 1.5rem;font-weight:500;font-size:1rem;text-align:center;white-space:nowrap;transition:all .2s ease;display:inline-block;text-decoration:none;border:0;cursor:pointer}.btn-default:hover{background-color:#0b0c0d}.btn-outline,.dark .btn-default{background-color:#f7f7f8;color:#121516}.dark .btn-default:hover{background-color:#fff}.btn-outline{background-color:transparent;border:2px solid #121516;border-radius:9999px;padding:.75rem 1.5rem;font-weight:500;font-size:1rem;text-align:center;white-space:nowrap;transition:all .2s ease;display:inline-block;text-decoration:none;cursor:pointer}.btn-outline:hover{background-color:rgba(18,21,22,.06)}.dark .btn-outline{color:#f7f7f8;border-color:#f7f7f8}.dark .btn-outline:hover{background-color:rgba(247,247,248,.14)}.code-group.dark\\:text-gray-50:is(.dark *){background:rgba(8,31,34,.3);border-radius:12px;padding:1rem}.code-group.text-gray-950{border-radius:12px;padding:1rem}[id^=usecase-panel-] .code-group{margin:0!important;border:0!important}#navbar .ml-auto{margin-left:0!important;position:absolute!important;left:calc(50% + 92px)!important;transform:translateX(-50%)!important;width:auto!important;flex:none!important}#navbar .nav-tabs,.nav-tabs-item{display:flex!important;gap:24px!important;align-items:center!important}.nav-tabs-item{padding:10px 30px!important;justify-content:center!important;gap:10px!important;font-family:\"GT Standard\",sans-serif!important;font-size:13px!important;font-weight:400!important;letter-spacing:-.52px!important;line-height:normal!important;border-radius:100px!important;transition:all .2s ease!important;height:auto!important}.nav-tabs-item.text-gray-800{background-color:rgba(18,21,22,.06)!important}.dark .nav-tabs-item.dark\\:text-gray-200{background-color:rgba(247,247,248,.14)!important}.nav-tabs-item:hover:not([aria-current=page]):not(.active){background-color:rgba(18,21,22,.04)!important}.dark .nav-tabs-item:hover:not([aria-current=page]):not(.active){background-color:rgba(247,247,248,.08)!important}#table-of-contents>button span,.nav-tabs-item .absolute.bg-primary,.nav-tabs-item>.absolute{display:none!important}.dark,.dark #navbar,.dark .almond-layout,.dark .almond-layout>div,.dark .almond-layout>div>div,.dark .code-block,.dark .code-group,.dark [class*=\"bg-[#09090B]\"],.dark [class*=bg-gray-950]{background-color:#121516!important}.code-block,.code-group{background-color:#f7f7f8!important}.code-block pre,.code-block-background,.code-group pre,pre.shiki{background-color:#fff!important}.dark .code-block pre,.dark .code-block-background,.dark .code-group pre,.dark pre.shiki{background-color:#0b0c0d!important}.code-block code,.code-group code,.dark .code-block code,.dark .code-group code,.table tr{background-color:transparent!important}.homepage-code-block .code-group,.homepage-code-block .code-group pre{border-radius:6px!important}.callout{padding:16px 24px 16px 16px!important;border-radius:12px!important;border-width:1px!important;border-style:solid!important;gap:12px!important;overflow:visible!important}.callout [data-component-part=callout-icon]{margin-top:0!important}.callout [data-component-part=callout-content]{font-family:\"GT Standard\",sans-serif!important;font-weight:300!important;font-size:14px!important;letter-spacing:-.02em!important;line-height:140%!important}.callout [data-component-part=callout-content] [data-as=p],.callout [data-component-part=callout-content] p{margin-bottom:12px!important}#section-menu-dropdown .toc-item:last-child a,.callout [data-component-part=callout-content] [data-as=p]:last-child,.callout [data-component-part=callout-content] p:last-child{margin-bottom:0!important}.callout[data-callout-type=note]{background-color:rgba(66,145,210,.1)!important;border-color:rgba(66,145,210,.14)!important}.callout[data-callout-type=note] [data-component-part=callout-content],.callout[data-callout-type=note] [data-component-part=callout-icon] svg{color:#135b8c!important}.dark .callout[data-callout-type=note]{background-color:rgba(66,145,210,.18)!important;border-color:rgba(66,145,210,.18)!important}.dark .callout[data-callout-type=note] [data-component-part=callout-content],.dark .callout[data-callout-type=note] [data-component-part=callout-icon] svg{color:#63aef2!important}.callout[data-callout-type=info]{background-color:rgba(18,21,22,.06)!important;border-color:rgba(18,21,22,.1)!important}.callout[data-callout-type=info] [data-component-part=callout-content],.callout[data-callout-type=info] [data-component-part=callout-icon] svg{color:#545658!important}.dark .callout[data-callout-type=info]{background-color:rgba(247,247,248,.1)!important;border-color:rgba(247,247,248,.14)!important}.dark #header .text-lg.prose p,.dark .callout[data-callout-type=info] [data-component-part=callout-content],.dark .callout[data-callout-type=info] [data-component-part=callout-icon] svg{color:#abb0b3!important}.callout[data-callout-type=tip]{background-color:rgba(75,158,79,.1)!important;border-color:rgba(75,158,79,.14)!important}.callout[data-callout-type=tip] [data-component-part=callout-content],.callout[data-callout-type=tip] [data-component-part=callout-icon] svg{color:#136a22!important}.dark .callout[data-callout-type=tip]{background-color:rgba(75,158,79,.18)!important;border-color:rgba(75,158,79,.22)!important}.dark .callout[data-callout-type=tip] [data-component-part=callout-content],.dark .callout[data-callout-type=tip] [data-component-part=callout-icon] svg{color:#88bb8c!important}.callout[data-callout-type=warning]{background-color:rgba(203,134,6,.1)!important;border-color:rgba(203,134,6,.14)!important}.callout[data-callout-type=warning] [data-component-part=callout-content],.callout[data-callout-type=warning] [data-component-part=callout-icon] svg{color:#7b571e!important}.dark .callout[data-callout-type=warning]{background-color:rgba(203,134,6,.16)!important;border-color:rgba(203,134,6,.2)!important}.dark .callout[data-callout-type=warning] [data-component-part=callout-content],.dark .callout[data-callout-type=warning] [data-component-part=callout-icon] svg{color:#bca482!important}.callout[data-callout-type=check]{background-color:rgba(75,158,79,.1)!important;border-color:rgba(75,158,79,.14)!important}.callout[data-callout-type=check] [data-component-part=callout-content],.callout[data-callout-type=check] [data-component-part=callout-icon] svg{color:#136a22!important}.dark .callout[data-callout-type=check]{background-color:rgba(75,158,79,.18)!important;border-color:rgba(75,158,79,.22)!important}.dark .callout[data-callout-type=check] [data-component-part=callout-content],.dark .callout[data-callout-type=check] [data-component-part=callout-icon] svg{color:#88bb8c!important}.callout [data-component-part=callout-content] a{color:inherit!important;text-decoration:underline!important}#header .text-lg.prose p{font-family:\"GT Standard\",sans-serif!important;font-weight:300!important;font-size:18px!important;line-height:140%!important;letter-spacing:-.02em!important;color:#545658!important}.card{background-color:#f7f7f8!important}.dark .card{background-color:#121516!important}[data-component-part=card-content-container].flex{align-items:flex-start!important}[data-component-part=card-content]{font-family:\"GT Standard\",sans-serif!important;font-weight:300!important;font-size:14px!important;letter-spacing:-.02em!important;line-height:140%!important;color:#545658!important}.dark [data-component-part=card-content],.dark [data-component-part=step-content]>[data-as=p],.dark [data-component-part=step-content]>p{color:#abb0b3!important}#content-area.max-w-xl,#content-area[class*=\"--content-width\"]{max-width:56rem!important}hr{border:0!important;border-top:1px solid rgba(18,21,22,.2)!important;margin:56px 0!important}.dark hr{border-top:1px solid rgba(247,247,248,.2)!important}.steps{margin-left:18px!important}.step-container{padding-bottom:48px!important}.step-container:last-child{padding-bottom:0!important}[data-component-part=step-line]{width:1px!important;left:0!important;top:44px!important;height:calc(100% - 52px)!important;background:rgba(18,21,22,.1)!important;background-image:none!important}.dark [data-component-part=step-line]{background:rgba(247,247,248,.1)!important}[data-component-part=step-number]{margin-left:-18px!important;padding-top:0!important;padding-bottom:0!important}[data-component-part=step-number]>div:first-child{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;border-radius:50%!important;background-color:rgba(18,21,22,.06)!important;font-family:\"GT Standard\",sans-serif!important;font-weight:500!important;font-size:15px!important;line-height:17px!important;letter-spacing:-.02em!important;color:#121516!important}.dark [data-component-part=step-number]>div:first-child{background-color:rgba(247,247,248,.1)!important;color:#f7f7f8!important}.step-container>.w-full{padding-left:38px!important}[data-component-part=step-title]{font-family:\"GT Standard\",sans-serif!important;font-weight:500!important;font-size:17px!important;line-height:22px!important;letter-spacing:-.02em!important;color:#121516!important;margin-top:7px!important}.dark #section-menu-dropdown .toc-item a.border-primary,.dark #section-menu-dropdown .toc-item a.text-primary,.dark #section-menu-dropdown .toc-item a:hover,.dark #section-menu-dropdown .toc-item[data-depth=\"1\"] a.border-primary,.dark #section-menu-dropdown .toc-item[data-depth=\"1\"] a.text-primary,.dark #section-menu-dropdown .toc-item[data-depth=\"1\"] a:hover,.dark #section-menu-dropdown .toc-item[data-depth=\"2\"] a.border-primary,.dark #section-menu-dropdown .toc-item[data-depth=\"2\"] a.text-primary,.dark #section-menu-dropdown .toc-item[data-depth=\"2\"] a:hover,.dark .table td a:hover,.dark .toc-item a:hover,.dark .toc-item[data-depth=\"1\"] a:hover,.dark .toc-item[data-depth=\"2\"] a:hover,.dark [data-component-part=step-title]{color:#f7f7f8!important}[data-component-part=step-content]{margin-top:24px!important}[data-component-part=step-content]>[data-as=p],[data-component-part=step-content]>p{font-family:\"GT Standard\",sans-serif!important;font-weight:300!important;font-size:16px!important;line-height:140%!important;letter-spacing:-.02em!important;color:#545658!important}#table-of-contents>button{padding:0!important;margin-bottom:12px!important}#table-of-contents>button svg{width:24px!important;height:24px!important;stroke:rgba(18,21,22,.6)!important;stroke-width:1px!important}.dark #table-of-contents>button svg{stroke:rgba(247,247,248,.6)!important}#table-of-contents-content{border-left:1px solid rgba(18,21,22,.1)!important;padding-left:0!important;margin-left:0!important}.dark #table-of-contents-content{border-left-color:rgba(247,247,248,.1)!important}.toc-item{border-left:none!important;padding-left:0!important}#section-menu-dropdown .toc-item a,.toc-item a{font-family:\"GT Standard\",sans-serif!important;font-size:13px!important;font-weight:400!important;line-height:normal!important;letter-spacing:-.02em!important;color:rgba(18,21,22,.6)!important;display:block!important;text-decoration:none!important}.toc-item a{border-left:2px solid transparent!important;margin-left:-1px!important;padding:8px 0 8px 16px!important;transition:color .15s ease,border-color .15s ease!important}.toc-item a:hover{color:#121516!important}.dark .toc-item a{color:rgba(247,247,248,.6)!important}.toc-item a.border-primary,.toc-item a.text-primary,.toc-item a[data-active=true]{color:#121516!important;border-left-color:#121516!important;font-weight:400!important}.dark .toc-item a.border-primary,.dark .toc-item a.text-primary,.dark .toc-item a[data-active=true],.dark .toc-item[data-depth=\"1\"] a.border-primary,.dark .toc-item[data-depth=\"1\"] a.text-primary,.dark .toc-item[data-depth=\"1\"] a[data-active=true],.dark .toc-item[data-depth=\"2\"] a.border-primary,.dark .toc-item[data-depth=\"2\"] a.text-primary,.dark .toc-item[data-depth=\"2\"] a[data-active=true]{color:#f7f7f8!important;border-left-color:#f7f7f8!important}.toc-item[data-depth=\"1\"] a,.toc-item[data-depth=\"2\"] a{padding-left:36px!important;color:rgba(18,21,22,.5)!important}.toc-item[data-depth=\"2\"] a{padding-left:56px!important}.dark #section-menu-dropdown .toc-item[data-depth=\"1\"] a,.dark #section-menu-dropdown .toc-item[data-depth=\"2\"] a,.dark .toc-item[data-depth=\"1\"] a,.dark .toc-item[data-depth=\"2\"] a{color:rgba(247,247,248,.5)!important}.toc-item[data-depth=\"1\"] a:hover,.toc-item[data-depth=\"2\"] a:hover{color:#121516!important}.toc-item[data-depth=\"1\"] a.border-primary,.toc-item[data-depth=\"1\"] a.text-primary,.toc-item[data-depth=\"1\"] a[data-active=true],.toc-item[data-depth=\"2\"] a.border-primary,.toc-item[data-depth=\"2\"] a.text-primary,.toc-item[data-depth=\"2\"] a[data-active=true]{color:#121516!important;border-left-color:#121516!important}@media (max-width:1279px){#content-area{max-width:56rem!important}}#section-menu-btn{position:fixed;top:80px;right:24px;width:32px;height:32px;border-radius:6px;border:1px solid rgba(18,21,22,.4);background-color:#f7f7f8;display:none;align-items:center;justify-content:center;cursor:pointer;z-index:50;transition:background-color .15s ease,border-color .15s ease;padding:0}#section-menu-btn.open,#section-menu-btn:hover{background-color:#fcfcfc;border-color:rgba(18,21,22,.6)}#section-menu-btn svg{width:24px;height:24px;stroke:#121516;stroke-width:1px}.dark #section-menu-btn{background-color:#121516;border-color:rgba(247,247,248,.4)}.dark #section-menu-btn.open,.dark #section-menu-btn:hover{background-color:#1d2022}.dark #section-menu-btn svg{stroke:#f7f7f8}#section-menu-backdrop{position:fixed;inset:0;z-index:51;display:none}#section-menu-backdrop.open{display:block}#section-menu-dropdown{position:fixed;top:120px;right:24px;background-color:#f7f7f8;padding:25px;border:1px solid rgba(18,21,22,.2);border-radius:8px;box-shadow:0 4px 10px rgba(0,0,0,.1);z-index:52;width:229px;max-height:60vh;overflow-y:auto;transform-origin:top right;opacity:0;transform:scale(.95);pointer-events:none;transition:opacity .15s ease,transform .15s ease}#section-menu-dropdown.open{opacity:1;transform:scale(1);pointer-events:auto}.dark #section-menu-dropdown{background-color:#121516;border-color:rgba(247,247,248,.2);box-shadow:none}#section-menu-dropdown ul{list-style:none;margin:0;padding:0}#section-menu-dropdown .toc-item{border-left:none!important;padding-left:0!important}#section-menu-dropdown .toc-item a{border-left:none!important;border-radius:0!important;background:0 0!important;padding:0!important;margin-bottom:15px!important;transition:color .15s ease!important}#section-menu-dropdown .toc-item a:hover{color:#121516!important;background:0 0!important}#section-menu-dropdown .toc-item a.border-primary,#section-menu-dropdown .toc-item a.text-primary,#section-menu-dropdown .toc-item[data-depth=\"1\"] a.border-primary,#section-menu-dropdown .toc-item[data-depth=\"1\"] a.text-primary,#section-menu-dropdown .toc-item[data-depth=\"1\"] a:hover,#section-menu-dropdown .toc-item[data-depth=\"2\"] a.border-primary,#section-menu-dropdown .toc-item[data-depth=\"2\"] a.text-primary,#section-menu-dropdown .toc-item[data-depth=\"2\"] a:hover,.sidebar-group a.bg-primary\\/10 svg,.sidebar-group a:hover svg,.sidebar-group a[aria-current=page] svg,.sidebar-group button[aria-expanded]:hover svg,.table td a:hover{color:#121516!important}.dark #section-menu-dropdown .toc-item a,.dark .sidebar-group svg,.dark .table td a{color:rgba(247,247,248,.6)!important}#section-menu-dropdown .toc-item[data-depth=\"1\"] a{padding-left:20px!important;color:rgba(18,21,22,.5)!important}#section-menu-dropdown .toc-item[data-depth=\"2\"] a{padding-left:40px!important;color:rgba(18,21,22,.5)!important}@media (min-width:1280px){#section-menu-backdrop,#section-menu-btn,#section-menu-dropdown{display:none!important}}[data-table-wrapper=true]{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important}[data-table-wrapper=true]::-webkit-scrollbar{height:8px;-webkit-appearance:none}[data-table-wrapper=true]::-webkit-scrollbar-track{background:0 0}[data-table-wrapper=true]::-webkit-scrollbar-thumb{background-color:rgba(18,21,22,.35);border-radius:4px}[data-table-wrapper=true]:hover::-webkit-scrollbar-thumb{background-color:rgba(18,21,22,.55)}.dark [data-table-wrapper=true]::-webkit-scrollbar-thumb{background-color:rgba(247,247,248,.35)}.dark [data-table-wrapper=true]:hover::-webkit-scrollbar-thumb{background-color:rgba(247,247,248,.55)}@supports not (selector(::-webkit-scrollbar)){[data-table-wrapper=true]{scrollbar-width:thin;scrollbar-color:rgba(18,21,22,.35) transparent}.dark [data-table-wrapper=true]{scrollbar-color:rgba(247,247,248,.35) transparent}}.table{border-collapse:collapse!important;border-spacing:0!important}.table td,.table th{font-family:\"GT Standard\",sans-serif!important;font-size:13px!important;letter-spacing:-.02em!important;padding:16px 16px 16px 0!important;border-top:none!important;border-left:none!important;border-right:none!important;background-color:transparent!important}.table th{font-weight:400!important;color:#121516!important;border-bottom:1px solid rgba(18,21,22,.3)!important;white-space:nowrap}.table td{font-weight:300!important;color:#545658!important;border-bottom:1px solid rgba(18,21,22,.1)!important}.table tbody tr:last-child td{border-bottom:none!important}.dark .table th{color:#f7f7f8!important;border-bottom-color:rgba(247,247,248,.3)!important}.dark .table td{color:#abb0b3!important;border-bottom-color:rgba(247,247,248,.1)!important}.table td strong{color:inherit!important}.table td code{font-size:13px!important;padding:2px 6px!important}.table td:first-child code{white-space:nowrap}.table td:nth-child(2){white-space:normal;word-break:break-word}.sidebar-group svg,.table td a{color:rgba(18,21,22,.6)!important}.table td a{text-decoration:underline!important;text-decoration-thickness:1px!important;text-underline-offset:2px!important;transition:color .2s ease}.sidebar-group a,.sidebar-group button[aria-expanded],.sidebar-group-header{font-size:13px!important;font-family:\"GT Standard\",sans-serif!important;letter-spacing:-.02em!important;color:#121516!important}.sidebar-group-header{font-weight:600!important;text-transform:none!important}.dark .sidebar-group a,.dark .sidebar-group a.bg-primary\\/10 svg,.dark .sidebar-group a:hover svg,.dark .sidebar-group a[aria-current=page] svg,.dark .sidebar-group button[aria-expanded],.dark .sidebar-group button[aria-expanded]:hover svg,.dark .sidebar-group-header{color:#f7f7f8!important}.sidebar-group a,.sidebar-group button[aria-expanded]{font-weight:400!important;line-height:140%!important;text-decoration:none!important;transition:background-color .15s ease,color .15s ease!important}.sidebar-group a.bg-primary\\/10,.sidebar-group a:hover,.sidebar-group a[aria-current=page],.sidebar-group button[aria-expanded]:hover{background:rgba(18,21,22,.06)!important;color:#121516!important;border-radius:8px!important}.dark .sidebar-group a.bg-primary\\/10,.dark .sidebar-group a:hover,.dark .sidebar-group a[aria-current=page],.dark .sidebar-group button[aria-expanded]:hover{background:rgba(247,247,248,.14)!important;color:#f7f7f8!important}.sidebar-group svg{width:16px!important;height:16px!important;stroke-width:1px!important}@media (min-width:1024px){#content-container:has(>.flex.flex-row-reverse>:is(#content-area.max-w-xl, #content-area[class*=\"--content-width\"])){padding-left:3rem!important;padding-right:1.5rem!important}#content-container>.flex.flex-row-reverse:has(>:is(#content-area.max-w-xl, #content-area[class*=\"--content-width\"])){padding-left:0!important;column-gap:1.5rem!important}#content-container>.flex.flex-row-reverse>#content-side-layout>#table-of-contents-layout{width:15rem!important;padding-left:1rem!important}#content-container>.flex.flex-row-reverse>#content-side-layout>#table-of-contents-layout #table-of-contents{width:14rem!important}#content-container>.flex.flex-row-reverse>:is(#content-area.max-w-xl, #content-area[class*=\"--content-width\"]){max-width:64rem!important}}"}],"page":{"pagePath":"docs/agent-api/tools/fetch-url-content","slug":"/docs/agent-api/tools/fetch-url-content","pageMetadata":{"title":"Fetch URL Content","sidebarTitle":"Fetch URL Content","description":"Fetch and extract content from specific URLs in the Agent API.","href":"/docs/agent-api/tools/fetch-url-content"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Fetch and extract content from specific URLs in the Agent API.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,Card,CardGroup,CodeBlock,CodeGroup,Heading,Note,Table,Tip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`fetch_url`}),` tool fetches and extracts content from specific URLs during an Agent API request. Use it when your application already knows which page, article, document, or report the model should inspect.`]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`fetch_url`}),` when you need full page content from known URLs. Use `,_jsx(_components.a,{href:`/docs/agent-api/tools/web-search`,children:_jsx(_components.code,{children:`web_search`})}),` when the model first needs to discover relevant pages.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` perplexity `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Perplexity`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Perplexity()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.responses.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-5.6-sol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` input`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Explain Bayesian inference: how prior beliefs are updated to posterior beliefs given new evidence, with a concrete medical-test example.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` tools`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fetch_url\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Fetch the URL before summarizing it.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.output_text)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Typescript`,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Perplexity`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@perplexity-ai/perplexity_ai'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Perplexity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`responses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'openai/gpt-5.6-sol'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` input:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Explain Bayesian inference: how prior beliefs are updated to posterior beliefs given new evidence, with a concrete medical-test example.'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tools:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fetch_url'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` instructions:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Fetch the URL before summarizing it.'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`output_text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.perplexity.ai/v1/agent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PERPLEXITY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai/gpt-5.6-sol\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"input\": \"Explain Bayesian inference: how prior beliefs are updated to posterior beliefs given new evidence, with a concrete medical-test example.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tools\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"fetch_url\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"instructions\": \"Fetch the URL before summarizing it.\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`})]}),`\n`]})})})]}),`\n`,_jsx(Accordion,{title:`Response`,id:`response`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`134`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`134`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resp_02fda963-4ab7-42cc-b446-d446e0dcd3b2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1779391738`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-5.6-sol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"results\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The disease you have tested positive for is very rare, so let’s say that only 1 in every 100 people with your symptoms actually have the disease.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`The test you took is 99% sensitive, and 94% specific...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bayes' Theorem and Disease Testing - tom rocks maths\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://tomrocksmaths.com/2021/08/31/bayes-theorem-and-disease-testing/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2021-08-31\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-05-13\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"- Suppose that 5 in 1,000 people (0.5%) has a particular disease`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`(*prevalence* of the disease).`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- A diagnostic test for the disease has 99% *sensitivity* (if a person has the disease, the test will...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sensitivity and Specificity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.nosco.ch/mathematics/en/sensitivity-specificity.php\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-05-17\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Suppose a blood test used to`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`detect the presence of a particular banned sports drug is **99%`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`** **sensitive** and **99% ** **specific**.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`That is, the test will produce 99% **true positive** results...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bayes Theorem - Drug testing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.mun.ca/biology/scarr/4250_Bayes_Theorem.html\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-03-14\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A: mammogram positive, B: developing breast cancer in next 2 years`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Suppose that 7% of the general population of women will have a positive mammogram.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`What is the probability of developing breast...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[PDF] Predictive values Sensitivity and specificity Bayes' Rule\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://ani.stat.fsu.edu/~debdeep/p2_s14.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2014-01-14\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-02-16\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"positive test given the disease`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`{ts:800} times the probability`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`of disease divided by-- this same probability--`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`...`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`disease times probability\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bayes' Theorem (with Example!) - YouTube\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.youtube.com/watch?v=akClB1J6b28\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-12-02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-03-22\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"So if all you know about a woman is that she does the screening and she gets a positive result, you don't have information about symptoms or anything like that,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`{ts:113} you know that she's either...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The medical test paradox, and redesigning Bayes' rule - YouTube\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.youtube.com/watch?v=lG4VkPoG3ko\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2020-12-22\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-03-31\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The Fagan Nomogram was designed to give a post-test probability based on the pre-test probability and the likelihood ratio of the test being conducted.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`...`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Unfortunately the police test is 80% (0.8)...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bayesian Statistics - The Bottom Line\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.thebottomline.org.uk/blog/ebm/bayesian-statistics/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2020-09-11\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-05-21\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"We can apply Bayes' theorem if we know the approximate likelihood that a subject has the disease before they come for screening, this is given by the prevalence of the disease.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`...`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`For an overall...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Screening Test Errors (Bayes' Theorem) - StatsDirect\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.statsdirect.com/help/clinical_epidemiology/screening_test.htm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-03-07\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"web\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"search_results\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"queries\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bayes theorem medical test example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bayes rule disease test sensitivity specificity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bayesian inference prior posterior example disease test\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"msg_738a8825-ab21-4f10-bee9-2bdedfa99347\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"text\": \"Bayesian inference is a way to update **beliefs** (probabilities) when new data arrive: the prior belief is combined with how likely the data are under different hypotheses to produce a posterior belief. [web:2]\\\\n\\\\n## Core idea and formula\\\\n\\\\nBayes’ theorem in probability form is: [web:2]\\\\n\\\\n\\\\\\\\[\\\\nP(H \\\\\\\\mid E) = \\\\\\\\frac{P(E \\\\\\\\mid H)\\\\\\\\,P(H)}{P(E \\\\\\\\mid H)\\\\\\\\,P(H) + P(E \\\\\\\\mid \\\\\\\\neg H)\\\\\\\\,P(\\\\\\\\neg H)}\\\\n\\\\\\\\] [web:2]\\\\n\\\\n- \\\\\\\\(H\\\\\\\\): hypothesis (e.g., “patient has the disease”). [web:2] \\\\n- \\\\\\\\(E\\\\\\\\): evidence (e.g., “test result is positive”). [web:2] \\\\n- \\\\\\\\(P(H)\\\\\\\\): prior, belief in \\\\\\\\(H\\\\\\\\) before seeing the test. [web:2] \\\\n- \\\\\\\\(P(H \\\\\\\\mid E)\\\\\\\\): posterior, updated belief in \\\\\\\\(H\\\\\\\\) after seeing the test. [web:2] \\\\n- \\\\\\\\(P(E \\\\\\\\mid H)\\\\\\\\), \\\\\\\\(P(E \\\\\\\\mid \\\\\\\\neg H)\\\\\\\\): how likely the evidence is if \\\\\\\\(H\\\\\\\\) is true or false (this is where test accuracy enters). [web:2]\\\\n\\\\nIn words: posterior = (likelihood × prior) / average likelihood of the evidence across all possibilities. [web:2]\\\\n\\\\n## Connecting to medical test terms\\\\n\\\\nFor diagnostic tests, Bayes’ theorem often uses: [web:2]\\\\n\\\\n- Disease \\\\\\\\(D\\\\\\\\) vs no disease \\\\\\\\(\\\\\\\\overline{D}\\\\\\\\). [web:2] \\\\n- Positive test “+” vs negative “–”. [web:2] \\\\n\\\\nKey quantities:\\\\n\\\\n- **Prevalence**: \\\\\\\\(P(D)\\\\\\\\): prior probability that someone from this population has the disease, before considering the test result. [web:2] \\\\n- **Sensitivity**: \\\\\\\\(P(+ \\\\\\\\mid D)\\\\\\\\): probability the test is positive if the person has the disease (true-positive rate). [web:2] \\\\n- **Specificity**: \\\\\\\\(P(- \\\\\\\\mid \\\\\\\\overline{D})\\\\\\\\): probability the test is negative if the person does not have the disease (true-negative rate). [web:2] \\\\n\\\\nThe two main post-test probabilities are: [web:2] \\\\n\\\\n- \\\\\\\\(P(D \\\\\\\\mid +)\\\\\\\\): probability of disease given a positive result (positive predictive value, PPV). \\\\n- \\\\\\\\(P(\\\\\\\\overline{D} \\\\\\\\mid -)\\\\\\\\): probability of no disease given a negative result (negative predictive value, NPV). \\\\n\\\\nBayes’ theorem gives, for a positive test: [web:2]\\\\n\\\\n\\\\\\\\[\\\\nP(D \\\\\\\\mid +) = \\\\\\\\frac{P(+ \\\\\\\\mid D)\\\\\\\\,P(D)}{P(+ \\\\\\\\mid D)\\\\\\\\,P(D) + P(+ \\\\\\\\mid \\\\\\\\overline{D})\\\\\\\\,P(\\\\\\\\overline{D))}\\\\n\\\\\\\\] [web:2]\\\\n\\\\nand \\\\\\\\(P(+ \\\\\\\\mid \\\\\\\\overline{D}) = 1 - \\\\\\\\text{specificity}\\\\\\\\). [web:2]\\\\n\\\\n## Concrete medical-test example\\\\n\\\\nConsider this concrete scenario: [web:2]\\\\n\\\\n- Disease prevalence in the population: \\\\\\\\(P(D) = 0.5\\\\\\\\%\\\\\\\\) (5 in 1,000 people). \\\\n- Sensitivity of the test: 99% → \\\\\\\\(P(+ \\\\\\\\mid D) = 0.99\\\\\\\\). \\\\n- Specificity of the test: 98% → \\\\\\\\(P(- \\\\\\\\mid \\\\\\\\overline{D}) = 0.98\\\\\\\\), so \\\\\\\\(P(+ \\\\\\\\mid \\\\\\\\overline{D}) = 0.02\\\\\\\\). \\\\n\\\\nQuestion: If a randomly chosen person from this population tests positive, what is the probability they actually have the disease, \\\\\\\\(P(D \\\\\\\\mid +)\\\\\\\\)? [web:2]\\\\n\\\\nPlug into Bayes’ formula: [web:2]\\\\n\\\\n\\\\\\\\[\\\\nP(D \\\\\\\\mid +) = \\\\n\\\\\\\\frac{0.99 \\\\\\\\times 0.005}{0.99 \\\\\\\\times 0.005 + 0.02 \\\\\\\\times 0.995}\\\\n\\\\\\\\approx 0.20\\\\n\\\\\\\\] [web:2]\\\\n\\\\nSo even though the test is quite accurate, a positive result means only about a 20% chance (1 in 5) that the person truly has the disease, because the disease is rare. [web:2]\\\\n\\\\n## Interpreting as prior → posterior update\\\\n\\\\nIn that example, Bayesian inference can be read step by step. [web:2]\\\\n\\\\n- Prior belief: Before testing, chance of disease is 0.5% (prevalence). [web:2] \\\\n- Evidence quality: A positive test is much more likely if the person has disease (0.99) than if they do not (0.02), so it is informative but not perfect. [web:2] \\\\n- Posterior belief: After a positive result, the belief jumps from 0.5% to about 20%; this is the updated probability \\\\\\\\(P(D \\\\\\\\mid +)\\\\\\\\). [web:2] \\\\n\\\\nConceptually, the test “boosts” the prior odds of disease by a factor equal to the likelihood ratio \\\\\\\\(\\\\\\\\text{LR}^+ = \\\\\\\\frac{P(+ \\\\\\\\mid D)}{P(+ \\\\\\\\mid \\\\\\\\overline{D})} = \\\\\\\\frac{0.99}{0.02} \\\\\\\\approx 49.5\\\\\\\\), then converts those updated odds back into a probability. [web:2][web:7] \\\\n\\\\nSo Bayesian inference is precisely this: start with a prior probability, adjust it using how strongly the evidence favors one hypothesis over alternatives, and end with a posterior probability that reflects both the original belief and the new data. [web:2][web:7]\",`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"annotations\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"logprobs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6282`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1258`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7540`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.01079`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.02516`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.03988`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_creation_cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_read_cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.00143`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool_calls_cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.0025`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_creation_input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_read_input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3584`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cached_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3584`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool_calls_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"search_web\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invocation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_tokens_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reasoning_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1779391738`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-use`,children:`When to Use`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{children:[`Use `,_jsx(_components.code,{children:`fetch_url`}),` when…`]}),_jsxs(_components.th,{children:[`Use `,_jsx(_components.code,{children:`web_search`}),` when…`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`You already have a URL`}),_jsx(_components.td,{children:`You need to discover relevant pages`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`You need fuller page content`}),_jsx(_components.td,{children:`You need snippets from multiple sources`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`You are summarizing a specific article or document`}),_jsx(_components.td,{children:`You are researching a broad topic`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`You want the model to inspect a known source`}),_jsx(_components.td,{children:`You want the model to find current sources`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Combine `,_jsx(_components.code,{children:`web_search`}),` and `,_jsx(_components.code,{children:`fetch_url`}),` for multi-step research: search to find relevant pages, then fetch the most important URLs for fuller context.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Must be `,_jsx(_components.code,{children:`\"fetch_url\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_urls`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Maximum number of URLs to fetch per tool call. The API schema allows values from 1 to 10.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response-shape`,children:`Response Shape`}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`fetch_url`}),` runs, the response can include a `,_jsx(_components.code,{children:`fetch_url_results`}),` output item before the final assistant message. Each fetched content item includes the URL, page title, and extracted snippet.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`34`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fetch_url_results\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/report\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Example Report\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snippet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Extracted content from the fetched page.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The answer generated from the fetched URL content.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`900`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`250`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1150`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool_calls_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fetch_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"invocation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`error-handling`,children:`Error Handling`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`fetch_url`}),` is best-effort. When a URL cannot be fully fetched or extracted, the API can still return a completed Agent API response with the final assistant message explaining what content was available. Check each item in `,_jsx(_components.code,{children:`fetch_url_results.contents`}),`: successful items contain extracted page text, while failed items contain an explicit marker in `,_jsx(_components.code,{children:`snippet`}),` for the requested URL.`]}),`\n`,_jsxs(_components.p,{children:[`Failure markers explain the known reason, such as an HTTP client error, a robots-policy block, or rate limiting. If the upstream fetch returns no item for a requested URL, the API adds an item whose snippet includes `,_jsx(_components.code,{children:`no_result_returned`}),`. Treat these markers as unavailable content rather than page text.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Case`}),_jsx(_components.th,{children:`Response behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Paywalls and login walls`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fetch_url`}),` does not bypass access controls. The corresponding content item contains a failure marker explaining that the origin rejected the request and may require credentials or a non-GET method.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Redirects`})}),_jsxs(_components.td,{children:[`HTTP redirects are followed when the destination can be fetched. In the returned `,_jsx(_components.code,{children:`fetch_url_results`}),` item, the `,_jsx(_components.code,{children:`url`}),` field reflects the URL you requested, not the final redirect destination.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Non-HTML content`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fetch_url`}),` extracts whatever text content the server returns at the URL. PDFs, binary downloads, and URLs that serve anti-bot challenge pages may return limited or unrelated extracted content.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Timeouts and unreachable URLs`})}),_jsxs(_components.td,{children:[`The corresponding content item contains a failure marker with the available reason. If no upstream result is returned, the marker includes `,_jsx(_components.code,{children:`no_result_returned`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`limits-/-quotas`,children:`Limits / Quotas`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`max_urls`}),` to keep fetches bounded and predictable. Fewer URLs usually produce lower latency and leave more context for the model’s reasoning and final answer.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Limit`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Maximum URLs per tool call`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`max_urls`}),` can be set from 1 to 10.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Supported URL schemes`})}),_jsxs(_components.td,{children:[`Use absolute `,_jsx(_components.code,{children:`http://`}),` or `,_jsx(_components.code,{children:`https://`}),` URLs. Other schemes (`,_jsx(_components.code,{children:`file:`}),`, `,_jsx(_components.code,{children:`data:`}),`, `,_jsx(_components.code,{children:`ftp:`}),`, browser-extension URLs) are not supported and produce no usable content.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Content size`})}),_jsx(_components.td,{children:`Fetched content is extracted into snippets for model context and may be truncated for longer pages.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`pricing`,children:`Pricing`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`fetch_url`}),` is billed at `,_jsx(_components.strong,{children:`$0.50 per 1,000 invocations`}),`. Model token usage is billed separately according to Agent API token pricing.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Pricing follows the same pattern as other tool calls: pay for tool invocations plus model tokens. See `,_jsx(_components.a,{href:`/docs/getting-started/pricing`,children:`Pricing`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Web Search`,icon:`world-search`,href:`/docs/agent-api/tools/web-search`,children:_jsx(_components.p,{children:`Search the web before fetching source content.`})}),_jsx(Card,{title:`Finance Search`,icon:`chart-line`,href:`/docs/agent-api/tools/finance-search`,children:_jsx(_components.p,{children:`Retrieve structured financial and market data.`})}),_jsx(Card,{title:`People Search`,icon:`users`,href:`/docs/agent-api/tools/people-search`,children:_jsx(_components.p,{children:`Search for professionals and employees.`})}),_jsx(Card,{title:`API Reference`,icon:`code-circle`,href:`/api-reference/agent-post`,children:_jsx(_components.p,{children:`View complete endpoint documentation.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Fetch URL Content","sidebarTitle":"Fetch URL Content","description":"Fetch and extract content from specific URLs in the Agent API.","href":"/docs/agent-api/tools/fetch-url-content"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"When to Use","slug":"when-to-use","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Response Shape","slug":"response-shape","depth":2,"children":[]},{"title":"Error Handling","slug":"error-handling","depth":2,"children":[]},{"title":"Limits / Quotas","slug":"limits-/-quotas","depth":2,"children":[]},{"title":"Pricing","slug":"pricing","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/perplexity/a3bce64cf9d1b46a/section-menu.js","/_mintlify/custom/perplexity/594e3514bce8f9d1/navbar-cta.js","/_mintlify/custom/perplexity/72c576fa3737c96e/singular-tracking.js"],"dynamicCss":".\\[web\\:2\\] {\n web: 2\n}\n.\\[web\\:7\\] {\n web: 7\n}","subdomain":"perplexity","siteName":"Perplexity","title":"Fetch URL Content - Perplexity","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-25T10:03:48.190Z","originalFileLocation":"docs/agent-api/tools/fetch-url-content.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Fetch and extract content from specific URLs in the Agent API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Perplexity\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Fetch URL Content - Perplexity\">\u003cmeta data-mint-head property=\"og:description\" content=\"Fetch and extract content from specific URLs in the Agent API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Perplexity\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://perplexity.mintlify.app/_mintlify/api/og/v2?division=Tools\u0026amp;title=Fetch+URL+Content\u0026amp;description=Fetch+and+extract+content+from+specific+URLs+in+the+Agent+API.\u0026amp;theme=0c682f4b9a1b4bccaac4b8e9\u0026amp;signature=770881d2b70928bf0fcf9ea8e60d97696e0d4a641906c6487864c12e269fde06\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Fetch URL Content - Perplexity\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Fetch and extract content from specific URLs in the Agent API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://perplexity.mintlify.app/_mintlify/api/og/v2?division=Tools\u0026amp;title=Fetch+URL+Content\u0026amp;description=Fetch+and+extract+content+from+specific+URLs+in+the+Agent+API.\u0026amp;theme=0c682f4b9a1b4bccaac4b8e9\u0026amp;signature=770881d2b70928bf0fcf9ea8e60d97696e0d4a641906c6487864c12e269fde06\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/perplexity/rSPP83rcZL_iw-xo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Perplexity\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#121516\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"l-0uTKc1Uf60LaNt0Pkw1wLOBFEKoBIhUrv0EMr1J4U\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/agent-api/tools/fetch-url-content.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.perplexity.ai/#organization\",\"name\":\"Perplexity\",\"url\":\"https://docs.perplexity.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/perplexity/gHf_T6roVjp3yaJv/logo/Perplexity_API_Platform.svg?fit=max\u0026auto=format\u0026n=gHf_T6roVjp3yaJv\u0026q=85\u0026s=07cab879ca2ce031bbc3da8b20f7ab90\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.perplexity.ai#website\",\"name\":\"Perplexity\",\"url\":\"https://docs.perplexity.ai\",\"publisher\":{\"@id\":\"https://docs.perplexity.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content#webpage\",\"url\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content\",\"name\":\"Fetch URL Content\",\"description\":\"Fetch and extract content from specific URLs in the Agent API.\",\"dateModified\":\"2026-10-25T10:03:48.190Z\",\"isPartOf\":{\"@id\":\"https://docs.perplexity.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agent API\",\"item\":\"https://docs.perplexity.ai/docs/agent-api/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tools\",\"item\":\"https://docs.perplexity.ai/docs/agent-api/tools/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Fetch URL Content\",\"item\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content#article\",\"headline\":\"Fetch URL Content\",\"name\":\"Fetch URL Content\",\"description\":\"Fetch and extract content from specific URLs in the Agent API.\",\"url\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content\",\"mainEntityOfPage\":{\"@id\":\"https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content#webpage\"},\"dateModified\":\"2026-10-25T10:03:48.190Z\",\"publisher\":{\"@id\":\"https://docs.perplexity.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.perplexity.ai#website\"}}]}\u003c/script>","siteName":"Perplexity","nav":{"global":{"anchors":[{"anchor":"Community","icon":{"style":"regular","name":"message-circle"},"href":"https://community.perplexity.ai"},{"anchor":"Blog","icon":{"style":"regular","name":"pencil"},"href":"https://research.perplexity.ai/articles"},{"anchor":"Changelog","icon":{"style":"regular","name":"clock"},"href":"/docs/resources/changelog"}]},"tabs":[{"tab":"Docs","groups":[{"group":"Getting Started","pages":[{"mode":"frame","title":"Overview","href":"/docs/getting-started/overview"},{"title":"Quickstart","href":"/docs/getting-started/quickstart"},{"title":"Pricing","href":"/docs/getting-started/pricing"},{"title":"Perplexity API MCP Server","sidebarTitle":"Perplexity API MCP","href":"/docs/getting-started/integrations/mcp-server"},{"title":"Perplexity Computer MCP Server","sidebarTitle":"Perplexity Computer MCP","href":"/docs/getting-started/integrations/computer-mcp-server"},{"title":"Perplexity CLI","href":"/docs/cli/overview"}]},{"group":"Orchestrator API","pages":[{"title":"Perplexity Orchestrator API","sidebarTitle":"Quickstart","href":"/docs/router/quickstart"},{"title":"Orchestrator Models \u0026 Pricing","sidebarTitle":"Models","href":"/docs/router/models"},{"title":"Routing \u0026 Reliability","href":"/docs/router/routing-and-reliability"}]},{"group":"Agent API","boost":3,"pages":[{"title":"Agent API","sidebarTitle":"Quickstart","href":"/docs/agent-api/quickstart"},{"group":"Building agents","pages":[{"title":"Define the run","sidebarTitle":"Define the run","href":"/docs/agent-api/building-agents/define-the-run"},{"title":"Prompt the agent","sidebarTitle":"Prompt the agent","href":"/docs/agent-api/building-agents/prompt-the-agent"},{"title":"Give it tools","sidebarTitle":"Give it tools","href":"/docs/agent-api/building-agents/give-it-tools"},{"title":"Run code","sidebarTitle":"Run code","href":"/docs/agent-api/building-agents/run-code"},{"title":"Structure the output","sidebarTitle":"Structure the output","href":"/docs/agent-api/building-agents/shape-output"},{"title":"Keep context","sidebarTitle":"Keep context","href":"/docs/agent-api/building-agents/keep-context"}]},{"group":"Models \u0026 Configuration","pages":[{"title":"Agent API Models","sidebarTitle":"Models","mode":"wide","href":"/docs/agent-api/models"},{"title":"Effort","sidebarTitle":"Effort","href":"/docs/agent-api/effort"},{"title":"Profiles","sidebarTitle":"Profiles","href":"/docs/agent-api/profiles"},{"title":"Model Fallback","sidebarTitle":"Model Fallback","href":"/docs/agent-api/model-fallback"}]},{"group":"Tools","expanded":false,"pages":[{"title":"Tools overview","sidebarTitle":"Overview","href":"/docs/agent-api/tools/overview"},{"title":"Web Search","sidebarTitle":"Web Search","href":"/docs/agent-api/tools/web-search"},{"title":"Image Search","sidebarTitle":"Image Search","href":"/docs/agent-api/tools/image-search"},{"title":"Sandbox","sidebarTitle":"Sandbox","description":"Execute code in isolated containers from inside an Agent API request.","href":"/docs/agent-api/tools/sandbox"},{"title":"Fetch URL Content","sidebarTitle":"Fetch URL Content","href":"/docs/agent-api/tools/fetch-url-content"},{"title":"Finance Search","sidebarTitle":"Finance Search","description":"Retrieve structured financial and market data in the Agent API.","href":"/docs/agent-api/tools/finance-search"},{"title":"People Search","sidebarTitle":"People Search","href":"/docs/agent-api/tools/people-search"},{"title":"MCP","sidebarTitle":"MCP","href":"/docs/agent-api/tools/mcp"},{"title":"Connectors","sidebarTitle":"Connectors","href":"/docs/agent-api/tools/connectors"},{"title":"Custom Functions","sidebarTitle":"Custom Functions","href":"/docs/agent-api/tools/custom-functions"}]},{"group":"Features","pages":[{"title":"Output Control","href":"/docs/agent-api/output-control"},{"title":"Conversation state","sidebarTitle":"Conversation state","href":"/docs/agent-api/conversation-state"},{"title":"Image Attachments","href":"/docs/agent-api/image-attachments"},{"title":"Background Mode","sidebarTitle":"Background Mode","href":"/docs/agent-api/background-mode"},{"title":"Batch API","sidebarTitle":"Batch API","href":"/docs/agent-api/batch"},{"title":"Working with Files","sidebarTitle":"Working with Files","href":"/docs/agent-api/working-with-files"},{"title":"Skills","sidebarTitle":"Skills","href":"/docs/agent-api/skills"}]},{"title":"OpenAI Compatibility","href":"/docs/agent-api/openai-compatibility"},{"group":"Migrate from Sonar","pages":[{"title":"Migrate from Sonar to the Agent API","sidebarTitle":"Overview","href":"/docs/agent-api/migrate-from-sonar/overview"},{"title":"How to migrate from Sonar","sidebarTitle":"How to migrate","href":"/docs/agent-api/migrate-from-sonar/how-to"},{"title":"Agent API vs Sonar benchmarks","sidebarTitle":"Benchmarks","href":"/docs/agent-api/migrate-from-sonar/benchmarks"}]},{"title":"Prompt Guide","href":"/docs/agent-api/prompt-guide"}]},{"group":"Search API","pages":[{"title":"Search API Overview","sidebarTitle":"Overview","href":"/docs/search/overview"},{"title":"Perplexity Search API","sidebarTitle":"Quickstart","href":"/docs/search/quickstart"},{"title":"Fast Search","sidebarTitle":"Fast Search","href":"/docs/search/fast-search"},{"title":"Best Practices","href":"/docs/search/best-practices"},{"title":"Perplexity Search SDK","sidebarTitle":"Search SDK for agents","href":"/docs/search-sdk/overview"},{"group":"Agent SDKs","pages":[{"title":"Use Search API with the Anthropic SDK","sidebarTitle":"Anthropic","href":"/docs/search/agent-sdks/anthropic"},{"title":"Use Search API with the OpenAI SDK","sidebarTitle":"OpenAI","href":"/docs/search/agent-sdks/openai"},{"title":"Use Search API with the Google Gemini SDK","sidebarTitle":"Gemini","href":"/docs/search/agent-sdks/gemini"}]},{"group":"Filters","pages":[{"title":"Search Date and Time Filters","href":"/docs/search/filters/date-time-filters"},{"title":"Search Language Filter","href":"/docs/search/filters/language-filter"},{"title":"Search Domain Filter","href":"/docs/search/filters/domain-filter"},{"title":"People Search","href":"/docs/search/filters/people-search"}]}]},{"group":"Embeddings API","pages":[{"title":"Embeddings API","sidebarTitle":"Quickstart","href":"/docs/embeddings/quickstart"},{"title":"Best Practices","href":"/docs/embeddings/best-practices"},{"title":"Standard Embeddings","href":"/docs/embeddings/standard-embeddings"},{"title":"Contextualized Embeddings","href":"/docs/embeddings/contextualized-embeddings"}]},{"group":"Decisions API","pages":[{"title":"Decisions API","sidebarTitle":"Quickstart","href":"/docs/decisions/quickstart"},{"title":"Decider for Mac","sidebarTitle":"Decider for Mac","href":"/docs/decisions/decider-for-mac"}]},{"group":"Perplexity SDK","pages":[{"title":"Quickstart","href":"/docs/sdk/overview"},{"group":"Guides","pages":[{"title":"Configuration","href":"/docs/sdk/configuration"},{"title":"Error Handling","href":"/docs/sdk/error-handling"},{"title":"Performance Optimization","href":"/docs/sdk/performance"},{"title":"Type Safety","href":"/docs/sdk/type-safety"},{"title":"Best Practices","href":"/docs/sdk/best-practices"}]}]},{"group":"Admin \u0026 Management","pages":[{"title":"Signing In to the API Portal","sidebarTitle":"Signing In","href":"/docs/admin/signing-in"},{"title":"Projects \u0026 Billing","href":"/docs/getting-started/projects"},{"title":"API Key Management","href":"/docs/admin/api-key-management"},{"title":"Safety Identifiers","href":"/docs/admin/safety-identifiers"},{"title":"Analytics API","href":"/docs/admin/computer-analytics-api"},{"title":"Audit API","sidebarTitle":"Audit API","href":"/docs/admin/audit-api"},{"title":"Rate Limits \u0026 Usage Tiers","href":"/docs/admin/rate-limits-usage-tiers"},{"title":"AWS Marketplace","href":"/docs/resources/aws-marketplace"}]},{"group":"Resources","pages":[{"group":"Integrations","pages":[{"title":"Perplexity with AG2","sidebarTitle":"AG2","href":"/docs/getting-started/integrations/ag2"},{"title":"Perplexity with Agno","sidebarTitle":"Agno","href":"/docs/getting-started/integrations/agno"},{"title":"Perplexity MCP Server for Google Antigravity","sidebarTitle":"Google Antigravity","href":"/docs/getting-started/integrations/antigravity"},{"title":"Perplexity with AnythingLLM","sidebarTitle":"AnythingLLM","href":"/docs/getting-started/integrations/anythingllm"},{"title":"Perplexity with CAMEL-AI","sidebarTitle":"CAMEL-AI","href":"/docs/getting-started/integrations/camel"},{"title":"Perplexity with Claude Code","sidebarTitle":"Claude Code","href":"/docs/getting-started/integrations/claude-code"},{"title":"Perplexity with Composio","sidebarTitle":"Composio","href":"/docs/getting-started/integrations/composio"},{"title":"Perplexity with Cursor","sidebarTitle":"Cursor","href":"/docs/getting-started/integrations/cursor"},{"title":"Perplexity with Haystack","sidebarTitle":"Haystack","href":"/docs/getting-started/integrations/haystack"},{"title":"Perplexity web search in Hermes","sidebarTitle":"Hermes","href":"/docs/getting-started/integrations/hermes"},{"title":"Perplexity with LangChain","sidebarTitle":"LangChain","href":"/docs/getting-started/integrations/langchain"},{"title":"Perplexity with LiteLLM","sidebarTitle":"LiteLLM","href":"/docs/getting-started/integrations/litellm"},{"title":"Perplexity with LiveKit Agents","sidebarTitle":"LiveKit","href":"/docs/getting-started/integrations/livekit"},{"title":"Perplexity with Mastra","sidebarTitle":"Mastra","href":"/docs/getting-started/integrations/mastra"},{"title":"Perplexity with n8n","sidebarTitle":"n8n","href":"/docs/getting-started/integrations/n8n"},{"title":"Perplexity with OpenClaw","sidebarTitle":"OpenClaw","href":"/docs/getting-started/integrations/openclaw"},{"title":"Perplexity with OpenCode","sidebarTitle":"OpenCode","href":"/docs/getting-started/integrations/opencode"},{"title":"Perplexity with Pipedream","sidebarTitle":"Pipedream","href":"/docs/getting-started/integrations/pipedream"},{"title":"Perplexity on Stripe Projects","sidebarTitle":"Stripe Projects","href":"/docs/getting-started/integrations/stripe-projects"},{"title":"Perplexity with SuperPlane","sidebarTitle":"SuperPlane","href":"/docs/getting-started/integrations/superplane"},{"title":"Perplexity with the Vercel AI SDK","sidebarTitle":"Vercel AI SDK","href":"/docs/getting-started/integrations/vercel-ai-sdk"}]},{"title":"Feature Requests","mode":"center","href":"/docs/resources/feature-roadmap"},{"title":"Privacy \u0026 Security","href":"/docs/resources/privacy-security"},{"title":"Frequently Asked Questions","mode":"wide","href":"/docs/resources/faq"},{"title":"System Status","sidebarTitle":"System Status","href":"/docs/resources/status"},{"title":"Changelog","sidebarTitle":"Changelog","href":"/docs/resources/changelog"},{"title":"Get in Touch","sidebarTitle":"Get in Touch","href":"/docs/resources/discussions"},{"title":"Perplexity Crawlers","href":"/docs/resources/perplexity-crawlers"}]}]},{"tab":"Cookbook","groups":[{"group":"Cookbook","pages":[{"title":"Cookbook","sidebarTitle":"Perplexity API Cookbook","href":"/docs/cookbook"},{"title":"Getting Started","href":"/docs/cookbook/getting-started"},{"group":"Community Showcase","pages":[{"title":"Community Showcase","sidebarTitle":"Community Showcase","href":"/docs/cookbook/showcase/index"}]},{"group":"Examples","pages":[{"title":"Examples Overview","href":"/docs/cookbook/examples/README"},{"title":"Document Q\u0026A with Embeddings","href":"/docs/cookbook/examples/document-qa/README"},{"title":"Agent Research Assistant","href":"/docs/cookbook/examples/agent-research-assistant/README"},{"title":"Equity Research Brief","href":"/docs/cookbook/examples/equity-research-brief/README"},{"title":"TypeScript Agent CLI","href":"/docs/cookbook/examples/typescript-agent-cli/README"},{"title":"Image Analysis","href":"/docs/cookbook/examples/image-analysis/README"},{"title":"Multi-Provider Model Comparison","href":"/docs/cookbook/examples/model-comparison/README"},{"title":"Document Q\u0026A","href":"/docs/cookbook/examples/file-attachment-qa/README"},{"title":"Search News Monitor","href":"/docs/cookbook/examples/search-news-monitor/README"},{"title":"SEC Filing Search","href":"/docs/cookbook/examples/sec-filing-search/README"},{"title":"Competitor Buzz Tracker","href":"/docs/cookbook/examples/competitor-buzz-tracker/README"},{"title":"Talent Sourcer","href":"/docs/cookbook/examples/talent-sourcer/README"},{"title":"Enrich Customer Data with Agent API","href":"/docs/cookbook/examples/customer-enrichment-agent-api/README"},{"title":"Model Picker","href":"/docs/cookbook/examples/model-picker/README"},{"title":"Grounded Data Story with Kimi K3","href":"/docs/cookbook/examples/data-story-kimi-k3/README"},{"title":"Customizing Effort Levels","href":"/docs/cookbook/examples/agent-api-effort/README"},{"title":"GitHub investigation agent using managed connectors","href":"/docs/cookbook/examples/triage-bug-report-connectors/README"},{"title":"Triage Support Tickets with the Decisions API","href":"/docs/cookbook/examples/decisions-api-ticket-triage/README"},{"title":"Drive a Browser with the Decisions API","href":"/docs/cookbook/examples/decisions-api-browser-agent/README"},{"title":"Judge Citation Accuracy with Decisions API","href":"/docs/cookbook/examples/decisions-api-answer-gate/README"},{"title":"Check Agent Actions Before They Run with Decisions API","href":"/docs/cookbook/examples/decisions-api-action-gate/README"},{"title":"Rank Search Results to Answer Questions with the Best Quote Using Decisions API","href":"/docs/cookbook/examples/decisions-quote-finder/README"},{"title":"Catch Visual Bugs in CI with the Decisions API","href":"/docs/cookbook/examples/decisions-api-visual-qa-gate/README"},{"title":"Check a Chart for Misleading Design with a Decision Model","href":"/docs/cookbook/examples/decisions-api-chart-check/README"},{"title":"Enrich a CSV of Companies Overnight with the Batch API","href":"/docs/cookbook/examples/batch-api-company-enrichment/README"},{"title":"Track What the Web Said Each Week About a Topic, and Build a Report","href":"/docs/cookbook/examples/agent-api-story-timeline/README"},{"title":"Build a Data Analytics Agent Using Custom Connectors","href":"/docs/cookbook/examples/agent-api-data-analyst/README"},{"title":"Turn Agent Failures into Regression Tests","href":"/docs/cookbook/examples/agent-api-regression-testing/README"}]},{"group":"Guides","pages":[{"title":"RAG with Perplexity Embeddings","href":"/docs/cookbook/articles/embeddings-rag/README"},{"title":"Streaming Citation Parsing","href":"/docs/cookbook/articles/streaming-citations/README"},{"title":"Structured Output Extraction","href":"/docs/cookbook/articles/structured-output-extraction/README"},{"title":"Multi-Provider Orchestration","href":"/docs/cookbook/articles/multi-provider-orchestration/README"},{"title":"Academic and Scholarly Search","href":"/docs/cookbook/articles/academic-search/README"},{"title":"Deep Research Workflows","href":"/docs/cookbook/articles/async-deep-research/README"},{"title":"Search Domain Filtering Patterns","href":"/docs/cookbook/articles/search-domain-filtering/README"},{"title":"VC Investment Memo Agent with LangGraph","href":"/docs/cookbook/articles/langchain-vc-memo-agent/README"},{"title":"Daily AI Stock News PDF with Skills","href":"/docs/cookbook/articles/agent-skills/README"},{"title":"Daily News Digest with LLM Deduplication","href":"/docs/cookbook/articles/news-dedupe-digest/README"},{"title":"Build an incident responder with Profiles, Skills, and Managed Connectors","sidebarTitle":"Incident responder","href":"/docs/cookbook/articles/incident-responder/README"},{"title":"Function Calling End-to-End","href":"/docs/cookbook/articles/function-calling-e2e/README"},{"title":"Search as Code for coding agents","sidebarTitle":"Search as Code for coding agents","href":"/docs/cookbook/articles/search-as-code-coding-agents/README"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/gateway-chat-completions-post"}]}]},"basePath":"","title":"Fetch URL Content - Perplexity","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["10e4515597"],"chunks":["BannerMarkdown-CX_qQQOL.js","dist-BTZUMDnx.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-xpJZXxdP.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}