{"id":16962369,"url":"https://github.com/aeharding/tfr-scraper","last_synced_at":"2026-04-29T23:31:27.349Z","repository":{"id":76943124,"uuid":"521487102","full_name":"aeharding/tfr-scraper","owner":"aeharding","description":"Scrape TFRs and store them in MongoDB (with a geospatial index)","archived":false,"fork":false,"pushed_at":"2026-03-13T23:35:39.000Z","size":151,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-14T11:03:13.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aeharding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-05T03:13:51.000Z","updated_at":"2026-03-13T23:35:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d6161a8-f27c-44d4-9f7f-38ca6a3c8f59","html_url":"https://github.com/aeharding/tfr-scraper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aeharding/tfr-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeharding%2Ftfr-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeharding%2Ftfr-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeharding%2Ftfr-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeharding%2Ftfr-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeharding","download_url":"https://codeload.github.com/aeharding/tfr-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeharding%2Ftfr-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-13T23:06:20.762Z","updated_at":"2026-04-29T23:31:27.344Z","avatar_url":"https://github.com/aeharding.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfr-scraper\n\nAWS Lambda service that scrapes FAA Temporary Flight Restrictions (TFRs) and stores them in MongoDB for geo-querying.\n\n## Architecture\n\nTwo Lambda functions deployed via Serverless Framework:\n\n- **scraper** -- Runs every 15 minutes. Fetches the current TFR list and geometry from the [FAA WFS GeoJSON endpoint](https://tfr.faa.gov/geoserver/TFR/ows?service=WFS\u0026version=1.1.0\u0026request=GetFeature\u0026typeName=TFR:V_TFR_LOC\u0026maxFeatures=300\u0026outputFormat=application/json), then retrieves detailed NOTAM data from the [FAA NMS-API](https://api-nms.aim.faa.gov/nmsapi/v1). Results are stored in MongoDB with a 2dsphere index.\n- **query** -- `GET /api/tfr?lat=...\u0026lon=...\u0026radialDistance=...` returns TFRs within the given radius (meters).\n\n## Prerequisites\n\n- Node.js 24+\n- [Serverless Framework v3](https://www.serverless.com/framework/docs/getting-started)\n- AWS CLI configured with credentials (`aws configure`)\n- A MongoDB Atlas cluster\n- FAA NMS-API credentials (email [7-AWA-NAIMES@faa.gov](mailto:7-AWA-NAIMES@faa.gov) to request access)\n\n## Setup\n\n### 1. Install dependencies\n\n```bash\nyarn install\n```\n\n### 2. Create config file\n\nCreate a `config.prod.json` in the project root (gitignored):\n\n```json\n{\n  \"MONGODB_USER\": \"your-mongodb-user\",\n  \"MONGODB_PASSWORD\": \"your-mongodb-password\",\n  \"MONGODB_HOST\": \"your-cluster.mongodb.net\",\n  \"NMS_API_HOST\": \"https://api-nms.aim.faa.gov\",\n  \"NMS_API_KEY\": \"your-nms-api-key\",\n  \"NMS_API_SECRET\": \"your-nms-api-secret\"\n}\n```\n\nFor other stages, create `config.\u003cstage\u003e.json` (e.g. `config.dev.json`).\n\n## Deployment\n\n```bash\nnpx serverless deploy --stage prod\n```\n\nTo deploy to a different stage:\n\n```bash\nnpx serverless deploy --stage dev\n```\n\n## Invoking manually\n\nTrigger the scraper on-demand:\n\n```bash\nnpx serverless invoke --function scraper --stage prod\n```\n\nTest the query endpoint:\n\n```bash\ncurl \"https://\u003capi-id\u003e.execute-api.us-east-1.amazonaws.com/api/tfr?lat=38.85\u0026lon=-77.04\u0026radialDistance=50000\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeharding%2Ftfr-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeharding%2Ftfr-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeharding%2Ftfr-scraper/lists"}