City Electric Supply APIcityelectricsupply.com ↗
Search CES products, browse categories, get stock levels with ZIP-code pricing, and manage a guest cart via 7 structured endpoints.
What is the City Electric Supply API?
The City Electric Supply API gives developers access to 7 endpoints covering CES's electrical product catalog, including search_products for keyword and SKU lookups, category browsing, detailed product specs, localized stock levels by ZIP code, and a guest cart that persists across add and retrieve calls. Each product response includes stockCode, basePrice, specifications, and both local and network inventory quantities.
curl -X GET 'https://api.parse.bot/scraper/c90a7a77-36a8-4c15-a0a2-bdf3a9102a54/search_products?page=0&limit=15&query=wire+connector&zipcode=30301' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace cityelectricsupply-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""City Electric Supply: search products, browse categories, view details, manage cart."""
from parse_apis.city_electric_supply_api import CityElectricSupply, ResourceNotFound
client = CityElectricSupply()
# Search for products — limit= caps total items fetched across pages.
for product in client.productsummaries.search(query="WAGO lever connector", limit=3):
print(product.productName, product.basePrice, product.stockCode)
# Drill into the first result's full details (specs, images, stock).
item = client.productsummaries.search(query="wire connector", limit=1).first()
if item:
detail = item.details()
print(detail.productName, detail.basePrice)
for spec in detail.specifications[:3]:
print(f" {spec.name}: {spec.value}")
# Browse categories and list products within one.
category = client.categories.list(limit=1).first()
if category:
for p in category.products.list(limit=3):
print(p.productName, p.basePrice)
# Typed error handling on a point-lookup.
try:
bad = client.productsummaries.search(query="zzz_nonexistent_sku_999", limit=1).first()
except ResourceNotFound as exc:
print(f"Resource not found: {exc}")
# Cart operations: add an item then inspect the cart.
client.carts.add_item(product_id=143945, quantity=1)
cart = client.carts.get()
print(f"Cart has {cart.headerSummary.itemCount} items, total ${cart.headerSummary.total}")
for ci in cart.items[:3]:
print(f" {ci.productName} x{ci.quantity} = ${ci.subtotal}")
print("Done: search / details / categories / category.products / cart.add_item / cart.get")
Full-text search over the CES product catalog by keyword, SKU, or part number. Returns paginated product summaries with attribute filters, category facets, sort options, and total match count. Pagination is 0-based page indexing. Supports localized pricing and inventory when a zipcode is provided.
| Param | Type | Description |
|---|---|---|
| page | integer | Page index (0-based) |
| limit | integer | Number of results per page |
| queryrequired | string | Search keyword, SKU, or part number |
| zipcode | string | 5-digit US ZIP code for localized pricing and inventory |
{
"type": "object",
"fields": {
"page": "integer current page index (0-based)",
"products": "array of product summary objects with productId, productName, stockCode, basePrice, imageUrl, etc.",
"totalPages": "integer total number of pages",
"sortOptions": "array of sort option objects with sortId and sortName",
"totalMatches": "integer total number of matching products",
"categoryFilters": "array of matching category objects with categoryId and categoryName",
"attributeFilters": "array of filter objects with filterId, filterName, and filterOptions"
},
"sample": {
"data": {
"page": 0,
"products": [
{
"imageUrl": "https://media.cityelectricsupply.com/media/images/ilsco_746886_p_med.webp",
"basePrice": 32.08,
"productId": 171180,
"stockCode": "0009-6097",
"productName": "Nimbus Insulated Aluminum In-Line Splicer-Reducer Connector",
"packDescription": "Pack of 1 Unit",
"locationInventory": {
"quantity": 0,
"locationId": 9999,
"networkQuantity": 0
},
"manufacturerNames": [
"Ilsco"
],
"productDetailPageUrl": "ilsco-nimbus-insulated-aluminum-in-line-splicer-reducer-connector-conductor-range-14-awg-to-1-0-pbt-1-0"
}
],
"totalPages": 85,
"sortOptions": [
{
"sortId": 0,
"sortName": "Best Match"
}
],
"totalMatches": 1270,
"categoryFilters": [
{
"categoryId": 28951,
"categoryName": "Twist-On Wire Connectors"
}
],
"attributeFilters": [
{
"filterId": 4129,
"filterName": "Amperage Rating",
"filterOptions": [
{
"filterValue": "20 A",
"productCount": 147
}
]
}
]
},
"status": "success"
}
}About the City Electric Supply API
Search and Product Data
The search_products endpoint accepts a query string (keyword, SKU, or part number) plus an optional zipcode to return localized pricing and inventory. Results include a productSearchResult object with totalMatches, localStockMatches, returnedMatches, attributeFilters for faceted navigation, and a paginated products array. Pagination is 0-based via the page and limit parameters.
The get_product_details endpoint accepts any of product_id, slug, or stock_code (at least one required) and returns the full product record: productName, stockCode, basePrice, specifications (name/value pairs), images (with multiple size URLs), categories, and a stock object containing locationId, quantity, and networkQuantity. Providing a zipcode scopes stock and pricing to the nearest CES branch.
Category Navigation
list_categories returns the full top-level category tree in one call — no pagination — with categoryId, categoryName, urlSlug, and imagePathSmall for each entry. get_category_details drills into a single category by category_id or slug, returning its direct childCategories with their own IDs, names, slugs, and image URLs. To list products inside a category, pass the category_id or slug to get_category_products, which shares the same paginated productSearchResult shape as the search endpoint and also accepts a zipcode.
Guest Cart Management
The add_to_cart endpoint takes a product_id and an optional quantity, returning a status string confirming the operation. The cart persists within the same session. get_cart returns the full cart state: an items array with productId, productName, quantity, price, subtotal, stockCode, and per-item stock levels, plus a summary with subtotal, discountedSubtotal, applied discounts, selectedItemCount, and an isFreeShipping flag. A headerSummary object provides a lightweight itemCount and total for UI badge use.
The City Electric Supply API is a managed, monitored endpoint for cityelectricsupply.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cityelectricsupply.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official cityelectricsupply.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a procurement tool that queries search_products by SKU and checks localStockMatches for nearest-branch availability before ordering
- Sync a distributor's inventory feed using get_product_details with stock_code identifiers and networkQuantity for warehouse-wide availability
- Generate a category sitemap by walking list_categories and get_category_details to enumerate all CES product tree nodes
- Display localized electrical supply pricing in a field-service mobile app by passing the job-site zipcode to get_category_products
- Automate quote generation by adding matched products to a guest cart via add_to_cart and reading discountedSubtotal from get_cart
- Feed product specifications and images into a PIM system using the specifications array and images URLs returned by get_product_details
- Build a part-number resolver that accepts a stock_code and returns full product metadata including categories and basePrice
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does City Electric Supply offer an official developer API?+
How does ZIP code affect the data returned by search and product endpoints?+
zipcode is provided to search_products, get_product_details, or get_category_products, the response includes branch-specific stock via the stock object (locationId, quantity) and locally adjusted pricing via basePrice. Without a ZIP code the responses still return catalog data and networkQuantity (chain-wide stock), but branch-level availability is not scoped.What does the cart session cover, and are saved/named carts supported?+
add_to_cart accepts a product_id and optional quantity, and get_cart returns items, line-level pricing, applied discounts, and an isFreeShipping flag. Named or saved carts tied to a CES account are not currently exposed. The API covers guest cart creation and retrieval. You can fork it on Parse and revise to add account-based cart or order-history endpoints.Can I retrieve product reviews or customer ratings through this API?+
How deep does category navigation go — can I retrieve the full subcategory tree in one call?+
list_categories returns all top-level categories in a single call, but childCategories is empty at the root level. To get subcategories you call get_category_details for each parent, which returns its direct children. There is no single endpoint that returns the full nested tree to arbitrary depth. You can fork it on Parse and revise to add a recursive tree-builder endpoint if your use case requires full-depth traversal in one request.