Questions tagged [api]
Questions about the Stack Exchange API *only*. If your question concerns any other API, do not use this tag. For bugs, please (also) use the version tag, EG [api-v2.2], that the bug applies to.
456
questions
3
votes
1
answer
114
views
Add Twitter accounts on the /sites route?
Would it be possible to add references to the site Twitter accounts in the /site listing?
If your wondering what I'm talking about:
blog.stackoverflow.com/2011/01/twitter-question-feeds-for-stack-...
2
votes
1
answer
111
views
Can I pass multiple filters?
I've tried adding filter=total and filter=withbody in the same request but get the following error:
{"error_id":400,"error_message":"Invalid filter specified","error_name":"bad_parameter"}
How ...
2
votes
0
answers
78
views
Provide a way to get display name via access token
Please include a new (network) method with the ability to gather display name and profile image directly via access token.
Right now to retrieve this information you have to first authenticate a ...
11
votes
0
answers
172
views
Provide a way to reset - not invalidate - API tokens
I'm running a service with ~300 write-authenticated access tokens. It's terrifying.
As part of running such a service, I'd like to be able to cycle API tokens - so that if, heaven forbid, one made an ...
1
vote
1
answer
76
views
How to sort /questions/featured by bounty_closes_date
The API documentation describes tthe usage of /questions/featured. Unfortunately there does not seem to be a way to sort the result by bounty_closes_date, which is IMO the sort option making most ...
0
votes
1
answer
63
views
Get a great many counts of questions, by select tags for a date range?
I am trying to get the number of questions associated with a specific tag for a particular date range. I initially assumed the fromdate and todate parameters would do this. However, it appears that ...
6
votes
2
answers
1k
views
StackExchange API Java SDK
This project aims to provide a Java wrapper to the Stack Exchange API.
SDK supports Stack Exchange API V2.2
Getting Started
There are two interfaces to the library.
Query Interface
Facade ...
8
votes
1
answer
133
views
Bug with `badges/name` endpoint
Last night I had a programme running and it errored on the first call to the badges/name endpoint on the API, exact API endpoint call:
https://api.stackexchange.com/2.2/badges/name?order=asc&sort=...
3
votes
0
answers
229
views
Guidance on usage thresholds - specifically throttling [duplicate]
I am running a lot of tests and have started to get 403 errors.
I am using a key and certainly have not exceeded my quota.
Am I running foul of some yet unmentioned throttling threshold and if so, ...
4
votes
1
answer
89
views
How to use shallow_user?
I can not understand how to access the summary information about the user's reputation. How to use the shallow_user object ?
I tried:
https://api.stackexchange.com/2.2/shallow-user/2765346/...
2
votes
1
answer
193
views
Keep getting 500 "Internal error" in requests with an access token
I'm trying to fetch some data from the Stack Exchange API
I have a valid access_token and registered key but I keep getting internal error as a result.
Here is the request URL:
https://api....
3
votes
1
answer
41
views
How do I get the total number of records for a given search?
I want to use the Stack Exchange API and get the total number of results returned from the search route.
I wrote this recursive script to find the last page with the has_more=False, is there a better ...
2
votes
0
answers
49
views
Add privilege_type to the privilege API results
The /me/privileges, /users/{id}/privileges and /privileges APIs are currently returning the fields of reputation, description and short_description.
Sample result as:
{
"reputation": 1,
"...
2
votes
1
answer
136
views
bad_parameter when using key with todate?
I'm having trouble using my API key with the todate parameter. My query works fine with todate:
$ curl -s "https://api.stackexchange.com/2.2/search/advanced?todate=2015-07-21&site=stackoverflow&...
3
votes
0
answers
54
views
API for the mobile feed, as seen in the Android app?
I'm creating an app for Windows 10, and I would like to provide a similar experience to the official Android and iOS apps (while keeping my own identity, of course).
One feature seen in the official ...
3
votes
1
answer
66
views
Can I retrieve question comment count as part of a search query?
I'm looking for a comment_count property in the results of /search/advanced to get a count of comments under a question.
Is there an undocumented q for /search/advanced that gives a comment_count ...
2
votes
1
answer
105
views
Can I change my profile picture using the API version 2?
I was considering making an app that lets the user design a profile picture and then activate it on the user's Stack Exchange account. Could a feature to change the profile picture be added to the ...
2
votes
1
answer
88
views
Get users based on location? [duplicate]
I want to get site users by their location but I don't see any method for that.
And it's not possible with a filter either.
Is there any way to get users based on location or is it not possible?
8
votes
1
answer
224
views
Why is /questions API returning deleted questions?
In last few days I have noticed that questions API returns questions that where deleted hours before the API call.
This is a short example, if more logs are need to pin point the problem, please ...
7
votes
1
answer
179
views
How do I get my total reputation score using the API?
How do I get my total reputation score?
My score is 354, on Stack Overflow, as per my user page.
I browsed the API, and found a call similar to what I require:
api.stackexchange....
8
votes
1
answer
723
views
StackExchange API Java wrapper
Screenshot / Code Snippet
StackExchangeApi api = new StackExchangeApi(key);
api.authorize(authToken);
StackExchangeSite siteService = api.getSiteService(StackExchangeSite.STACK_OVERFLOW);
Response&...
3
votes
0
answers
64
views
It's taking two calls to /oauth/dialog/ to get an access_token? [duplicate]
When we send this request:
https://stackexchange.com/oauth/dialog/?client_id=`client_id`&scope=read_inbox%2cno_expiry%2cwrite_access%2cprivate_info&redirect_uri=https%3a%2f%2fstackexchange....
4
votes
2
answers
305
views
When does a rate-limit day start and end?
After reading the docs/faqs, I couldn't help but wonder...
What exactly is a day?
When does it start?
When does it end?
What timezone are you using?
In other words, when my app runs out of requests ...
3
votes
1
answer
275
views
Same access token between different fetch_token requests
TL;DR:
Is it (or would it be) possible to get the same access_token from one fetch_token request to another, provided that the user is the same?
Scenario:
An anonymous user authenticates with Stack ...
0
votes
0
answers
71
views
OAuth domain with a custom port in a dev environment? [duplicate]
I have an app for which the OAuth domain is example.com
However, the domain for dev environment is example.com:8000
When trying to authorize the website, Stack Exchange replies with an error ...
-2
votes
1
answer
65
views
Are the inbox routes (`inbox_item`) missing some item types?
Should there be more options for item_type in the "inbox" routes (they return inbox_item)?
Shouldn't they return answer and edit suggested like the site's global inbox does? As shown in this ...
2
votes
0
answers
38
views
Okay if our Internal Customer Service Software polls the Stack Exchange API?
We are in the process of creating a number of API's and extensible software which we expect will result eventually in questions being asked on stack overflow for working with our API's and extensible ...
1
vote
1
answer
88
views
Absence of `order` and `sort` in rest calls?
Will absence of order and sort give the same result as order=desc and sort=activity always in every call (it is default in every call)?
1
vote
1
answer
92
views
Why is the `site` parameter required in `/me` call?
I want to query information about the logged-in user using me, and this site parameter is creating some small problems.
I am developing a visual studio extension where upon logging in a user will get ...
3
votes
1
answer
95
views
Why do you need to specify a site when getting the inbox?
I'm getting a user's inbox via /me/inbox. I am forced to specify a site with this, so I'm setting it to Stack Overflow. However, it still gets all my notifications, including those from other sites. ...
1
vote
1
answer
47
views
`types=main_site` in `/me/associated` gives `meta_site` accounts also
When I run /me/associated with main_site as a parameter in types, its gives meta_site accounts also (Meta Stack Exchange profile).
2
votes
1
answer
52
views
Why is `page` and `page_size` returned in common wrapper object?
page and page_size returned in common wrapper object, if I run /me/associated request. Why is it so? I am asking this because we have already sent these parameters as request. So getting the same ...
2
votes
0
answers
58
views
How to get more details flags from questions?
Short question:
How to get the flags that led up to a question being closed?
When we are going to flag a question, we have to look at /questions/{id}/flags/options first, and I can see
The option ...
4
votes
1
answer
652
views
How to get question body (markdown) in the API response using filters? [duplicate]
Using withbody filter as suggested in this thread (How to get Question/Answer body in the API response using filters?) returns body as HTML. How do I get the original markdown?
32
votes
1
answer
11k
views
Looking for a beginner's tutorial to using the API
I see the Stack Exchange API but I'm unable to understand it. I don't think there is any fundamental tutorial showing how to use Stack Overflow fully in the API documentation.
I want some fundamental ...
4
votes
1
answer
137
views
How can I get a user's Meta site details in the API call?
This query returns the details of the Main sites only:
/associated-users#ids=2855348
How can I get the Meta site details also in the same query?
Do I need to add any ...
1
vote
1
answer
2k
views
Unable to decode HTML entities in the API response?
I am trying to decode HTML entities from the JSON data returned by the Stack Exchange API but it's not working.
I have used both html_entity_decode and htmlspecialchars_decode but it doesn't effect ...
5
votes
1
answer
150
views
Is there a way to specify how long I want an access token to be valid for?
I am following the explicit authentication path. I am not passing no_expiry as part of the scope.
After the final POST step, I receive back an expires value of 86399 (just shy of a full day).
It ...
6
votes
0
answers
76
views
Use HTTPS urls for site logos returned by the API
Currently, the API returns resources like this:
"high_resolution_icon_url": "http://cdn.sstatic.net/stackoverflow/img/[email protected]",
"favicon_url": "http://cdn.sstatic.net/stackoverflow/img/...
1
vote
1
answer
116
views
I want a python program example for more requests a day
How can I make about 10k requests on
https://api.stackexchange.com/2.2/users/+J+/questions?order=desc&sort=activity&site=stackoverflow
using python program in a day. Where J is variable ...
4
votes
1
answer
92
views
Getting the top answerers/users for a tag in a custom time range?
I'm trying to use the top answers on tags API to get the users who contribute the most for a given tag. Like so:
/2.2/tags/azure-web-sites/top-answerers/month?site=...
2
votes
1
answer
56
views
Advanced search doesn't return expected results when using min & max (dates) together?
I want to use the Advanced Search API to get the same results as the Stack Overflow site search.
With it, I can see new questions on 11/10/2015.
When I tried to craft a query using the Advanced ...
3
votes
1
answer
56
views
Reputation_change has the historical total rather than the daily delta?
I'm trying to use the reputation API to get the recent reputation delta for a given user. For example, looking at recent entries for /2.2/users/21539/reputation, one has:
{
on_date: 1447018487,
...
1
vote
1
answer
108
views
How to get all questions with a specific tag between certain dates
I would like to get all questions created and tagged with tag "R" between 2 dates.
I'm using parameters: tagged = R, sort = creation, fromdate and todate set to appropriate dates and site = ...
6
votes
1
answer
201
views
Please add tags to answers
Update: This was completed as of API version 2.1.
When querying any API method which returns answers (/users/ids/answers, /answers/ids, etc.) the result does not include the tag information for the ...
5
votes
1
answer
56
views
Do calls on the 1.1 API and the 2.0 count against each other's limits?
Do the old 1.1 API and new 2.0 share limits?
Or do my Stack Apps running on 1.1 calls not affect my limits for apps running on 2.0 calls?
3
votes
1
answer
34
views
Top answers for a tag is returning user details?
I am expecting top answers for a particular tag here. But it returns user details.
Is anything wrong here?
Using:
/2.2/tags/java/top-answerers/all_time?site=stackoverflow
3
votes
1
answer
71
views
How to get the 10 most recent questions with accepted answers based on a given tag?
I am trying to figure out how to get the 10 most recent questions from the Stack Overflow site, that have been answered, based on a given tag (such as 'Java').
I looked at the documentation but I ...
4
votes
1
answer
76
views
How to monitor (for new) accepted answers by certain tags?
In practice, I don't know the IDs of the questions, but I can search for answers by given tag(s).
The problem is how to find (newly) accepted answers. The "activity time" does not work for this.
For ...
3
votes
1
answer
194
views
Search for answers/comments under questions with certain tags using the Stack Overflow API?
The advanced search (/search/advanced) API can search for questions by tags.
But /users/{ids}/answers API doesn't take tags.
I'd like to monitor answers/comments for questions with certain tags. Is ...