Description Usage Arguments Author(s) Examples
View source: R/ussc_google_search.R
Uses the google search query to grab total search numbers from Google Search.
1 |
.data |
data frame with custom queries |
api_key |
Google Search API – follow the instructions here https://developers.google.com/custom-search/v1/overview#api_key. |
cx_id |
Custom Search Engine ID Once you have an api_key, create a Custom Search Engine. Follow the instructions here https://developers.google.com/custom-search/docs/tutorial/creatingcse#defining_a_custom_search_engine_in_control_panel. In the form, for the website field type in www.google.com. Remember to give the Custom Search Engine an informative name. Now you need to edit the CSE to search for all links (not just www.google.com). Go here: https://cse.google.com/create/new. On the left, click edit search engine, click on the CSE that you just created and scroll down to "Search the entire web". Click Yes. Scroll up, copy Search engine ID, paste in your .renviron file under GOOGLE_SEARCH_CX_ID. |
query |
Google Search query from ussc::ussc_google_create_custom_query |
Zoe Meers
1 2 3 4 5 6 | ## Not run:
df <- tibble::tribble(~name, ~place, "Simon Jackman", "USSC")
custom_query <- ussc::ussc_google_create_custom_query(df, "name", "place")
results <- ussc::ussc_google_total_results(query = custom_query)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.