curl 'https://api.semanticscholar.org/graph/v1/paper/search?query=machine+learning' \
-d '{"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}'
import requests
resp = requests.get(
"https://api.semanticscholar.org/graph/v1/paper/search",
params={
'query': 'machine learning',
},
json={
'message': 'Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form',
'code': '429',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("semanticscholar")
result = api.fetch("graph/v1/paper/search", query="machine learning")
for item in result:
print(item)
const body = {
"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form",
"code": "429"
};
const resp = await fetch("https://api.semanticscholar.org/graph/v1/paper/search?query=machine+learning", {
body: JSON.stringify(body),
});
const data = await resp.json();
Search with specific fieldscurl
curl 'https://api.semanticscholar.org/graph/v1/paper/search?query=transformer+architecture&fields=paperId%2Ctitle%2Cauthors%2Cyear&limit=5' \
-d '{"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}'
import requests
resp = requests.get(
"https://api.semanticscholar.org/graph/v1/paper/search",
params={
'query': 'transformer architecture',
'fields': 'paperId,title,authors,year',
'limit': 5,
},
json={
'message': 'Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form',
'code': '429',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("semanticscholar")
result = api.fetch("graph/v1/paper/search", query="transformer architecture", fields="paperId,title,authors,year", limit=5)
for item in result:
print(item)
const body = {
"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form",
"code": "429"
};
const resp = await fetch("https://api.semanticscholar.org/graph/v1/paper/search?query=transformer+architecture&fields=paperId%2Ctitle%2Cauthors%2Cyear&limit=5", {
body: JSON.stringify(body),
});
const data = await resp.json();
Paginated searchcurl
curl 'https://api.semanticscholar.org/graph/v1/paper/search?query=crispr+cas9&limit=20&offset=20' \
-d '{"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form", "code": "429"}'
import requests
resp = requests.get(
"https://api.semanticscholar.org/graph/v1/paper/search",
params={
'query': 'crispr cas9',
'limit': 20,
'offset': 20,
},
json={
'message': 'Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form',
'code': '429',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("semanticscholar")
result = api.fetch("graph/v1/paper/search", query="crispr cas9", limit=20, offset=20)
for item in result:
print(item)
const body = {
"message": "Too Many Requests. Please wait and try again or apply for a key for higher rate limits. https://www.semanticscholar.org/product/api#api-key-form",
"code": "429"
};
const resp = await fetch("https://api.semanticscholar.org/graph/v1/paper/search?query=crispr+cas9&limit=20&offset=20", {
body: JSON.stringify(body),
});
const data = await resp.json();