{"id":40003711,"url":"https://github.com/brakmic/address-api","last_synced_at":"2026-01-19T02:03:32.762Z","repository":{"id":303826147,"uuid":"1016836033","full_name":"brakmic/address-api","owner":"brakmic","description":"A RESTful API for parsing and normalizing addresses using libpostal, with Docker and Kubernetes support.","archived":false,"fork":false,"pushed_at":"2025-07-09T15:45:14.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-11T05:57:37.505Z","etag":null,"topics":["libpostal","nestjs","nodejs","rest-api","restful-api","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brakmic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-09T15:43:56.000Z","updated_at":"2025-07-09T15:45:58.000Z","dependencies_parsed_at":"2025-07-09T17:00:46.530Z","dependency_job_id":null,"html_url":"https://github.com/brakmic/address-api","commit_stats":null,"previous_names":["brakmic/address-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brakmic/address-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Faddress-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Faddress-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Faddress-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Faddress-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brakmic","download_url":"https://codeload.github.com/brakmic/address-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brakmic%2Faddress-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28557784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libpostal","nestjs","nodejs","rest-api","restful-api","typescript"],"created_at":"2026-01-19T02:03:08.702Z","updated_at":"2026-01-19T02:03:32.751Z","avatar_url":"https://github.com/brakmic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Address API\n\nA RESTful API for parsing and normalizing addresses using [libpostal](https://github.com/openvenues/libpostal), built with [NestJS](https://nestjs.com/).  \nThis service exposes endpoints for address parsing and normalization, making it easy to integrate high-quality address handling into your applications.\n\n---\n\n## Features\n\n- **/address/parse**: Parse an address string into structured components (e.g., house number, road, city).\n- **/address/normalize**: Normalize an address string for consistent storage or comparison.\n- **OpenAPI/Swagger UI**: Interactive API documentation at `/api`.\n- **Dockerized**: Ready-to-use Docker image with libpostal built-in.\n- **Kubernetes-ready**: Deploy with plain manifests or Helm.\n\n---\n\n## API Endpoints\n\n### `POST /address/parse`\n\n**Request:**\n```json\n{\n  \"address\": \"123 Main St, Springfield\"\n}\n```\n\n**Response:**\n```json\n{\n  \"components\": [\n    { \"label\": \"house_number\", \"value\": \"123\" },\n    { \"label\": \"road\", \"value\": \"Main St\" },\n    { \"label\": \"city\", \"value\": \"Springfield\" }\n  ]\n}\n```\n\n---\n\n### `POST /address/normalize`\n\n**Request:**\n```json\n{\n  \"address\": \"123 Main St, Springfield\"\n}\n```\n\n**Response:**\n```json\n{\n  \"normalized\": \"123 main st springfield\"\n}\n```\n\n---\n\n## OpenAPI \u0026 Swagger UI\n\n- The OpenAPI specification is available at `/api`.\n- You can interact with the API and see example requests/responses in your browser.\n\n---\n\n## Running with Docker\n\nThe image is published at [Docker Hub](https://hub.docker.com/r/brakmic/address-api):\n\n```sh\ndocker pull brakmic/address-api:latest\n```\n\n### **Important: .env file is required**\n\nYou **must** provide a `.env` file for the API to start.  \nThe easiest way is to copy the provided example:\n\n```sh\ncp .env.example .env\n```\n\nYou can then edit `.env` to adjust settings (e.g., change the port or API base URL).\n\nTo run the API (mounting your `.env` file):\n\n```sh\ndocker run --rm -it -p 3000:3000 -v \"$PWD/.env:/usr/src/app/.env\" brakmic/address-api:latest\n```\n\n- The API will be available at [http://localhost:3000](http://localhost:3000)\n- Swagger UI: [http://localhost:3000/api](http://localhost:3000/api)\n\n---\n\n## Running with Kubernetes\n\n### Using kubectl\n\n1. Apply the manifests:\n   ```sh\n   kubectl apply -f k8s/yamls/deployment.yaml\n   kubectl apply -f k8s/yamls/service.yaml\n   kubectl apply -f k8s/yamls/ingress.yaml\n   ```\n\n2. Add `address-api.local` to your `/etc/hosts` pointing to your ingress controller's external IP.\n\n3. Open the API:\n   ```sh\n   $BROWSER http://address-api.local/\n   ```\n\n4. To remove:\n   ```sh\n   kubectl delete -f k8s/yamls/ingress.yaml\n   kubectl delete -f k8s/yamls/service.yaml\n   kubectl delete -f k8s/yamls/deployment.yaml\n   ```\n\n---\n\n### Using Helm\n\n1. Go to the Helm chart directory:\n   ```sh\n   cd k8s/address-api-chart\n   ```\n\n2. Install the chart:\n   ```sh\n   helm install address-api .\n   ```\n\n3. Add `address-api.local` to your `/etc/hosts` as above.\n\n4. Open the API:\n   ```sh\n   $BROWSER http://address-api.local/\n   ```\n\n5. To uninstall:\n   ```sh\n   helm uninstall address-api\n   ```\n\n---\n\n## Example Clients\n\nExample clients for this API are available in the following languages:\n\n- **Python**\n- **C**\n- **C++**\n- **C#**\n\nSee [docs/external-clients.md](docs/external-clients.md) for details on how to build and run these clients, including required environment setup.\n\n---\n\n## Environment Variables\n\nYou **must** provide a `.env` file (see `.env.example`).  \nCopy the example and adjust as needed:\n\n```sh\ncp .env.example .env\n```\n\nExample contents:\n\n```\nNODE_ENV=production\nPORT=3000\nLIBPOSTAL_DATA_DIR=/usr/local/share/libpostal\nAPI_BASE_URL=http://localhost:3000\n```\n\nYou can change these values to fit your deployment (e.g., set a different port or base URL).\n\n---\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Faddress-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrakmic%2Faddress-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrakmic%2Faddress-api/lists"}