Building with the Hum API
The Hum API provides a comprehensive set of endpoints for discovering available internet service providers, plans, and pricing at any address in the United States. With a single API call, you can retrieve all available internet options for any address and immediately display them to your users.The Hum API returns provider data immediately in the session creation response - no polling or additional requests required.
Integration Overview
Integrating with Hum is a simple three-step process:- Authenticate with your API key
- Create a session with the service address
- Display results from the immediate response
Quick Start Guide
1
Get Your API Key
Contact your Hum representative to receive your API key. This key authenticates all requests to the Hum API.
Never expose your API key in client-side code or commit it to version control. Always use environment variables or secure configuration management.
2
Create a Session and Get Immediate Results
Make a POST request to create a session with the service address. The API returns all available providers immediately in the response.
cURL
Success Response
Verify the response includes
request_status: "ok"
and provider data in the data
array.3
Display Available Internet Plans
The session creation response includes all available providers and their offerings. You can immediately display this information to your users:
- Provider name and contact details
- Available plans with speeds and pricing
- Direct links to provider signup pages
- Technology types (DSL, Cable, Fiber, etc.)
Process the provider data immediately from the session creation response - no additional API calls needed.
Optional: Retrieve Session Details Later
If you need to retrieve session information later, you can use the session token:cURL
Session Details Response
This endpoint is useful for checking session status and retrieving normalized address information, but the provider data is only returned in the initial session creation response.
Authentication
All API requests require authentication using your API key. Include it in the Authorization header:Error Handling
The API uses standard HTTP status codes and returns detailed error messages in the response body. All error responses follow this consistent format:Error Response Format
Always check the
request_status
field in the response. A value of "error"
indicates the request failed.Common Error Scenarios
400 Bad Request - Invalid Input
400 Bad Request - Invalid Input
Common causes:
- Missing required fields (street1, city, state, zip)
- Invalid address format
- Invalid state code
- Invalid ZIP code format
401 Unauthorized - Authentication Issues
401 Unauthorized - Authentication Issues
404 Not Found - Resource Missing
404 Not Found - Resource Missing
Common causes:
- Invalid session token
- Session not found
- Resource not found
422 Unprocessable Entity - Validation Failed
422 Unprocessable Entity - Validation Failed
Common causes:
- Address validation failed
- Invalid parameter values
- Business rule violations
429 Too Many Requests - Rate Limiting
429 Too Many Requests - Rate Limiting
Common causes:
- Rate limit exceeded
- Too many concurrent sessions
500 Internal Server Error - Server Issues
500 Internal Server Error - Server Issues
Common causes:
- Server-side processing error
- Provider system unavailable
- Unexpected system error
Best Practices
Address Validation
Provide accurate address data upfront to ensure the best results. Include complete address details including street number, street name, city, state, and ZIP code.
Use address validation services before sending requests to minimize errors and improve match rates.
Error Handling
Implement robust error handling for common scenarios like invalid addresses, no service availability, or API rate limits.
Always provide clear feedback to users when errors occur, using the error messages and status codes from the API response.
Session Management
Store and manage session tokens appropriately. Each session represents a unique address lookup, and tokens can be used to retrieve session details later.
Session tokens are valid for retrieving session metadata but don’t provide access to provider data after the initial response.
Performance Optimization
Consider caching provider data for frequently requested addresses to improve response times and reduce API calls.
Process the immediate provider data returned in the session creation response to display options without delay.