Envia.com States API

Get state/province information by country

Operations 4

GET /provinces Get All Provinces #
GET /provinces/{state_code} Get Single Province #
GET /state Get states by country #
GET /state/{state_code} Get state by code #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/envia:envia-states-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

envia-states-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Envia Queries States API
  version: v2.3.1
  description: Read-only service for lookups, lists, and account utilities. This API provides access to countries, states, cities, carriers, services, and address structure information needed for shipping operations. Use this API to get the required information for building shipping forms and validating addresses. The Queries API is designed for developers who need read-only access to reference data such as supported carriers, available services, shipment history, and user account settings. It serves as the lookup layer of the Envia platform, enabling applications to populate dropdowns, validate inputs, and retrieve shipment details without modifying any data.
  contact:
    name: Envia API Support
    url: https://docs.envia.com/discuss
  license:
    name: Proprietary
    url: https://www.envia.com/terminos-y-condiciones
  termsOfService: https://www.envia.com/terminos-y-condiciones
servers:
- url: https://queries.test.envia.com/
  description: Sandbox/Test
- url: https://queries.envia.com/
  description: Production
security:
- bearerAuth: []
tags:
- name: States
  description: Get state/province information by country
paths:
  /provinces:
    get:
      tags:
      - States
      summary: Get All Provinces
      description: Retrieve provinces.
      operationId: all-provinces
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful
                  data:
                    type: array
                    description: List of provinces
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Province code
                        name:
                          type: string
                          description: Province name
                        country:
                          type: string
                          description: Country code
  /provinces/{state_code}:
    get:
      tags:
      - States
      summary: Get Single Province
      description: Retrieve provinces for the specified state code.
      operationId: province-by-code
      parameters:
      - name: state_code
        in: path
        required: true
        description: State code
        schema:
          type: string
          example: TX
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful
                  data:
                    type: object
                    description: Province information
                    properties:
                      id:
                        type: string
                        description: Province code
                      name:
                        type: string
                        description: Province name
                      country:
                        type: string
                        description: Country code
  /state:
    get:
      tags:
      - States
      summary: Get states by country
      description: 'Get states by country code. Available countries: **US** - United States, **MX** - Mexico, **CO** - Colombia, **CA** - Canada, **BR** - Brazil, **IN** - India, **CL** - Chile, **GT** - Guatemala, **AR** - Argentina, **PE** - Peru'
      operationId: states-by-country
      parameters:
      - name: country_code
        in: query
        required: true
        description: Two-digit country code
        schema:
          type: string
          example: MX
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: List of states/provinces
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: State name
                          example: Nuevo León
                        code_2_digits:
                          type: string
                          description: Two-digit state code
                          example: NL
                        code_3_digits:
                          type: string
                          description: Three-digit state code
                          example: NLE
                        country_code:
                          type: string
                          description: Country code
                          example: MX
  /state/{state_code}:
    get:
      tags:
      - States
      summary: Get state by code
      description: 'Get state details by state code. Examples: **US** - AL (Alabama), TX (Texas), NY (New York); **Mexico** - NL (Nuevo León), AG (Aguascalientes), BC (Baja California)'
      operationId: state-by-code
      parameters:
      - name: state_code
        in: path
        required: true
        description: State code (2-3 digits)
        schema:
          type: string
          example: NL
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: State information
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: State name
                          example: Nuevo León
                        code_2_digits:
                          type: string
                          description: Two-digit state code
                          example: NL
                        code_3_digits:
                          type: string
                          description: Three-digit state code
                          example: NLE
                        country_code:
                          type: string
                          description: Country code
                          example: MX
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Full Envia API Documentation
  url: https://docs.envia.com
x-provenance:
  method: searched
  source: https://docs.envia.com/reference
  harvested: '2026-10-27'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.envia.com/reference/active-notifications.md
  - https://docs.envia.com/reference/additional-services-by-locale.md
  - https://docs.envia.com/reference/additional-services.md
  - https://docs.envia.com/reference/addresses-by-type.md
  - https://docs.envia.com/reference/all-addresses.md
  - https://docs.envia.com/reference/all-countries.md
  - https://docs.envia.com/reference/all-packages.md
  - https://docs.envia.com/reference/all-provinces.md
  - https://docs.envia.com/reference/all-webhooks.md
  - https://docs.envia.com/reference/available-carriers-by-shipment-type.md
  - https://docs.envia.com/reference/available-couriers-detailed.md
  - https://docs.envia.com/reference/available-services.md
  - https://docs.envia.com/reference/cancel-dce.md
  - https://docs.envia.com/reference/carrier-actions-by-carrier.md
  - https://docs.envia.com/reference/carrier-branches.md
  - https://docs.envia.com/reference/carrier-by-id.md
  - https://docs.envia.com/reference/carrier-print-options.md
  - https://docs.envia.com/reference/carriers-by-country.md
  - https://docs.envia.com/reference/country-address-structure.md
  - https://docs.envia.com/reference/country-by-code.md
  - https://docs.envia.com/reference/country-locale.md
  - https://docs.envia.com/reference/create-ndr-request.md
  - https://docs.envia.com/reference/create-package.md
  - https://docs.envia.com/reference/create-shop-shipping-rule.md
  - https://docs.envia.com/reference/create-user-address.md
  - https://docs.envia.com/reference/create-webhook.md
  - https://docs.envia.com/reference/deactivate-company-notifications.md
  - https://docs.envia.com/reference/default-shop-services.md
  - https://docs.envia.com/reference/default-user-address.md
  - https://docs.envia.com/reference/default-user-print.md
  - https://docs.envia.com/reference/download-labels-bulk.md
  - https://docs.envia.com/reference/estafeta-branches-mexico.md
  - https://docs.envia.com/reference/generate-dce.md
  - https://docs.envia.com/reference/get-orders.md
  - https://docs.envia.com/reference/invoice-detail.md
  - https://docs.envia.com/reference/ndr-history.md
  - https://docs.envia.com/reference/ndr-shipment-actions.md
  - https://docs.envia.com/reference/payment-history.md
  - https://docs.envia.com/reference/province-by-code.md
  - https://docs.envia.com/reference/remove-package.md
  - https://docs.envia.com/reference/remove-user-address.md
  - https://docs.envia.com/reference/select-shipping-rule-for-order.md
  - https://docs.envia.com/reference/serviceable-countries.md
  - https://docs.envia.com/reference/services-by-carrier-and-country.md
  - https://docs.envia.com/reference/services-by-carrier.md
  - https://docs.envia.com/reference/shipment-by-tracking.md
  - https://docs.envia.com/reference/shipment-types.md
  - https://docs.envia.com/reference/shipments-by-month-year.md
  - https://docs.envia.com/reference/shop-by-url.md
  - https://docs.envia.com/reference/shop-shipping-rule.md
  - https://docs.envia.com/reference/shop-shipping-rules.md
  - https://docs.envia.com/reference/state-by-code.md
  - https://docs.envia.com/reference/states-by-country.md
  - https://docs.envia.com/reference/update-package.md
  - https://docs.envia.com/reference/update-shop-shipping-rules.md
  - https://docs.envia.com/reference/update-user-address.md
  - https://docs.envia.com/reference/update-webhook.md
  - https://docs.envia.com/reference/webhook-types.md
  merge:
    pages: 58
    deduped: 57
    conflicts_kept_first: 0