Skip to content

Instantly share code, notes, and snippets.

@luisgdelafuente
Last active August 31, 2023 22:20
Show Gist options
  • Save luisgdelafuente/7917cc992d3c9b676c900d1f774f3236 to your computer and use it in GitHub Desktop.
Save luisgdelafuente/7917cc992d3c9b676c900d1f774f3236 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"\n",
"url = \"https://api.crunchbase.com/api/v4/searches/organizations\" # Replace with correct URL\n",
"headers = {\n",
" 'X-cb-user-key': 'e9911cefeed0eb5b3ebb799a7266ec9f', # Replace with your API key\n",
" 'Content-Type': 'application/json',\n",
"}\n",
"params = {'user_key': 'YOUR_API_KEY_HERE'} # Replace with your API key\n",
"body = {\n",
" 'field_ids': ['identifier'],\n",
" 'query': [],\n",
" 'limit': 10 # Limit the number of results to 10\n",
"}\n",
"\n",
"response = requests.post(url, headers=headers, params=params, json=body)\n",
"\n",
"print(response.status_code)\n",
"print(response.json())"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment