{"id":21297503,"url":"https://github.com/fvdm/nodejs-politieapi","last_synced_at":"2025-09-10T13:38:24.403Z","repository":{"id":41858281,"uuid":"415691520","full_name":"fvdm/nodejs-politieapi","owner":"fvdm","description":"Access the Politie Open data API with Node.js (unofficial)","archived":false,"fork":false,"pushed_at":"2025-08-12T11:37:27.000Z","size":117,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-08-17T08:35:36.030Z","etag":null,"topics":["government","govnl","netherlands","open-data","police-data","politie"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/politie-api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fvdm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":"https://fvdm.com/donating"}},"created_at":"2021-10-10T20:20:07.000Z","updated_at":"2025-06-05T04:04:11.000Z","dependencies_parsed_at":"2024-04-02T17:36:28.515Z","dependency_job_id":"ed806da6-852b-4959-819f-73f3fbae364c","html_url":"https://github.com/fvdm/nodejs-politieapi","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fvdm/nodejs-politieapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-politieapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-politieapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-politieapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-politieapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fvdm","download_url":"https://codeload.github.com/fvdm/nodejs-politieapi/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fvdm%2Fnodejs-politieapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274470940,"owners_count":25291611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"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":["government","govnl","netherlands","open-data","police-data","politie"],"created_at":"2024-11-21T14:37:50.698Z","updated_at":"2025-09-10T13:38:24.282Z","avatar_url":"https://github.com/fvdm.png","language":"JavaScript","funding_links":["https://fvdm.com/donating"],"categories":[],"sub_categories":[],"readme":"# politie-api\n\nAccess the Politie Open data API with Node.js (unofficial)\n\n[![npm](https://img.shields.io/npm/v/politie-api.svg?maxAge=3600)](https://www.npmjs.com/package/politie-api?activeTab=versions)\n[![Build Status](https://github.com/fvdm/nodejs-politieapi/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/fvdm/nodejs-politieapi/actions/workflows/node.js.yml)\n[![Coverage Status](https://coveralls.io/repos/github/fvdm/nodejs-politieapi/badge.svg?branch=main)](https://coveralls.io/github/fvdm/nodejs-politieapi?branch=main)\n\n- [Node.js](https://nodejs.org/)\n- [Politie Open data API](https://www.politie.nl/algemeen/open-data.html)\n- [Release notes](https://github.com/fvdm/nodejs-politieapi/releases)\n\n\n## Usage\n\nIn the example below I first set up the Politie API basics.\nThen I send a geo position to the news endpoint.\nFinally some data is extracted and displayed on the console.\n\n\n```js\nconst PolitieAPI = require ('politie-api');\nconst politie = new PolitieAPI();\n\npolitie.nieuws ({\n  lat: 51.9823204,\n  lon: 5.9102271,\n  radius: 25,\n}))\n  .then (news =\u003e console.table (news, [\n    'publicatiedatum',\n    'titel',\n    'gebied',\n  ]))\n  .catch (console.log)\n;\n```\n\n\n## Installation\n\n`npm install politie-api`\n\n\n## Methods\n\nAll functions take one _object_ argument for the parameters.\nThey always return a Promise.\n\n\n### nieuws\n\nGet a list of all news messages, sorted by date\nand optionally sorted by geo position.\n\n```js\n// Get all the news\npolitie.nieuws()\n  .then (news =\u003e console.table (news, [\n    'publicatiedatum',\n    'titel',\n    'gebied',\n  ]))\n  .catch (console.log)\n;\n\n// Or close to a location\npolitie.nieuws ({\n  lat: 52.373089,\n  lon: 4.8910403,\n  radius: 5,\n})\n  .then (news =\u003e console.table (news, [\n    'publicatiedatum',\n    'titel',\n    'gebied',\n  ]))\n  .catch (console.log)\n;\n```\n\n\n### politiebureaus\n\nGet a list of all police stations\nor sorted by geo position.\n\n```js\n// Get all police stations\npolitie.politiebureaus()\n  .then (data =\u003e data.map (itm =\u003e {\n    return {\n      naam: itm.naam,\n      adres: itm.bezoekadres.postadres,\n      plaats: itm.bezoekadres.plaats,\n    };\n  }))\n  .then (console.table)\n  .catch (console.log)\n;\n\n// Or close to a location\npolitie.politiebureaus ({\n  lat: 52.373089,\n  lon: 4.8910403,\n  radius: 5,\n})\n  .then (data =\u003e data.map (itm =\u003e {\n    return {\n      naam: itm.naam,\n      adres: itm.bezoekadres.postadres,\n      plaats: itm.bezoekadres.plaats,\n    };\n  }))\n  .then (console.table)\n  .catch (console.log)\n;\n```\n\n\n### wijkagenten\n\nGet a list of local police agents.\nTwitter usernames have their non-word characters removed.\n\n```js\n// Local police Twitters\npolitie.wijkagenten ({\n  lat: 52.09314,\n  lon: 5.1147328,\n  radius: 5,\n})\n  .then (data =\u003e data.map (itm =\u003e {\n    return {\n      werkgebied: itm.werkgebied,\n      twitter: itm.twitter.accountnaam,\n    };\n  }))\n  .then (data =\u003e data.filter (itm =\u003e itm.twitter))\n  .then (console.table)\n  .catch (console.log)\n;\n```\n\n\n### Vermist\n\nSearch for missing persons.\nDoes not include unidentified persons.\n\n```js\n// List all\nconst data = await politie.vermist();\n\n// Search\nconst data = await politie.vermist ({\n  query: 'amsterdam',\n});\n```\n\n\n### urgentpolitiebericht\n\nGet the current urgent police message, if available.\n\n```js\npolitie.urgentpolitiebericht()\n  .then (console.log)\n  .catch (console.error)\n;\n```\n\n\n## Unlicense\n\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttps://unlicense.org/\u003e\n\n\n## Author\n\n[Franklin](https://fvdm.com)\n| [Buy me a coffee](https://fvdm.com/donating)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-politieapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvdm%2Fnodejs-politieapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvdm%2Fnodejs-politieapi/lists"}