Created
May 19, 2021 05:34
-
-
Save dimitryzub/142f3c0f0af752fa475a575d9f68bef4 to your computer and use it in GitHub Desktop.
Scrape Google Scholar Cite Results with SerpApi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from serpapi import GoogleSearch | |
import os | |
params = { | |
"api_key": os.getenv("API_KEY"), | |
"engine": "google_scholar_cite", | |
"q": "FDc6HiktlqEJ" | |
} | |
search = GoogleSearch(params) | |
results = search.get_dict() | |
for cite in results['citations']: | |
print(f'Title: {cite["title"]}\nSnippet: {cite["snippet"]}\n') | |
# Output: | |
''' | |
Title: MLA | |
Snippet: Schwertmann, U. T. R. M., and Reginald M. Taylor. "Iron oxides." Minerals in soil environments 1 (1989): 379-438. | |
Title: APA | |
Snippet: Schwertmann, U. T. R. M., & Taylor, R. M. (1989). Iron oxides. Minerals in soil environments, 1, 379-438. | |
Title: Chicago | |
Snippet: Schwertmann, U. T. R. M., and Reginald M. Taylor. "Iron oxides." Minerals in soil environments 1 (1989): 379-438. | |
Title: Harvard | |
Snippet: Schwertmann, U.T.R.M. and Taylor, R.M., 1989. Iron oxides. Minerals in soil environments, 1, pp.379-438. | |
Title: Vancouver | |
Snippet: Schwertmann UT, Taylor RM. Iron oxides. Minerals in soil environments. 1989 Jan 1;1:379-438. | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment