{"id":28122745,"url":"https://github.com/ericoc/alnsearch","last_synced_at":"2025-05-14T08:14:42.523Z","repository":{"id":291352390,"uuid":"977360894","full_name":"ericoc/alnsearch","owner":"ericoc","description":"HTTPS ALN REST API JSON Search Client","archived":false,"fork":false,"pushed_at":"2025-05-04T03:30:47.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T04:25:31.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/ericoc.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}},"created_at":"2025-05-04T02:53:40.000Z","updated_at":"2025-05-04T03:30:50.000Z","dependencies_parsed_at":"2025-05-04T04:35:44.362Z","dependency_job_id":null,"html_url":"https://github.com/ericoc/alnsearch","commit_stats":null,"previous_names":["ericoc/alnsearch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Falnsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Falnsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Falnsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Falnsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericoc","download_url":"https://codeload.github.com/ericoc/alnsearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101541,"owners_count":22014909,"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":[],"created_at":"2025-05-14T08:14:41.916Z","updated_at":"2025-05-14T08:14:42.508Z","avatar_url":"https://github.com/ericoc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTPS ALN/CFDA REST API JSON Search Client\n\n## Background\n\nThis is a quick script to query Assistance Listing Numbers (ALN), formerly\nknown as the Catalog of Federal Domestic Assistance (CFDA) numbers, using the\nfollowing HTTPS JSON REST API client.\n\nhttps://grants.gov/api\n\nAssistance Listing Numbers (ALN), formerly known as the\nCatalog of Federal Domestic Assistance (CFDA) Number, are assigned to each\nfederal assistance program (such as grants).\nThey are used for government reporting, auditing, and tracking purposes.\n\n## Examples\n\nAssistance Listing Numbers (ALNs, _aka_ CFDAs) are five (`5`) digit numbers,\nwhich are separated by a period (`.`), such as the following:\n\n- `81.049`\n- `47.049`\n\n### Help\n```py\n$ python3 __init__.py -h\nusage: HTTPS JSON REST API search client for Assistance Listing Numbers (ALNs). [-h] aln\n\npositional arguments:\naln         ALN (aka. CFDA #)\n\noptions:\n-h, --help  show this help message and exit\n```\n\n### Multiple Agencies\n#### 81.049\n\n##### Python\n```py\n$ python3 __init__.py 81.049\n2025-05-03 23:23:41 EDT (-0400) [INFO] (34141): 2 agencies found. (81.049)\n2025-05-03 23:23:41 EDT (-0400) [INFO] (34141):         1) Department of Energy - Office of Science\n2025-05-03 23:23:41 EDT (-0400) [INFO] (34141):         2) U.S. National Science Foundation\n```\n\n##### cURL\n```shell\n$ curl -s 'https://api.grants.gov/v1/api/search2' -H 'Content-Type: application/json' -d '{\"cfda\": \"81.049\"}' | jq '.data.agencies.[].label'\n\"Department of Energy - Office of Science\"\n\"U.S. National Science Foundation\"\n```\n\n\n### One Agency\n#### 47.049\n\n##### Python\n```py\n$ python3 __init__.py 47.049\n2025-05-03 23:23:57 EDT (-0400) [INFO] (34181): 1 agencies found. (47.049)\n2025-05-03 23:23:57 EDT (-0400) [INFO] (34181):         1) U.S. National Science Foundation\n```\n\n##### cURL\n```shell\n$ curl -s 'https://api.grants.gov/v1/api/search2' -H 'Content-Type: application/json' -d '{\"cfda\": \"47.049\"}' | jq '.data.agencies.[].label'\n\"U.S. National Science Foundation\"\n```\n\n---\n\n### Failures\n\n#### 41.049\n##### No Agencies\n```py\n$ python3 __init__.py 41.049\nTraceback (most recent call last):\nFile \"/Users/eric/code/alnsearch/__init__.py\", line 49, in \u003cmodule\u003e\nassert agency_count \u003e 0, (\n    ^^^^^^^^^^^^^^^^\n    AssertionError: No agencies found for Assistance Listing Number! (41.049)\n```\n\n#### 41.0499\n##### Invalid ALN Format\n```py\n$ python3 __init__.py 41.0499\nTraceback (most recent call last):\nFile \"/Users/eric/code/alnsearch/__init__.py\", line 25, in \u003cmodule\u003e\nassert fullmatch(pattern=r\"^[0-9]{2}\\.[0-9]{3}$\", string=args.aln), (\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: Invalid Assistance Listing Number (ALN, aka. CFDA #) format! (41.0499)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericoc%2Falnsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericoc%2Falnsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericoc%2Falnsearch/lists"}