apiverve_costliving 1.2.7
apiverve_costliving: ^1.2.7 copied to clipboard
Cost of Living is a cost of living API that returns price-level indices for US states and metropolitan areas, with the US average at 100. Compare the relative cost of living between two states or citi [...]
Cost of Living API - Dart/Flutter Client #
Cost of Living is a cost of living API that returns price-level indices for US states and metropolitan areas, with the US average at 100. Compare the relative cost of living between two states or cities and calculate salary equivalents for relocation decisions on paid plans.
This is the Dart/Flutter client for the Cost of Living API.
Installation #
Add this to your pubspec.yaml:
dependencies:
apiverve_costliving: ^1.2.7
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage #
import 'package:apiverve_costliving/apiverve_costliving.dart';
void main() async {
final client = CostlivingClient('YOUR_API_KEY');
try {
final response = await client.execute({
'location': 'California'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response #
{
"status": "ok",
"error": null,
"data": {
"searchedLocation": "California",
"region": "west-large",
"regionName": "West Large Metros (LA, SF, Seattle, Phoenix, Denver area)",
"costIndex": 107,
"description": "7% above average",
"cpi": 356.993,
"usAverageCPI": 334.98,
"period": "2026-08",
"note": "Cost index is relative to US average (100). Values above 100 indicate higher than average cost of living."
}
}
API Reference #
- API Home: Cost of Living API
- Documentation: docs.apiverve.com/ref/costliving
Authentication #
All requests require an API key. Get yours at apiverve.com.
License #
MIT License - see LICENSE for details.
Built with Dart for APIVerve