Skip to main content

Zero-dependency client for the Auto Body Shop Directory public API - find US auto body shops by ZIP code, city, location, or shop profile (autobodyshopnear.com).

Project description

autobodyshop-api

Zero-dependency Python client for the Auto Body Shop Directory public API — find US auto body shops, collision centers, and paint shops by ZIP code, city, location, or shop profile.

Powered by AutoBodyShopNear.com, a directory of 80,000+ US auto body shops.

  • No API key required — the public API is free to use
  • Zero dependencies — standard library only (Python 3.8+)

Install

pip install autobodyshop-api

Usage

from autobodyshop_api import AutoBodyShopClient

client = AutoBodyShopClient()

# Find shops in a ZIP code
by_zip = client.shops_by_zip("77056")
print(by_zip["items"])

# Find shops in a city
by_city = client.shops_by_city("Houston", state="TX", limit=10)

# Find shops near a location
nearby = client.shops_nearby(29.7604, -95.3698, radius_miles=25)

# Fetch one shop's profile by slug
shop = client.shop_by_slug("champion-auto-parts-houston-tx-77056")
print(shop["name"], shop["profileUrl"])

Pagination

List endpoints accept limit (1–100, default 20) and offset, and return items, limit, offset, total, and hasMore:

offset, all_shops = 0, []
while True:
    page = client.shops_by_city("Houston", state="TX", limit=100, offset=offset)
    all_shops.extend(page["items"])
    if not page["hasMore"]:
        break
    offset += page["limit"]

Error handling

Failed requests raise AutoBodyShopApiError with status (HTTP status) and code (e.g. VALIDATION_ERROR, NOT_FOUND):

from autobodyshop_api import AutoBodyShopApiError

try:
    client.shop_by_slug("does-not-exist")
except AutoBodyShopApiError as err:
    print(err.code, err.status, err)

API reference

Method Endpoint Description
index() GET / API metadata and endpoint index
shops_by_zip(zip_code, ...) GET /shops/by-zip Shops in a 5-digit ZIP code
shops_by_city(city, state=None, ...) GET /shops/by-city Shops in a city (optional state)
shops_nearby(lat, lng, radius_miles=None, ...) GET /shops/nearby Shops near a lat/lng (radius 1–200 miles)
shop_by_slug(slug) GET /shops/{slug} Single shop profile

Full API documentation: autobodyshopnear.com/developers/body-shop-api OpenAPI spec: openapi.json

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autobodyshop_api-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autobodyshop_api-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file autobodyshop_api-0.1.0.tar.gz.

File metadata

  • Download URL: autobodyshop_api-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for autobodyshop_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f04460d11e2c4355e216ae567860b2fb72545d569339ac6acfbb9e5ec26fcf2
MD5 e013db97198cc09d5a40747db181a6aa
BLAKE2b-256 4d47f6766d40878176251f12178606ba17c38e7122ed1091d0587c989314a39f

See more details on using hashes here.

File details

Details for the file autobodyshop_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autobodyshop_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd61b5dd306d06a485f99f3bcec734f9afed0c00897a39ba05854ae1178e7f23
MD5 aeffa19151c288382e6f47911cf32005
BLAKE2b-256 2fc0dd06df82ebdbdd174beb48ab214d94fa1d8da2601bea7dbea4f8e0eb92db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page