> ## Documentation Index
> Fetch the complete documentation index at: https://docs.2extract.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Usage Examples

> Complete sessions with the 2extract MCP server - from a plain-language request to a working connection string.

Four sessions, shown end to end. The point of each is the same: you state the outcome, the agent works out the calls.

***

## Multi-region price monitoring

The request:

> Collect gaming-laptop prices from Amazon in Germany, the UK and Japan.

What the agent does:

```text icon="terminal" theme={null}
listGeoCountries
  ⌐ DE · GB · JP

listProxyPlans
  ⌐ Pay-As-You-Go · residential

getAccountBalance
  ⌐ $149.95 available

createProxyResource
  ⌐ amazon_gaming_laptops
    "Price tracking for gaming laptops on Amazon DE, GB and JP"

setProxyLimits
  ⌐ 50 GB per month

Proxy ready. Three connection strings:

DE  2xt-customer-K3nP7qLm2Xv-proxy-amazon_gaming_laptops-country-de:s7Kd92mQ@proxy.2extract.net:5555
GB  2xt-customer-K3nP7qLm2Xv-proxy-amazon_gaming_laptops-country-gb:s7Kd92mQ@proxy.2extract.net:5555
JP  2xt-customer-K3nP7qLm2Xv-proxy-amazon_gaming_laptops-country-jp:s7Kd92mQ@proxy.2extract.net:5555
```

Three things worth noticing:

* **One proxy, three strings.** The country lives in the username, not in the resource. You do not need a separate proxy per region - see [Geo Targeting](/proxy-products/configuration/geo-targeting).
* **The name describes the job.** `amazon_gaming_laptops` is recognisable in your dashboard six weeks later. The agent generated it from your sentence.
* **The cap came first.** `setProxyLimits` ran before you touched the proxy, so a runaway job stops at 50 GB rather than at your balance.

Drop a string straight into whatever makes the requests:

<CodeGroup>
  ```python amazon_de.py icon="python" theme={null}
  import requests

  proxy = "http://2xt-customer-K3nP7qLm2Xv-proxy-amazon_gaming_laptops-country-de:s7Kd92mQ@proxy.2extract.net:5555"

  r = requests.get(
      "https://www.amazon.de/s?k=gaming+laptop",
      proxies={"http": proxy, "https": proxy},
      timeout=30,
  )
  print(r.status_code)
  ```

  ```javascript amazon_de.js icon="js" theme={null}
  const axios = require("axios");

  const { status } = await axios.get("https://www.amazon.de/s?k=gaming+laptop", {
    proxy: {
      protocol: "http",
      host: "proxy.2extract.net",
      port: 5555,
      auth: {
        username: "2xt-customer-K3nP7qLm2Xv-proxy-amazon_gaming_laptops-country-de",
        password: "s7Kd92mQ",
      },
    },
    timeout: 30000,
  });
  console.log(status);
  ```
</CodeGroup>

***

## Narrowing down to a city

The request:

> I need a proxy that looks like it is browsing from Munich.

```text icon="terminal" theme={null}
listGeoCountries  search: "Germany"
  ⌐ Germany · DE

searchGeoCities   country_code: "DE", search: "Munich"
  ⌐ Munich · munich

Add -city-munich to the username:

2xt-customer-K3nP7qLm2Xv-proxy-local_seo_de-country-de-city-munich:s7Kd92mQ@proxy.2extract.net:5555
```

The agent searched rather than listing. City catalogues run to thousands of entries, so a name filter is the only sane approach - the tool descriptions tell it as much.

<Note>
  City targeting requires the country in the same username. `-city-munich` on its own does nothing.
</Note>

***

## A monthly cost review

The request, or the `/monthly-cost-report` prompt:

> Show my traffic and spend for last month and flag anything odd.

```text icon="terminal" theme={null}
getAccountTrafficUsage      date_from: 2026-07-01  date_to: 2026-07-31
listAccountBalanceHistory   date_from: 2026-07-01  date_to: 2026-07-31

July 2026 · 412 GB · $1,644.88

  amazon_gaming_laptops     186 GB    $742.14
  bestbuy_stock_us           94 GB    $375.06
  serp_us_daily              88 GB    $351.12
  local_seo_de               44 GB    $175.56
  legacy_test_proxy           0 GB      $0.00   idle 41 days

Balance $149.95 - about 37 GB at your current rate.
```

Read-only: nothing was created, changed, or charged. The idle proxy and the runway estimate are the parts you would have had to work out by hand.

***

## Cleaning up

Following on from the report:

> Deactivate anything that has not moved traffic in a month.

```text icon="terminal" theme={null}
listProxyResources  statistic_from: 2026-07-10  statistic_to: 2026-08-10

Two proxies with zero traffic in the last 30 days:

  legacy_test_proxy    idle 41 days
  staging_probe        idle 33 days

Deactivate both? They can be reactivated at any time.

> yes

deactivateProxyResource  legacy_test_proxy   ⌐ inactive
deactivateProxyResource  staging_probe       ⌐ inactive
```

The agent asked before acting, and it **deactivated rather than deleted**. That is deliberate: deactivation is reversible, deletion is not. The built-in `cleanup-unused-proxies` prompt is hard-wired never to delete.

<Warning>
  Deleting a proxy is irreversible and its name cannot be reused in the same way, since names are immutable. If you are unsure, deactivate.
</Warning>

***

## Writing requests that work well

<AccordionGroup>
  <Accordion title="State the outcome, not the configuration" icon="bullseye">
    **Good:** "Create a proxy for collecting Amazon prices in Germany, cap it at 20 GB a month."

    **Worse:** "Create a residential proxy on the plan I used last time."

    The second sends the agent hunting through history for something it cannot verify. The first lets it look up the current plans and check your balance before spending anything.
  </Accordion>

  <Accordion title="Say the budget out loud" icon="gauge">
    An agent with `proxies:write` can create billable resources. Naming a cap in the request - "no more than 20 GB a month" - gets it applied at creation instead of after the first surprise invoice.
  </Accordion>

  <Accordion title="Give the proxy a job in the description" icon="tag">
    The description is free text and shows up next to the proxy in your dashboard. "Price tracking for gaming laptops on Amazon DE, GB and JP" is worth writing; "test" is not.
  </Accordion>

  <Accordion title="Ask it to verify" icon="circle-check">
    "Create it, then show me the final configuration." The agent re-reads the resource and reports what actually exists, rather than what it intended to create.
  </Accordion>
</AccordionGroup>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Use Cases" icon="lightbulb" href="/ai/use-cases/agent-web-access">
    Longer-form scenarios, from web access to data enrichment.
  </Card>

  <Card title="FAQ" icon="circle-question" href="/ai/mcp-server/faq">
    Keys, scopes, limits, errors, and cost.
  </Card>
</CardGroup>
