1

I'm trying to automate a Scopus search using the API so we can more easily track publications related to the UN Sustainable Development Goals. However, I can't get the syntax right to  The search strings for each SDG are long and complex. The search strings for each SDG are documented here: https://data.mendeley.com/datasets/87txkw7khs/1#file-71334e20-2e74-4557-9002-0b8d2b28103e

I'm testing SDG 2, with a string that looks like this:

TITLE-ABS-KEY ( ( {land tenure rights}  OR  ( smallholder  AND  ( farm  OR  forestry  OR  pastoral  OR  agriculture  OR  fishery  OR  {food producer}  OR  {food producers} ) )  OR  malnourish*  OR  malnutrition  OR  undernourish*  OR  {undernutrition}  OR  {agricultural production}  OR  {agricultural productivity}  OR  {agricultural practices}  OR  {agricultural management}  OR  {food production}  OR  {food productivity}  OR  {food security}  OR  {food insecurity}  OR  {land right}  OR  {land rights}  OR  {land reform}  OR  {land reforms}  OR  {resilient agricultural practices}  OR  ( agriculture  AND  potassium )  OR  fertili?er  OR  {food nutrition improvement}  OR  {hidden hunger}  OR  {genetically modified food}  OR  ( gmo  AND  food )  OR  {agroforestry practices}  OR  {agroforestry management}  OR  {agricultural innovation}  OR  ( {food security}  AND  {genetic diversity} )  OR  ( {food market}  AND  ( restriction  OR  tariff  OR  access  OR  {north south divide}  OR  {development governance} ) )  OR  {food governance}  OR  {food supply chain}  OR  {food value chain}  OR  {food commodity market}  AND NOT  {disease} ) )

The curly braces don't work with the API interactive tool at all (even for a single item) so I've tried this version of the query:

TITLE-ABS-KEY(("land tenure rights" OR (smallholder AND (farm OR forestry OR pastoral OR agriculture OR fishery OR "food producer" OR "food producers") ) OR malnourish* OR malnutrition OR undernourish* OR "undernutrition" OR "agricultural production" OR "agricultural productivity" OR "agricultural practices" OR "agricultural management" OR "food production" OR "food productivity" OR "food security" OR "food insecurity" OR "land right" OR "land rights" OR "land reform" OR "land reforms" OR "resilient agricultural practices" OR (agriculture AND potassium) OR fertili?er OR "food nutrition improvement" OR "hidden hunger" OR "genetically modified food" OR (gmo AND food) OR "agroforestry practices" OR "agroforestry management" OR "agricultural innovation" OR ("food security" AND "genetic diversity") OR ("food market" AND (restriction OR tariff OR access OR "north south divide" OR "development governance")) OR "food governance" OR "food supply chain" OR "food value chain" OR "food commodity market" AND NOT "disease"))

Which the Scopus API interactive tool translates as

https://api.elsevier.com/content/search/scopus?query=TITLE-ABS-KEY((%22land%20tenure%20rights%22%C2%A0OR%20(smallholder%20AND%20(farm%20OR%20forestry%20OR%20pastoral%20OR%20agriculture%20OR%20fishery%20OR%20%22food%20producer%22%20OR%20%22food%20producers%22)%C2%A0)%20OR%20malnourish*%20OR%20malnutrition%20OR%20undernourish*%20OR%20%22undernutrition%22%20OR%20%22agricultural%20production%22%20OR%20%22agricultural%20productivity%22%20OR%20%22agricultural%20practices%22%20OR%20%22agricultural%20management%22%20OR%20%22food%20production%22%20OR%20%22food%20productivity%22%20OR%20%22food%20security%22%20OR%20%22food%20insecurity%22%20OR%20%22land%20right%22%20OR%20%22land%20rights%22%20OR%20%22land%20reform%22%20OR%20%22land%20reforms%22%20OR%20%22resilient%20agricultural%20practices%22%20OR%20(agriculture%20AND%20potassium)%20OR%20fertili%3Fer%20OR%20%22food%20nutrition%20improvement%22%20OR%20%22hidden%20hunger%22%20OR%20%22genetically%20modified%20food%22%20OR%20(gmo%20AND%20food)%20OR%20%22agroforestry%20practices%22%20OR%20%22agroforestry%20management%22%20OR%20%22agricultural%20innovation%22%20OR%20(%22food%20security%22%20AND%20%22genetic%20diversity%22)%20OR%20(%22food%20market%22%20AND%20(restriction%20OR%20tariff%20OR%20access%20OR%20%22north%20south%20divide%22%20OR%20%22development%20governance%22))%20OR%20%22food%20governance%22%20OR%20%22food%20supply%20chain%22%20OR%20%22food%20value%20chain%22%20OR%20%22food%20commodity%20market%22%20AND%20NOT%20%22disease%22))&apiKey=xxxMYAPIKEY

The result is a service error: "service-error": { "status": { "statusCode": "INVALID_INPUT", "statusText": "Error translating query"  

Am I missing something? Or are queries this long not supported by the API?

1 Answers1

0

It works for me once...

  • ... the opening curly brace { is replaced with %7B, and
  • the closing curly brace } with %7D.

(See also this explanation on curly braces in URLs.)

The whole URL is thus:

https://api.elsevier.com/content/search/scopus?query=TITLE-ABS-KEY%20(%20(%20%7Bland%20tenure%20rights%7D%20%20OR%20%20(%20smallholder%20%20AND%20%20(%20farm%20%20OR%20%20forestry%20%20OR%20%20pastoral%20%20OR%20%20agriculture%20%20OR%20%20fishery%20%20OR%20%20%7Bfood%20producer%7D%20%20OR%20%20%7Bfood%20producers%7D%20)%20)%20%20OR%20%20malnourish*%20%20OR%20%20malnutrition%20%20OR%20%20undernourish*%20%20OR%20%20%7Bundernutrition%7D%20%20OR%20%20%7Bagricultural%20production%7D%20%20OR%20%20%7Bagricultural%20productivity%7D%20%20OR%20%20%7Bagricultural%20practices%7D%20%20OR%20%20%7Bagricultural%20management%7D%20%20OR%20%20%7Bfood%20production%7D%20%20OR%20%20%7Bfood%20productivity%7D%20%20OR%20%20%7Bfood%20security%7D%20%20OR%20%20%7Bfood%20insecurity%7D%20%20OR%20%20%7Bland%20right%7D%20%20OR%20%20%7Bland%20rights%7D%20%20OR%20%20%7Bland%20reform%7D%20%20OR%20%20%7Bland%20reforms%7D%20%20OR%20%20%7Bresilient%20agricultural%20practices%7D%20%20OR%20%20(%20agriculture%20%20AND%20%20potassium%20)%20%20OR%20%20fertili?er%20%20OR%20%20%7Bfood%20nutrition%20improvement%7D%20%20OR%20%20%7Bhidden%20hunger%7D%20%20OR%20%20%7Bgenetically%20modified%20food%7D%20%20OR%20%20(%20gmo%20%20AND%20%20food%20)%20%20OR%20%20%7Bagroforestry%20practices%7D%20%20OR%20%20%7Bagroforestry%20management%7D%20%20OR%20%20%7Bagricultural%20innovation%7D%20%20OR%20%20(%20%7Bfood%20security%7D%20%20AND%20%20%7Bgenetic%20diversity%7D%20)%20%20OR%20%20(%20%7Bfood%20market%7D%20%20AND%20%20(%20restriction%20%20OR%20%20tariff%20%20OR%20%20access%20%20OR%20%20%7Bnorth%20south%20divide%7D%20%20OR%20%20%7Bdevelopment%20governance%7D%20)%20)%20%20OR%20%20%7Bfood%20governance%7D%20%20OR%20%20%7Bfood%20supply%20chain%7D%20%20OR%20%20%7Bfood%20value%20chain%7D%20%20OR%20%20%7Bfood%20commodity%20market%7D%20%20AND%20NOT%20%20%7Bdisease%7D%20)%20)&apiKey=xxxxxxxxYOURAPIKEY

anpami
  • 760
  • 5
  • 17