{"id":25506497,"url":"https://github.com/blackducksoftware/ohloh_api","last_synced_at":"2026-04-07T19:31:48.330Z","repository":{"id":9649694,"uuid":"11585329","full_name":"blackducksoftware/ohloh_api","owner":"blackducksoftware","description":"Ohloh API examples","archived":false,"fork":false,"pushed_at":"2025-03-04T09:05:07.000Z","size":208,"stargazers_count":94,"open_issues_count":2,"forks_count":29,"subscribers_count":32,"default_branch":"main","last_synced_at":"2026-01-24T15:45:16.856Z","etag":null,"topics":["api","examples","oauth","ohloh","ohloh-api","xml"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackducksoftware.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,"zenodo":null}},"created_at":"2013-07-22T15:47:22.000Z","updated_at":"2025-11-14T10:18:01.000Z","dependencies_parsed_at":"2025-03-04T10:20:37.925Z","dependency_job_id":"8cff5862-284f-485b-960c-6fa714b9c2a9","html_url":"https://github.com/blackducksoftware/ohloh_api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blackducksoftware/ohloh_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohloh_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohloh_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohloh_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohloh_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackducksoftware","download_url":"https://codeload.github.com/blackducksoftware/ohloh_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fohloh_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31526665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","examples","oauth","ohloh","ohloh-api","xml"],"created_at":"2025-02-19T06:57:59.956Z","updated_at":"2026-04-07T19:31:48.311Z","avatar_url":"https://github.com/blackducksoftware.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Hub API Documentation\n\n## Welcome\n\nThe Open Hub API is a free, REST-based programming interface to the Black Duck Open Hub open source directory. You can use the Open Hub API to create your own applications and web services based on Open Hub data.\n\n## Getting Help\n\nThis page contains important summary information to help you get started. In-depth online documentation is available, linked by the table of contents below.\n\nSome sample code can be found on the [Examples](examples/) page. For questions not covered in the documenation, the [Open Hub Technical Issues Help](https://community.blackduck.com/s/topic/0TO2H000000gHS1WAM/black-duck-open-hub-help) can provide additional help.\n\nSend bug reports to info@openhub.net.\n\n## Table of Contents\n+ [Lookup By Email](email_lookup.md)\n+ [Using OAuth with the Open Hub API](examples/oauth2)\n+ [Examples](examples/)\n+ Open Hub API Reference\n    - [Account](reference/account.md)\n    - [Account News](reference/news.md)\n    - [ActivityFact](reference/activity_fact.md)\n    - [AffiliatedCommitters](reference/affiliated_committers.md)\n    - [Analysis](reference/analysis.md)\n    - [ContributorFact](reference/contributor_fact.md)\n    - [ContributorLanguageFact](reference/contributor_language_fact.md)\n    - [Enlistment](reference/enlistment.md)\n    - [Factoid](reference/factoid.md)\n    - [Kudo](reference/kudo.md)\n    - [KudoScore](reference/kudo_score.md)\n    - [Language](reference/language.md)\n    - [Message](reference/message.md)\n    - [Organization](reference/organization.md)\n    - [Organization-collection](reference/organization-collection.md)\n    - [OutsideCommitters](reference/outside_committers.md)\n    - [OutsideProjects](reference/outside_projects.md)\n    - [PortfolioProjects](reference/portfolio_projects.md)\n    - [Position](reference/position.md)\n    - [Project](reference/project.md)\n    - [Repository](reference/repository.md)\n    - [SizeFact](reference/size_fact.md)\n    - [Stack](reference/stack.md)\n    - [StackEntry](reference/stack_entry.md)\n+ [API Use Agreement](http://blog.openhub.net/terms-2/)\n+ [Apply for an API Key](https://www.openhub.net/accounts/me/api_keys/new)\n+ [API Key Status](https://www.openhub.net/accounts/me/api_keys)\n\n## Terms of Use\n\nThe Open Hub API has some restrictions. Please review the complete [Terms of Use](https://community.blackduck.com/s/article/Black-Duck-Open-Hub-API-Use-Agreement) before you begin.\n\nWe ask that you cite Open Hub in publications that use our data. Please include a link to https://www.openhub.net on your web pages.\n\nOur terms require you to provide a link back to our site. While you’re free to use any method you’d prefer, we’ve provided this small button for your convenience: ![Open Hub Button](https://www.openhub.net/images/badges/mini.gif)\n\nWe recommend linking to our home page. The following html will link the small badge to our home page:\n\n```html\n\u003ca href =\"https://www.openhub.net\"\u003e\u003cimg src=\"https://www.openhub.net/images/badges/mini.gif\" width=\"80\" height=\"15\" /\u003e\u003c/a\u003e\n```\n\n## API Key\n\nBefore you can access the Open Hub API, you must [register your application](https://www.openhub.net/accounts/me/api_keys/new) and obtain an API key. Bandwidth will initially be limited to 1,000 requests per API key per day.\n\nAn API Key should be unique to each application that accesses the Open Hub API. You can register up to five applications.\n\nIt is important not to share API keys. In order to access or modify account data, your application must be granted permission by an individual Open Hub account holder. This permission is granted on a per-key basis.\n\nYou can [register a new application](https://www.openhub.net/accounts/me/api_keys/new) or [view the status](https://www.openhub.net/accounts/me/api_keys) of your existing applications online.\n\nIf you have special requirements for additional keys, or if you are interested in building a large-scale application, please contact us at info@openhub.net.\n\n## OAuth Impersonation\n\nThe standard Open Hub API allows read-only access to Open Hub data.\n\nUsing OAuth, you can impersonate an Open Hub account while accessing the Open Hub API. This enables you to write to the Open Hub database, and also to access or modify private account information. You must first be granted permission to do this by an Open Hub account holder.\n\nYou can read more at [Using OAuth with the Open Hub API](examples/oauth2#using-oauth-20).\n\n## Forming a Request\n\nThe Open Hub API returns XML-formatted data in response to HTTP GET requests.\n\nThe design concept is that for each web page on Open Hub, there may be an equivalent XML-formatted version of the page. Most pages on the Black Duck Open Hub have an XML representation.\n\nYou must do three things to receive an XML-formatted response:\n\n1. Append a `.xml` extension to the basic URL. For example, instead of `https://www.openhub.net/p/1`, which returns an HTML page, you would request `https://www.openhub.net/p/1.xml`.\n2. Provide your API Key as an HTTP parameter. Your request will be forbidden without a valid `api_key`.\n\nFor example, to view the project with ID=1 as XML, using an example API key, the complete URL would be:\n\n```\nhttps://www.openhub.net/p/1.xml?api_key=01234567890123456789\n```\n\nFor the sake of brevity, the `api_key` parameter will be omitted from the examples in this documentation. Remember to always include it in your actual queries.\n\nNote that the Open Hub API previously required the use of a version parameter `v`. This is no longer required, and will be ignored.\n\n## XML Response Format\n\nA sample response to a project request might be:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cresponse\u003e\n  \u003cstatus\u003esuccess\u003c/status\u003e\n  \u003cresult\u003e\n    \u003cproject\u003e\n      \u003cid\u003e1\u003c/id\u003e\n      \u003cname\u003eSubversion\u003c/name\u003e\n      \u003ccreated_at\u003e2006-10-10T15:51:31Z\u003c/created_at\u003e\n      \u003cupdated_at\u003e2007-08-22T17:31:17Z\u003c/updated_at\u003e\n      \u003cdescription\u003eSubversion has rapidly become the version control standard....\u003c/description\u003e\n      \u003chomepage_url\u003ehttp://subversion.tigris.org/\u003c/homepage_url\u003e\n      \u003cdownload_url\u003ehttp://subversion.tigris.org/project_packages.html\u003c/download_url\u003e\n      \u003circ_url\u003e\u003c/irc_url\u003e\n      \u003cstack_count\u003e1096\u003c/stack_count\u003e\n      \u003canalysis_id\u003e51898\u003c/analysis_id\u003e\n      \u003canalysis\u003e\n        \u003cid\u003e51898\u003c/id\u003e\n        \u003cproject_id\u003e1\u003c/project_id\u003e\n        \u003cupdated_at\u003e2007-07-12T12:21:11Z\u003c/updated_at\u003e\n        \u003clogged_at\u003e2007-07-12T12:18:54Z\u003c/logged_at\u003e\n        \u003cmin_month\u003e2001-08-01T00:00:00Z\u003c/min_month\u003e\n        \u003cmax_month\u003e2007-07-01T00:00:00Z\u003c/max_month\u003e\n        \u003ctwelve_month_contributor_count\u003e55\u003c/twelve_month_contributor_count\u003e\n        \u003ctotal_code_lines\u003e319283\u003c/total_code_lines\u003e\n        \u003cmain_language_id\u003e7\u003c/main_language_id\u003e\n        \u003cmain_language_name\u003eC/C++\u003c/main_language_name\u003e\n      \u003c/analysis\u003e\n    \u003c/project\u003e\n  \u003c/result\u003e\n\u003c/response\u003e\n```\n\nAll XML returned from the Open Hub API will be contained within a root element called `\u003cresponse\u003e`, which will always contain a `\u003cstatus\u003e` element.\n\nThe `\u003cstatus\u003e` element will contain either `success` or `failed`.\n\nWhen the `\u003cstatus\u003e` value is `success`, the HTTP response code will be `200`, and the `\u003cresult\u003e` element contains the data you requested.\n\nIf the `status` is `failed`, then the HTTP response code will be set appropriately (usually Bad Request or Not Found), and an `\u003cerror\u003e` element will be present containing human-readable help text. For example:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cresponse\u003e\n  \u003cstatus\u003efailed\u003c/status\u003e\n  \u003cerror\u003eA valid api_key is required to access this URL.\u003c/error\u003e\n\u003c/response\u003e\n```\n\nDetails about this project response can be found in the Open Hub API Reference [project page](reference/project.md).\n\n## Collection Requests\n\n### Collection Request Parameters\n\n+ __query__ - Results will be filtered by the provided string. Only items that contain the query string in their names or descriptions will be returned. Filtering is case insenstive. Only alphanumeric characters are accepted. All non-alphanumeric characters will be replaced by spaces. Filtering is not available on all API methods, and the searched text depends on the type of object requested. Check the reference documentation for specifics.\n+ __sort__ - Controls the sort order of the returned results. Typical supported values are name, created_at, and updated_at. The specific sort options available depend on the type of object requested, so check to the reference documentation for specifics. _API does not support reverse sorting_.\n+ __page__ - In most cases, the Open Hub API returns at most 25 items per request. Pass this parameter to request subsequent items beyond the first page. This parameter is _one-based_, with a default value of 1. If you pass a value outside the range of available pages, you will receive the first page.\n\nFor example, to get the second page of projects containing “java” or “Java” in their titles, descriptions, or tags, you would request:\n\n```\nGET https://www.openhub.net/p.xml?query=java\u0026page=2\n```\n\n### Collection Response XML Format\n\nSome results will contain a collection of values. When this happens, the `\u003cresponse\u003e` element will contain some additional elements:\n\n+ __items_returned__ - The number of items returned in this response.\n+ __items_available__ - The total number of database items matching the query, including those already returned.\n+ __first_item_position__ - The zero-based index of the first item returned\n\nFor example, the response to `https://www.openhub.net/p.xml` might begin:\n\n```xml\n\u003cresponse\u003e\n  \u003cstatus\u003esuccess\u003c/status\u003e\n  \u003citems_returned\u003e25\u003c/items_returned\u003e\n  \u003citems_available\u003e7056\u003c/items_available\u003e\n  \u003cfirst_item_position\u003e0\u003c/first_item_position\u003e\n  \u003cresult\u003e\n    \u003cproject\u003e\n      \u003cid\u003e9\u003c/id\u003e\n      \u003cname\u003eMozilla Firefox\u003c/name\u003e\n      ....\n```\n\n- - -\nCopyright 2025 Black Duck Software, Inc. Unless otherwise marked, this work is licensed under a [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Fohloh_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackducksoftware%2Fohloh_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Fohloh_api/lists"}