<jupyter_start><jupyter_text>Extracting Data Using APIs  import package<jupyter_code>import requests<jupyter_output><empty_output><jupyter_text>basic usage<jupyter_code>api_key = "<KEY>"
url = 'https://api.data.gov/ed/collegescorecard/v1/schools?api_key=<KEY>'
# using get command , returns response object
result = requests.get(url)
result.status_code
result.headers
data = result.text
result.json()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12093023255813953, 'fraction_numerical': 0.002325581395348837, 'mean_word_length': 8.795454545454545, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '181165', 'license': 'MIT', 'n_tokens_mistral': 155, 'n_tokens_neox': 153, 'n_words': 24, 'path': 'notebooks/1.1-ak-Extracting Data Using APIs.ipynb', 'repo_name': 'Shabix/titanic', 'size': '500'}