> For the complete documentation index, see [llms.txt](https://help.netnut.io/netnut-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.netnut.io/netnut-documentation/resources/customers-api/traffics.md).

# Traffics

## GET /customer/traffic/city-and-state

> Get list of states and cities for rotating and static residential proxies

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CityAndState":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"City and state array","items":{"type":"object"}}},"description":"City and State"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/city-and-state":{"get":{"tags":["Traffics"],"summary":"Get list of states and cities for rotating and static residential proxies","operationId":"getCityState","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityAndState"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /customer/traffic/available-countries-mob

> Get list of available countries for mobile proxies

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CityAndStateMob":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","items":{"type":"object"},"description":"City and state mob array"}},"description":"City and State Mob"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/available-countries-mob":{"get":{"tags":["Traffics"],"summary":"Get list of available countries for mobile proxies","operationId":"getCityStateMob","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityAndStateMob"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /customer/traffic/available-countries

> Get list of available countries for residential and static

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AvailableCountries":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","items":{"type":"object"},"description":"City and state array"}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/available-countries":{"get":{"tags":["Traffics"],"summary":"Get list of available countries for residential and static","operationId":"getCity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableCountries"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /customer/traffic/

> Get traffic data

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Traffic":{"type":"object","properties":{"byDate":{"type":"boolean","description":"Show the list grouped by date"},"dateRange":{"type":"string","description":"Date range (max: 30 days)"},"byCountries":{"type":"boolean","description":"Show the list grouped by countries"},"countriesCodes":{"type":"string","description":"Filter by specific country code"},"byErrors":{"type":"boolean","description":"Show the list grouped by errors"},"page":{"type":"number","description":"Show requested page(only when show by domains is on)"},"errorCodes":{"type":"string","description":"Filter by specific error code","enum":["200","407","502","503","404","OtherError"]},"bySubUser":{"type":"boolean","description":"Show the list grouped by sub-users"},"subUsers":{"type":"string","description":"Filter by specific sub-user"},"paginationRowsPerPage":{"type":"number","description":"Pagination Rows Per Page when using domains."},"paginationPage":{"type":"number","description":"pagination Page when using domains."},"product":{"type":"string","description":"filters by product, options: Res-Stc-Dc,Data Center,Residential,Static Residential,Mobile"}}},"LoginSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"token":{"type":"string","description":"token"}},"description":"Login credentials"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/":{"post":{"tags":["Traffics"],"summary":"Get traffic data","operationId":"getTrafficUsage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traffic"}}},"required":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSuccess"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.netnut.io/netnut-documentation/resources/customers-api/traffics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
