{"_id":"@br-geo-kit/provider-opencep","name":"@br-geo-kit/provider-opencep","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@br-geo-kit/provider-opencep","version":"1.0.0","description":"OpenCEP provider for br-geo-kit, self-hostable","license":"MIT","engines":{"node":">=20"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"dependencies":{"@br-geo-kit/core":"1.0.0"},"publishConfig":{"access":"public"},"keywords":["opencep","cep","endereco","brasil","br-geo-kit"],"repository":{"type":"git","url":"git+https://github.com/arielff3/br-geo-kit.git","directory":"providers/opencep"},"homepage":"https://github.com/arielff3/br-geo-kit/tree/main/providers/opencep#readme","bugs":{"url":"https://github.com/arielff3/br-geo-kit/issues"},"scripts":{"build":"tsup","clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""},"_id":"@br-geo-kit/provider-opencep@1.0.0","_integrity":"sha512-gH0MWPb1FXKOxxDCfFbvN1kA63YDy9xNMfG7lTb/ORKzFuM6ZYWN7amgDKMYw45La2ELmhrgJmUMk++uvX6hcA==","_resolved":"C:\\Users\\ariel\\AppData\\Local\\Temp\\fa6f3dfe384347bae86a0fd104b94360\\br-geo-kit-provider-opencep-1.0.0.tgz","_from":"file:br-geo-kit-provider-opencep-1.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-gH0MWPb1FXKOxxDCfFbvN1kA63YDy9xNMfG7lTb/ORKzFuM6ZYWN7amgDKMYw45La2ELmhrgJmUMk++uvX6hcA==","shasum":"f6202889a62452e53243bc0a8e930c30b8bbff97","tarball":"https://registry.npmjs.org/@br-geo-kit/provider-opencep/-/provider-opencep-1.0.0.tgz","fileCount":10,"unpackedSize":21590,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD8T4XiCrCN3DXEhfptR9cHoP61PWBtctW6w8+Jrh5jfwIgcgoOFtcd3p+am6Ui/Nveu8hapZGoBJeNVQmGsEZRmbg="}]},"_npmUser":{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"},"directories":{},"maintainers":[{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/provider-opencep_1.0.0_1789134625225_0.3406090348663293"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-11T13:50:25.006Z","1.0.0":"2026-09-11T13:50:25.368Z","modified":"2026-09-11T13:50:25.597Z"},"maintainers":[{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"}],"description":"OpenCEP provider for br-geo-kit, self-hostable","homepage":"https://github.com/arielff3/br-geo-kit/tree/main/providers/opencep#readme","keywords":["opencep","cep","endereco","brasil","br-geo-kit"],"repository":{"type":"git","url":"git+https://github.com/arielff3/br-geo-kit.git","directory":"providers/opencep"},"bugs":{"url":"https://github.com/arielff3/br-geo-kit/issues"},"license":"MIT","readme":"# @br-geo-kit/provider-opencep\n\n> OpenCEP for br-geo-kit. Open, self-hostable, ViaCEP-shaped.\n\n```bash\npnpm add @br-geo-kit/cep @br-geo-kit/provider-opencep\n```\n\n```ts\nimport { createCep } from '@br-geo-kit/cep'\nimport { opencep } from '@br-geo-kit/provider-opencep'\n\nconst cep = createCep({ providers: [opencep()] })\n```\n\n---\n\n## What it returns\n\n| | |\n| --- | --- |\n| Street, neighbourhood, city, state | yes |\n| Correios side-of-street note | yes |\n| IBGE code | yes |\n| Area code | no — the kit fills it from the offline dataset |\n| Coordinates | no |\n| Reverse lookup | no |\n\nUnlike ViaCEP it omits absent fields rather than sending `\"\"`, and it\nanswers a missing CEP with an honest 404.\n\n---\n\n## Run your own\n\nThis is the reason to reach for it. The base is open and self-hostable,\nso a chain can lead with infrastructure you control:\n\n```ts\ncreateCep({\n  providers: [\n    opencep({ baseUrl: 'http://cep.internal:3000/v1' }),\n    brasilapi(),\n  ],\n})\n```\n\nYour instance absorbs the traffic, a public service covers the gaps.\n\n---\n\n## It shares a base with BrasilAPI\n\nOpenCEP is the `open-cep` base that BrasilAPI falls through to. The two\nare therefore **not independent sources**: where they disagree with\nViaCEP they tend to disagree together, and CEP `99999-999` — which does\nnot exist but has a record in Sarandi/PR — is the standing example.\n\nA `consensus` chain of `[brasilapi(), opencep()]` is weaker than it\nlooks. Two of those agreeing is one opinion. Put ViaCEP in the chain if\nyou want a second one.\n\n---\n\n## Options\n\n```ts\nopencep({ baseUrl: 'https://opencep.com/v1' })\n```\n\n## Rate limits\n\nThe public instance publishes no documented rate limit and no SLA. Cache,\nor host your own. See\n[caching](https://github.com/arielff3/br-geo-kit/blob/main/docs/caching.md).\n\n## Licence\n\nMIT.\n\nThis package is an API client and redistributes no data. It is not\naffiliated with, endorsed by, or sponsored by OpenCEP; the name\nidentifies the service it connects to. OpenCEP has its own terms of\nuse, and calling it is your relationship with them.\n","readmeFilename":"README.md","_rev":"1-20e30441ba9a174557f65dd1564dabd4"}