/    Sign up×
Community /Pin to ProfileBookmark

JSON seachaction integration with Google CSE

I’m trying to integrate a direct search box in Google results as stated at
[url]https://developers.google.com/structured-data/slsb-overview?utm_source=wmc-blog&utm_medium=direct-referral&utm_campaign=sitelinks-searchbox#examples[/url]

I have added the JSON code per below as per Google dev’s instructions

I use Google Custom Search (CSE) and here is the public URL of my CSE search engine
[url]https://www.google.fr/cse/publicurl?cx=005431643550967636188:jwleadixwwy[/url]

The canonical URL as stated in Google Webmaster tools is [url]http://visionarymarketing.com[/url] and has been inserted in the Json code per below.

The fact is I’m not sure at all about the CSE Syntax I have chosen for
“target”: “https://www.google.com/cse/cse.js?q={search_term_string}”,

I have had difficulty finding more info as to how one could replace the
https://query.example-petstore.com/search?q={search_term_string}”
example with a CSE equivalent.

Your expert help would be welcome because I find this Google search box really cool and I’d like it to be added to my Google search results.

>>>

JSON CODE IN HTML HEADER ON TOP URL

<script type=”application/ld+json”>
{
“@context”: “http://schema.org“,
“@type”: “WebSite”,
“url”: “http://visionarymarketing.fr/“,
“potentialAction”: {
“@type”: “SearchAction”,
“target”: “https://www.google.com/cse/cse.js?q={search_term_string}”,
“query-input”: “required name=search_term_string”
}
}
</script>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @ygourven spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...