API Integration
Learn how to integrate Hum into your application using our API
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.
Simple Integration Flow
The integration process is straightforward:
- Create a session with the service address
- Receive immediate provider results in the response
- Display available plans to your users
Below is a detailed walkthrough of the integration process:
-
Get Your API Key Contact your Hum representative to receive your API key. This key is required to authenticate your requests to the Hum API.
-
Create a Session and Get Immediate Results Start by creating a new session with the service address. The API returns available providers immediately:
Example response with immediate provider data:
-
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.)
-
Optional: Retrieve Session Details Later If you need to retrieve session information later, you can use the session token:
This endpoint returns session details and processing status, not the provider data:
Note: 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 format:
Common error scenarios include:
400 Bad Request
- Missing required fields (street1, city, state, zip)
- Invalid address format
- Invalid state code
- Invalid ZIP code format
401 Unauthorized
- Missing or invalid API key
- Expired API key
- Invalid authentication header format
404 Not Found
- Invalid session token
- Session not found
- Resource not found
406 Not Acceptable
- Invalid content type
- Missing content type header
410 Gone
- Session has been closed
- Session has expired
422 Unprocessable Entity
- Address validation failed
- Invalid parameter values
- Business rule violations
429 Too Many Requests
- Rate limit exceeded
- Too many concurrent sessions
500 Internal Server Error
- Server-side processing error
- Provider system unavailable
- Unexpected system error
For detailed error codes and handling, refer to the API Reference documentation.
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.
-
Error Handling: Implement robust error handling for common scenarios like invalid addresses, no service availability, or API rate limits. Use the error messages and status codes to provide clear feedback to your users.
-
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.
-
Data Caching: Consider caching provider data for frequently requested addresses to improve response times and reduce API calls.
-
Response Processing: Process the immediate provider data returned in the session creation response to display options to your users without delay.
Example Integration
Here’s a complete example showing how to integrate the Hum API:
Next Steps
- Review our API Reference for detailed endpoint documentation
- Try the Widget Integration for a no-code solution