{"id":15606336,"url":"https://github.com/encoreshao/crunchbase-ruby-library","last_synced_at":"2025-04-27T12:09:34.276Z","repository":{"id":32700105,"uuid":"36289541","full_name":"encoreshao/crunchbase-ruby-library","owner":"encoreshao","description":"Ruby Library for Crunchbase API version 3.1","archived":false,"fork":false,"pushed_at":"2020-06-06T14:46:34.000Z","size":444,"stargazers_count":8,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-27T12:09:22.945Z","etag":null,"topics":["crunchbase-api","ruby-library"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/encoreshao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-26T10:44:31.000Z","updated_at":"2021-10-16T23:05:16.000Z","dependencies_parsed_at":"2022-09-05T23:01:25.894Z","dependency_job_id":null,"html_url":"https://github.com/encoreshao/crunchbase-ruby-library","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fcrunchbase-ruby-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fcrunchbase-ruby-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fcrunchbase-ruby-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encoreshao%2Fcrunchbase-ruby-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/encoreshao","download_url":"https://codeload.github.com/encoreshao/crunchbase-ruby-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251134767,"owners_count":21541383,"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":["crunchbase-api","ruby-library"],"created_at":"2024-10-03T04:22:01.859Z","updated_at":"2025-04-27T12:09:34.253Z","avatar_url":"https://github.com/encoreshao.png","language":"Ruby","readme":"# CrunchBase\n\nA Ruby wrapper fo Crunchbase API v3.1 [CrunchBase Data Hub](https://data.crunchbase.com/v3.1/docs/using-the-api).\n\n[![Gem Version](https://badge.fury.io/rb/crunchbase-ruby-library.svg)](https://badge.fury.io/rb/crunchbase-ruby-library)\n[![Build Status](https://travis-ci.org/encoreshao/crunchbase-ruby-library.svg?branch=master)](https://travis-ci.org/encoreshao/crunchbase-ruby-library)\n[![Coverage Status](https://coveralls.io/repos/github/encoreshao/crunchbase-ruby-library/badge.svg)](https://coveralls.io/github/encoreshao/crunchbase-ruby-library)\n\n-------\n\nWe are building a new gem for Crunchbase API v4.0, it will move to [Ekohe](https://github.com/ekohe/crunchbase4)\n\n\n### How to installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'crunchbase-ruby-library'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install crunchbase-ruby-library\n\n### Certificate (User Key)\n\nCreate the file `config/initializers/crunchbase.rb` in your rails project and add user key.\n\n    require 'crunchbase'\n\n    Crunchbase::API.key = 'user_key'\n    Crunchbase::API.debug = false\n    Crunchbase::API.timeout = 60 # Default value is 60\n\n### Creating request client\n\n    client = Crunchbase::Client.new\n\n### Searchable items\n\n    - Organization\n    - Person\n    - Product\n    - IPO\n    - Acquisitions\n    - Funding Rounds\n\n#### Searching By...\n\n    * client.search({query: \"Google\"}, 'organizations') # Full text search of an Organization's name, aliases\n    * client.search({name: \"Google\"}, 'organizations') # Full text search limited to name and aliases\n    * client.search({domain_name: \"google.com\"}, 'organizations') # Text search of an Organization's domain_name\n    * client.search({locations: \"China,Shanghai\"}, 'organizations') # Filter by location names (comma separated, AND'd together)\n    * client.search({name: \"encore\"}, 'people') # A full-text query of name only\n    * client.search({query: \"encore\"}, 'people') # A full-text query of name, title, and company\n    * client.search({types: \"investor\"}, 'people') # Filter by type (currently, either this is empty, or is simply \"investor\")\n    * client.search({}, 'products')\n    * client.search({}, 'ipos')\n    * client.search({}, 'acquisitions')\n    * client.search({}, 'funding-rounds')\n\n    returned response included data on below:\n        * results\n        * total_items\n        * per_page\n        * pages\n        * current_page\n\n### Get Organization By The Permalink\n\n    * response = client.get('facebook', 'Organization')\n\n    - Relationship objects\n        [\n        primary_image founders current_team investors owned_by sub_organizations\n        headquarters offices products categories customers competitors\n        members memberships funding_rounds investments acquisitions acquired_by\n        ipo funds websites images videos news\n        ]\n\n    - Methods: Get Organization with one relationship data\n        * response = client.get('facebook', 'Organization', 'PastTeam')\n        * past_team.results.collect { |p| [p.title, p.person.first_name] }\n\n    ....\n\n### Get Person By The Permalink\n\n    =\u003e person = client.get(permalink, 'Person')\n    =\u003e #\u003cCrunchbase::Model::Person:0x007fc185215f68 @type_name=\"Person\", @uuid=\"a578dcf9859ec8b52182e3aa3c383b13\", ...\u003e\n\n    =\u003e people = client.list('Person', page: page)\n    =\u003e people.results\n    =\u003e [\n        #\u003cCrunchbase::Model::PersonSummary:...\u003e,\n        #\u003cCrunchbase::Model::PersonSummary: ...\u003e,\n        #\u003cCrunchbase::Model::PersonSummary: ...\u003e,\n        #\u003cCrunchbase::Model::PersonSummary: ...\u003e\n        ......\n    ]\n\n### Batch Search\nPass in an array of requests to perform a batch search. Following parameters should be present in each request: `type`, `uuid` and `relationships` (https://data.crunchbase.com/docs/using-the-api#batch-search-capabilities).\u003cbr/\u003e\nMax 10 requests per search allowed.\n\n    =\u003e requests = [\n        { type: 'Organization', uuid: 'valid_uuid', relationships: [\"\u003crelationship_name\u003e\"] },\n        { type: 'Person', uuid: 'valid_uuid', relationships: [\"\u003crelationship_name\u003e\"] },\n        { type: 'Organization', uuid: 'invalid_uuid', relationships: [] },\n    ]\n    =\u003e batch_search = client.batch_search(requests)\n    =\u003e batch_search = #\u003cCrunchbase::Model::BatchSearch:0x007f9bd7e850d8 @results=[#\u003cCrunchbase::Model::Organization:0x007f9bd7e84f98, ...\u003e]\u003e\n    =\u003e batch_search.results\n    =\u003e [\n        #\u003cCrunchbase::Model::Organization:0x007f9bd7e84f98, ...\u003e,\n        #\u003cCrunchbase::Model::Person:0x007f9bda0d9d78, ...\u003e,\n        #\u003cCrunchbase::Model::Error:0x007fd6b6818758 @code=\"LA404\", @message=\"Not Found - Entity invalid_uuid doesn't exist\" ...\u003e // Error object returned due to invalid uuid passed\n    ]\n\n\n### How to debug in the console\n\n    $ 1. ruby bin/console\n    $ 2. ./bin/console\n    =\u003e client = Crunchbase::Client.new\n    =\u003e ...\n\n### Contributing\n\n1. Fork it ( https://github.com/encoreshao/crunchbase-ruby-library/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n### Copyright\n\nCopyright © 2017-10 Encore Shao. See LICENSE for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencoreshao%2Fcrunchbase-ruby-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fencoreshao%2Fcrunchbase-ruby-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencoreshao%2Fcrunchbase-ruby-library/lists"}