程序代写代做代考 CM0377 1999/2000 Lecture 1: Families program

CM0377 1999/2000 Lecture 1: Families program

Lab title: Google Custom Search API

The purpose of this lab is to explore use of Google’s Cloud Platform, and specifically the Google APIs,
which provide SaaS facilities. You will be doing the necessary steps to access the Google Custom Search
API, in order to search a specific website.

Task 0: create a Gmail account (if you don’t have one)
If you don’t already have a Gmail account, visit

https://gmail.com

and “Create account”.

Task 1: discovering the Google Cloud Platform & creating a new project
1) Visit the following URL:

https://console.cloud.google.com/

Note the various kinds of services which are provided. We’ll be using one of the Google APIs.

2) In the “Use Google APIs” area of the screen, click “Enable and manage APIs”:

• Give your project a name

• Google will give you a project ID

• Agree the Terms of Service

3) You’ll end up in the API Manager. To get back there later, use the URL

https://cse.google.com/manage/all

and click “Go to APIs overview”.

Task 2: Enable the “Custom Search API”
1) Inside the Dashboard of the API manager, click “Enable APIs” on the top.

2) Click on “Custom Search API” (under “Other popular APIs”)

3) Click “Enable”

Task 3: Create a Custom Search Engine
1) Go to the control panel for Google Custom Search:

https://cse.google.com/manage/all

and click the “Add” button to add a new search engine. We’ll search the COMSC site, so for “Sites
to search”, type:

www.cardiff.ac.uk/computer-science

2) Give the search engine whatever name you like and click on “CREATE”.

3) Go back to:

https://cse.google.com/manage/all

and click on the name of your search engine to find the details that have been set up for you. This
takes you to the setting page about the search engine.

Page 1 of 2

Task 4: Try it out via a Web browser
1) You can now try out your Custom Search Engine, by visiting a URL. At the “Details” section of the

setting page, click on “Public URL”, and then click on the URL that pops up.

2) At the Web site this takes you to, type in your search keywords, and you will see a list of search
results from the COMSC website.

3) (Optional) If you have your own webpage, you can add the custom search box to your page: go back
to the setting page of the custom search engine (see Task 4), then click “Get code” on the “Details”
section, and follow the instructions there.

Task 5: Create Another Custom Search Engine
1) Go back to:

https://cse.google.com/manage/all

and click “ADD”.

2) Follow the steps in the previous tasks to create a custom search engine for another website, for
example www.cardiff.ac.uk

Page 2 of 2

Lab title: Google Custom Search API
Task 0: create a Gmail account (if you don’t have one)
Task 1: discovering the Google Cloud Platform & creating a new project
Task 2: Enable the “Custom Search API”
Task 3: Create a Custom Search Engine
Task 4: Try it out via a Web browser
Task 5: Create Another Custom Search Engine