{"id":18755000,"url":"https://github.com/nottimtam/ruca.js","last_synced_at":"2026-04-11T04:31:06.158Z","repository":{"id":90690968,"uuid":"591555719","full_name":"NotTimTam/ruca.js","owner":"NotTimTam","description":"An open-source API deployment for the USDA's Rural-Urban Commuting Area Codes.","archived":false,"fork":false,"pushed_at":"2023-01-21T18:35:32.000Z","size":5063,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T01:32:39.333Z","etag":null,"topics":["api","express","nodejs","npm","rest-api","ruca"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotTimTam.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}},"created_at":"2023-01-21T04:24:58.000Z","updated_at":"2023-01-21T18:16:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"20fa86d9-341f-4bd7-a41d-4576d33eeae4","html_url":"https://github.com/NotTimTam/ruca.js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotTimTam%2Fruca.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotTimTam%2Fruca.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotTimTam%2Fruca.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotTimTam%2Fruca.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotTimTam","download_url":"https://codeload.github.com/NotTimTam/ruca.js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239644127,"owners_count":19673580,"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","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":["api","express","nodejs","npm","rest-api","ruca"],"created_at":"2024-11-07T17:31:06.340Z","updated_at":"2025-10-09T22:05:51.959Z","avatar_url":"https://github.com/NotTimTam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruca.js API v1\n\n![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white)\n![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge\u0026logo=express\u0026logoColor=%2361DAFB)\n\nAn open-source, **self-deployable** express API for querying the USDA's Rural-Urban Commuting Area Codes.\n\nThis lightweight API is meant to be customized and deployed on your server infrastructure for your needs.\n\nFor more information on RUCA codes, visit [this site](https://www.ers.usda.gov/data-products/rural-urban-commuting-area-codes/documentation/).\n\n## Setup\n\nNecessary `.env` parameters:\n\n-   `PORT`\n    -   This is the port the API will be hosted on. If one is not provided, it defaults to `3000`.\n-   `VERSION_TARGET`\n    -   The version of the API you would like to use. The only available version is `v1`, which is also the default.\n-   `REQUEST_LIMIT`\n    -   The number of requests per 1 hour that an API client can make. (default `1000`)\n\nExample:\n\n```\nPORT=8000\nVERSION_TARGET=v1\nREQUEST_LIMIT=1000\n```\n\nMake sure to run `npm i` to install all the necessary dependencies beforehand.\n\n## Running the API\n\nThe API can be started by using `NODE.js` to run the `api.js` file in the root of the directory. There are also two `NPM Scripts`, `start` and `dev` which will do this. `dev` runs the API through the NPM package called [Nodemon](https://www.npmjs.com/package/nodemon).\n\n## Documentation\n\n### GET `RUCA OBJECTS`\n\n-   Method: **`GET`**\n-   Route: `\u003chost\u003e/api/v1/`\n-   Query Parameters:\n\n    -   All query parameters are **optional**, providing none will **return a list of all the data**.\n    -   `FIPSCode`\n        -   The [FIPS code](https://en.wikipedia.org/wiki/FIPS_county_code) to filter under.\n    -   `state`\n        -   The 2-letter state abbreviation to filter by. (ie., `AZ`) _(case-insensitive)_\n    -   `county`\n        -   The name of the county to filter by. _(case-insensitive)_\n    -   `tractFIPSCode`\n        -   The [state-county-tract FIPS code](http://www.ffiec.gov/Geocode/) to filter by.\n    -   `primaryRUCACode`\n        -   The primary RUCA code to filter by.\n    -   `secondaryRUCACode`\n        -   The secondary RUCA code to filter by.\n    -   `population`\n        -   The exact population number to filter by.\n    -   `minPopulation`\n        -   A minimum value on the population, showing only those that are greater than, or equal to the provided number.\n    -   `maxPopulation`\n        -   A cap on the maximum population, showing only those that are less than, or equal to the provided number.\n    -   `landArea`\n        -   The exact land area (**in square miles**) to filter by.\n    -   `minLandArea`\n        -   A cap on the maximum land area (**sq. mi**), showing only those that are greater than, or equal to the provided number.\n    -   `maxLandArea`\n        -   A minimum value on the land area (**sq. mi**), showing only those that are less than, or equal to the provided number.\n    -   `popDensity`\n        -   The exact population density (**per sq. mi**) to filter by.\n    -   `minPopDensity`\n        -   A cap on the maximum population density (**per sq. mi**), showing only those that are greater than, or equal to the provided number.\n    -   `maxPopDensity`\n        -   A minimum value on the population density (**per sq. mi**), showing only those that are less than, or equal to the provided number.\n\nExample:\n\n```javascript\naxios.get(\n\t\"http://localhost:3000/api/v1/?state=AZ\u0026PrimaryRUCACode=2\u0026minPopulation=1500\"\n);\n```\n\nLearn more about Axios, an excellent HTTP client request tool, [here](https://www.npmjs.com/package/axios).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnottimtam%2Fruca.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnottimtam%2Fruca.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnottimtam%2Fruca.js/lists"}