Bing Answer Box API
For some requests, Bing search includes a "Answer" block, typically on top of the page and before organic results. SerpApi is able to extract and make sense of this information.
API Examples
JSON structure overview
{
...
"answer_box": [
{
"type": "String - Type of answer box (wellness, qna, fact)",
// Answer box result has different JSON structure depends on which type is parsed
// Refer to examples below to get to know more about the detail JSON structure
},
],
...
}
Wellness
{
...,
"answer_box": {
"type": "wellness",
"title": "Banana",
"nutrition_facts": {
"macronutrients": {
"total_fat": {
"value": "0 g",
"calorie_yield": "0 %",
"daily_value": "0 %",
"types": {
"saturated_fat": {
"value": "0 g",
"daily_value": "0 %"
},
"polyunsaturated_fat": {
"value": "0 g",
"daily_value": "0 %"
},
"monounsaturated_fat": {
"value": "0 g",
"daily_value": "0 %"
}
}
},
"total_carbohydrate": {
"value": "4 g",
"calorie_yield": "97.56 %",
"daily_value": "1 %",
"types": {
"dietary_fiber": {
"value": "0.6 g",
"daily_value": "2 %"
},
"sugar": {
"value": "3 g",
"daily_value": "0 %"
}
}
}
"protein":{
"value": "0.9 g",
"calorie_yield": "4.37 %",
"daily_value": "1 %"
},
"extras": [
"72",
"Calories",
"About 6 mins of running (6mph)"
]
},
"micronutrients":{
"vitamin_b_6": {
"value": "0.3 mg",
"daily_value": "15%"
},
"vitamin_c": {
"value": "7 mg",
"daily_value": "11%"
}
},
"type": "1 extra small (less than 6″ long) (81 g)"
"see_more_link": "https://www.bing.com/search/?q=banana+nutrition+list&form=HEAFOO",
"serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=bing&q=banana+nutrition+list"
},
"benefits": {
"snippet": "Here are 11 science-based health benefits of bananas.Bananas Contain Many Important NutrientsBananas Contain Nutrients That Moderate Blood Sugar LevelsBananas May Improve Digestive HealthBananas May Aid Weight LossBananas May Support Heart HealthBananas Contain Powerful AntioxidantsBananas May Help You Feel More FullRead more on healthline.com",
"list": [
"Bananas Contain Many Important Nutrients",
"Bananas Contain Nutrients That Moderate Blood Sugar Levels",
"Bananas May Improve Digestive Health",
"Bananas May Aid Weight Loss",
"Bananas May Support Heart Health",
"Bananas Contain Powerful Antioxidants",
"Bananas May Help You Feel More Full"
]
},
"side_effects": {
"snippet": "Dangerous Side Effects of Eating Too Many Bananas, According to Science You may gain weight. Your blood sugar will spike. You may develop hyperkalemia. You may experience tooth decay. You may experience constipation. You may have migraines.Read more on eatthis.com",
"list": [
"You may gain weight.",
"Your blood sugar will spike.",
"You may develop hyperkalemia.",
"You may experience tooth decay.",
"You may experience constipation.",
"You may have migraines."
]
}
},
...
}
Questions and Answers - qna
For some searches, Bing display answer box that contains the answer to the search query. In this example, result
contains the answer and snippet
contains the extra information. We are also able to extract snippet_attributions
, highlighted_snippets
, thumbnail
, sources
and many more.
{
...,
"answer_box": {
"type": "qna",
"snippet_attributions": [
{
"text": "Spider-Man's real name is Peter Benjamin Parker",
"sources": [
{
"text": "1",
"link": "https://en.wikipedia.org/wiki/Spider-Man"
}
]
},
{
"text": "He is a teenage high school student and an orphan raised by his Aunt May and Uncle Ben in New York City after his parents Richard and Mary Parker died in a plane crash",
"sources": [
{
"text": "1",
"link": "https://en.wikipedia.org/wiki/Spider-Man"
}
]
},
{
"text": "Ted Schwartz played the voice of Peter Parker/Spider-Man in the Spider-Man TV series from 1981-1982",
"sources": [
{
"text": "2",
"link": "https://www.imdb.com/list/ls062016903/"
}
]
}
],
"snippet": "Spider-Man's real name is Peter Benjamin Parker. He is a teenage high school student and an orphan raised by his Aunt May and Uncle Ben in New York City after his parents Richard and Mary Parker died in a plane crash. Ted Schwartz played the voice of Peter Parker/Spider-Man in the Spider-Man TV series from 1981-1982.",
"highlighted_snippets": [
"Peter Benjamin Parker"
],
"result": "Peter Benjamin Parker",
"thumbnail": "https://th.bing.com/th?id=OIP.GCxbfY8WacmUcNXGeOJNHQHaFe&w=120&h=120&c=8&rs=1&qlt=80&o=6&pid=3.1",
"sources": [
{
"title": "Spider-Man - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Spider-Man",
"snippet": "Spider-Man's secret identity is Peter Benjamin Parker, a teenage high school student and an orphan raised by his Aunt May and Uncle Ben in New York City after his parents Richard and Mary Parker died in a plane crash.",
"highlighted_snippets": [
"Peter Benjamin Parker"
],
"displayed_link": "en.wikipedia.org/wiki/Spider-Man"
},
{
"title": "The Actors Who Played Spider-Man - IMDb",
"link": "https://www.imdb.com/list/ls062016903/",
"snippet": "Ted Schwartz was born on March 23, 1934 in Brooklyn, New York, USA. He was an actor, known for G.I. Joe (1985), The Transformers (1984) and Spider-Man (1981). He died on September 4, 2014. Played the voice of Peter Parker/Spider-Man from Spider-Man (1981-1982) (TV).",
"highlighted_snippets": [
"Ted Schwartz"
],
"displayed_link": "www.imdb.com/list/ls062016903/"
}
]
},
...
}
Questions and Answers - qna
For some qna
answer box, result
is not present. In this example, we can consider the snippet
as the result.
{
...,
"answer_box": {
"type": "qna",
"snippet_attributions": [
{
"text": "Ruby on Rails is a framework that provides structure for all the code developers write",
"sources": [
{
"text": "1",
"link": "https://www.codecademy.com/resources/blog/what-is-ruby-on-rails/"
},
{
"text": "2",
"link": "https://medium.com/@Sandhya./ruby-on-rails-what-it-is-and-why-you-should-use-it-for-your-web-application-be4e54b8d34f"
}
]
},
{
"text": "You need to handle complex business logic",
"sources": [
{
"text": "1",
"link": "https://www.codecademy.com/resources/blog/what-is-ruby-on-rails/"
}
]
},
{
"text": "You need to find developers to build an application readily and quickly",
"sources": [
{
"text": "1",
"link": "https://www.codecademy.com/resources/blog/what-is-ruby-on-rails/"
}
]
},
...
],
"snippet": "Ruby on Rails is a framework that provides structure for all the code developers write. It is a good choice of framework if:You need to handle complex business logic You need to find developers to build an application readily and quickly You have a limited budget You want to deliver a web app quickly Rails helps developers to build websites and applications, because it abstracts and simplifies common repetitive tasks.",
"highlighted_snippets": [
"framework that provides structure for all the code developers write"
],
"list": [
"You need to handle complex business logic",
"You need to find developers to build an application readily and quickly",
"You have a limited budget",
"You want to deliver a web app quickly"
],
"sources": [
{
"title": "What Is Ruby on Rails? - Codecademy",
"link": "https://www.codecademy.com/resources/blog/what-is-ruby-on-rails/",
"snippet": "Ruby on Rails is one of the best choices of frameworks if: You need to handle complex business logic You need to find developers to build an application readily and quickly You have a limited budget You want to deliver a web app quickly",
"highlighted_snippets": [
"You need to handle complex business logic"
],
"displayed_link": "www.codecademy.com/resources/blog/what-is-rub…"
},
{
"title": "RUBY ON RAILS: WHAT IT IS AND WHY YOU SHOULD USE IT FOR YOUR WEB APPLICATION",
"link": "https://medium.com/@Sandhya./ruby-on-rails-what-it-is-and-why-you-should-use-it-for-your-web-application-be4e54b8d34f",
"snippet": "RUBY ON RAILS: WHAT IT IS AND WHY YOU SHOULD USE IT FOR YOUR WEB APPLICATION RUBY ON RAILS Rails is a development tool which gives web developers a framework, providing structure for all the code they write. The Rails framework helps developers to build websites and applications, because it abstracts and simplifies common repetitive tasks. PROS AND CONS OF RAILS WHY WE PREFER TO USE RUBY ON RAILS: IN CONCLUSION",
"highlighted_snippets": [
"helps developers to build websites and applications, because it abstracts and simplifies common repetitive tasks"
],
"displayed_link": "medium.com/@Sandhya./ruby-on-rails-what-it-is-a…"
}
]
},
...
}
Questions and Answers - qna
For some qna
answer box, Bing display a series of images, we extract it as images
. We are also able to extract result
, title
, link
, displayed_link
, logo
and many more.
{
...,
"answer_box": {
"type": "qna",
"title": "Demographics of Paris - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Demographics_of_Paris#:~:text=The%20city%20of%20Paris%28also%20called%20the%20Commune%20or,most%20populous%20urban%20area%20in%20the%20European%20Union.",
"snippet": "The city of Paris(also called the Commune or Department of Paris) had a population of 2,165,423 people within its administrative city limits as of January 1, 2019.[1] It is surrounded by the Paris unité urbaine, or urban area, the most populous urban area in the European Union.",
"highlighted_snippets": [
"2,165,423 people"
],
"displayed_link": "en.wikipedia.org/wiki/Demographics_of_Paris",
"result": "2,165,423 people",
"logo": "https://serpapi.com/searches/64af8f30770844767af53cc6/images/00a8182ab9c7a396837719fee0eb6b8a.png",
"images": [
{
"link": "https://www.bing.com/images/search?q=population+in+paris+france&id=9201B199D68E2D8A3B22E9633BDFEDF6593CDCFF&FORM=EQNAMI",
"thumbnail": "https://www.bing.com/th?id=OIP.oPt9O1hXe8hQm5m62rzIzAHaCn&w=291&h=160&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"
},
{
"link": "https://www.bing.com/images/search?q=population+in+paris+france&id=E6BEB37277C1425C01FADFDC5D243FD55E5FEBB0&FORM=EQNAMI",
"thumbnail": "https://www.bing.com/th?id=OIP.6avD0-2CBAQFZYLL-s0JQwHaDt&w=205&h=160&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"
},
{
"link": "https://www.bing.com/images/search?q=population+in+paris+france&id=E6BEB37277C1425C01FAED86C4958FE24DC19039&FORM=EQNAMI",
"thumbnail": "https://www.bing.com/th?id=OIP.ZXsaI3GoVg9m0X60vRX22QHaDt&w=205&h=160&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"
},
...
]
},
...
}
Questions and Answers - qna
For some qna
answer box, Bing display a list of results, we extract it as list
. We are also able to extract snippet
, snippet
, sources
and many more.
{
...,
"answer_box": {
"type": "qna",
"snippet_attributions": [
{
"text": "Here are the top 10 best NBA players of all time, according to various sources",
"sources": [
{
"text": "1",
"link": "https://www.sportskeeda.com/basketball/top-10-greatest-nba-players-of-all-time-sstl"
},
{
"text": "2",
"link": "https://www.ranker.com/crowdranked-list/the-top-nba-players-of-all-time"
}
]
}
],
"snippet": "Here are the top 10 best NBA players of all time, according to various sources:Michael Jordan (1985-2003)LeBron James (2004-Present)Kareem Abdul-Jabbar (1969-1989)Magic Johnson (1979-1996)Bill Russell (1956-1969)Wilt Chamberlain (1959-1973)Tim Duncan (1997-2016)Larry Bird (1979-1992)Kobe Bryant (1996-2016)Shaquille O'Neal (1992-2011)",
"thumbnail": "https://www.bing.com/th?id=OIP.EDhHNacSLVGvMRDqnkIIKwHaJe&w=132&h=170&rs=1&qlt=80&o=6&pid=3.1",
"list": [
"Michael Jordan (1985-2003)",
"LeBron James (2004-Present)",
"Kareem Abdul-Jabbar (1969-1989)",
"Magic Johnson (1979-1996)",
"Bill Russell (1956-1969)",
"Wilt Chamberlain (1959-1973)",
"Tim Duncan (1997-2016)",
"Larry Bird (1979-1992)",
"Kobe Bryant (1996-2016)",
"Shaquille O'Neal (1992-2011)"
],
"sources": [
{
"title": "Top 10 best NBA players of all time - Sportskeeda",
"link": "https://www.sportskeeda.com/basketball/top-10-greatest-nba-players-of-all-time-sstl",
"snippet": "Top 10 best NBA players of all time1. Michael Jordan (1985-2003)2. LeBron James (2004-Present)3. Kareem Abdul-Jabbar (1969-1989)4. Magic Johnson (1979-1996)5. Bill Russell (1956-1969)More items",
"highlighted_snippets": [
"Top 10 best NBA players of all time"
],
"displayed_link": "www.sportskeeda.com/basketball/top-10-greatest-nba-play…"
},
{
"title": "The 100+ Best NBA Players Of All Time, Ranked by Fans",
"link": "https://www.ranker.com/crowdranked-list/the-top-nba-players-of-all-time",
"snippet": "If you've ever asked, \"Who's the greatest basketball player of all time?\", look no further. Ranked by votes from thousands of fans, this list features the all time NBA GOATs, including Michael Jordan, Kobe Bryant, LeBron James, Magic Johnson, Julius Erving, Wilt Chamberlain, and Larry Bird.",
"highlighted_snippets": [
"Michael Jordan, Kobe Bryant, LeBron James, Magic Johnson, Julius Erving, Wilt Chamberlain, and Larry Bird"
],
"displayed_link": "www.ranker.com/crowdranked-list/the-top-nba-players-of-…"
}
]
},
...
}
Questions and Answers - qna
For some qna
answer box, Bing display a comparison, is_comparison
is the indicator for these results.
{
...,
"answer_box": {
"type": "qna",
"title": "Matcha",
"remark": "Perspectives from the web",
"sources": [
{
"title": "https://www.quora.com/Is-…",
"link": "https://www.bing.com/ck/a?!&&p=0c17fe8f0fa519a8JmltdHM9MTY4OTIwNjQwMCZpZ3VpZD0wYzdhNTgxNi1jZjQ4LTY3MDQtMDdmNy00YjViY2VkYTY2MDYmaW5zaWQ9NTU0Nw&ptn=3&hsh=3&fclid=0c7a5816-cf48-6704-07f7-4b5bceda6606&psq=is+macha+good+or+bad%3f&u=a1aHR0cHM6Ly93d3cucXVvcmEuY29tL0lzLU1hdGNoYS10ZWEtZ29vZC1mb3IteW91&ntb=1",
"snippet": "1 Answer. Yes it is very good for you! Matcha is green tea leaves which have been ground to a superfine powder so when you drink it you consume the entire leaf, unlike with regular tea where you discard the tea bag. - Antioxidants: matcha contains 137 times more antioxidants than regular green tea.",
"displayed_link": "quora.com"
},
{
"title": "Is Matcha Good for You? | …",
"link": "https://www.bing.com/ck/a?!&&p=629c0116856e2969JmltdHM9MTY4OTIwNjQwMCZpZ3VpZD0wYzdhNTgxNi1jZjQ4LTY3MDQtMDdmNy00YjViY2VkYTY2MDYmaW5zaWQ9NTU1MA&ptn=3&hsh=3&fclid=0c7a5816-cf48-6704-07f7-4b5bceda6606&psq=is+macha+good+or+bad%3f&u=a1aHR0cHM6Ly9udXRyaXRpb25mYWN0cy5vcmcvdmlkZW8vaXMtbWF0Y2hhLWdvb2QtZm9yLXlvdS8&ntb=1",
"snippet": "That is partly because the caffeine content of matcha tea is higher, due to it being grown in the shade and partly due to consuming the whole leaves. Thus consuming the whole leaves of regular green tea would also give you more caffeine than the tea alone, but not as much as matcha tea.",
"displayed_link": "nutritionfacts.org"
}
],
"is_comparison": true
},
...
}
Questions and Answers - qna
For some qna
answer box, Bing display multiple sources
for the result
. We are also able to extract remark
, thumbnail
and many more.
{
...,
"answer_box": {
"type": "qna",
"result": "Rayleigh scattering",
"remark": "According to 5 sources",
"thumbnail": "https://www.bing.com/th?id=OIP.p8IGTt-gCP87jzOnhHNqUAHaEi&w=172&h=96&c=8&rs=1&qlt=80&o=6&pid=3.1",
"sources": [
{
"title": "Why is the Sky Blue?",
"link": "https://www.sciencemadesimple.com/sky_blue.html",
"snippet": "Why is the Sky Blue? The blue color of the sky is due to Rayleigh scattering. As light moves through the atmosphere, most of the longer wavelengths pass straight through. Little of the red, orange and yellow light is affected by the air. However, much of the shorter wavelength light is absorbed by the gas molecules.",
"highlighted_snippets": [
"Rayleigh scattering"
],
"displayed_link": "sciencemadesimple.com"
},
{
"title": "Why Is the Sky Blue?",
"link": "https://www.livescience.com/32511-why-is-the-sky-blue.html",
"snippet": "The blueness of the sky is the result of a particular type of scattering called Rayleigh scattering, which refers to the selective scattering of light off of particles that are no bigger than one-tenth the wavelength of the light.",
"highlighted_snippets": [
"Rayleigh scattering"
],
"displayed_link": "livescience.com"
},
{
"title": "Why is the sky blue?",
"link": "https://www.space.com/why-is-the-sky-blue",
"snippet": "The key lies in an effect known as Rayleigh scattering, after its discoverer Lord Rayleigh. This refers to the way light bounces off small particles, up to about a tenth the wavelength of the light itself — which includes the molecules making up the Earth ’s atmosphere.",
"highlighted_snippets": [
"Rayleigh scattering"
],
"displayed_link": "space.com"
},
...
]
},
...
}
Fact
For some searches, Bing display fact answer box, we are able to extract result
, breadcrumb
, thumbnail
and many more.
Answer Box List
For some searches, Bing might display fact block and question and answer block at the same time. We include both answer box in answer_box_list
.
{
...,
"answer_box_list": [
{
"type": "fact",
"result": "Pékin",
"breadcrumb": "Chine / Capitale",
"thumbnail": "https://th.bing.com/th?id=OSK.79c9ad5a0f78477471fd8e9860461762&w=120&h=120&c=12&o=6&pid=SANGAM",
"extensions": [
"1 oct. 1949 -"
]
},
{
"type": "qna",
"snippet": "Beijing, the capital of China. The largest city in China is Shanghai while Beijing is the capital city. Besides being the capital, Beijing is among the most populated capital city in the world. The national government of China rules the city directly through the municipal government.",
"highlighted_snippets": [
"Beijing"
],
"result": "Beijing",
"link": "https://www.worldatlas.com/articles/what-is-the-capital-of-china.html#:~:text=Beijing%2C%20the%20capital%20of%20China.%20The%20largest%20city,rules%20the%20city%20directly%20through%20the%20municipal%20government."
}
],
...
}