Skip to content

sw-sys/build_a_search_engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Google Programmable Search Engine

Instructions

  1. Go to https://programmablesearchengine.google.com/
  2. Select 'Add'
  3. Fill in the details for the websites you want to search
  4. Click 'create'
  5. You can retrieve search results using the API - scroll to the bottom of the page, look for the 'Programmatic access' section
  6. Select 'Get started'
  7. Select 'Get a Key' button
  8. Create an .env file & add this key as the 'KEY =' value
  9. Also add the 'CX_ENGINE' value to the .env (this is your 'Search Engine ID' - click on your search engine's name from this webpage andy ou should see it https://programmablesearchengine.google.com/controlpanel/all)

About

  • The API responds in JSON.
  • The output will be in CSV, and the file named using the date, time and keywords used to retrieve the results.
  • The output will be 10 results (you can set this from 1 to 10 with the 'num' param)
  • The API can output up to 100 results but you'd need to change the 'start' param value e.g. 11 would take you to the start of page two, as results are paginated in 10s - as the Google Custom Search UI is. See the 'Google custom search' docs (below) for more info.

Important

If you put a keyword in q (for query) and then put a keyword in 'hq', the two works will be combined with the logical AND operator

Docs

PARAM VALUES

About

Playing with the Google search engine builder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages