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.
461 questions
1
vote
1
answer
67
views
Missing total when tag is not URL-encoded
When trying to get a list of questions for the C# tag, the total field was missing. Tried with Python tag and the total was included.
/2.2/questions?order=ASC&sort=creation&site=stackoverflow....
1
vote
1
answer
1k
views
Why am I getting a 400 Bad Request error with this code?
I'm using this code (in an async function):
let about = await fetch("https://api.stackexchange.com/2.2/me?order=desc&access_token="+token+"&sort=reputation&site=gaming&...
3
votes
0
answers
110
views
Fortnightly Topic Challenge Automation on Puzzling.SE
Used for (meta.)puzzling.stackexchange - Creates & edits the corresponding meta posts with information from the main and meta site. E.g. creating a post for the new challenge every 2 weeks and ...
3
votes
1
answer
86
views
Take the right filter for favourite count
I try to take the favourite count filter for a question.
I use api through R
library(stackr)
stack_questions(11227809, site = "stackoverflow", filter = "!GeD4JB*YQqe2L")
and I ...
1
vote
1
answer
63
views
Is there any way to get questions by tag with excerpt?
I'm checking how I can embed the search for one project. Basically I want something like this page.
With the search I can get the list of questions with all meta data from the search, however the ...
2
votes
1
answer
97
views
How are API changes announced?
How are API changes announced? Are emails sent out to developers, or is there someplace I can subscribe to?
2
votes
0
answers
138
views
When does API quota reset?
I had a program consuming Stack Overflow API quota (10,000 per day) last night across midnight. This morning I checked, and my quota has not been set back to 10,000. Is this normal? If yes, when does ...
1
vote
1
answer
142
views
How can I write (edit) one of my answers?
I started to love the Python black formatter and I want all my code on Stack Overflow to be formatted like that. So I wanted to go over the answers and apply black / blacken-docs, check if anything ...
2
votes
1
answer
85
views
API to submit a Suggested Edit
Is there a way of using the API to submit a suggested edit?
This would allow users without the edit privilege to at least submit their suggestion.
There is no create/add endpoint listed in the docs ...
3
votes
1
answer
72
views
How to get the user's pinned sites?
I have been trying to find the API for getting all the pinned/favorite sites of the user, but I can't.
1
vote
1
answer
82
views
Wrong sorting parameter in documentation for question/{ids}/answers
It looks like that in the question/{ids}/answers documentation, there is a mistake:
votes – score
Shouldn't this be
votes – votes
2
votes
1
answer
194
views
What does it mean when a revision number is missing?
I've noticed in the API docs for revisions that revision_number may be absent. Yet all examples, e.g. /posts/{ids}/revisions include a revision number for all responses.
I have a colleague who swears ...
4
votes
1
answer
607
views
Creating personal applications using Stack Overflow/Stack Exchange API
I want to create an application to read Stack Overflow notifications on my device.
My question: what should I provide in the OAuth Domain and Application website fields while registering the ...
1
vote
1
answer
150
views
How can I fetch the answers posted in last week based on tags of the question?
I see that tags are present only for questions. How can I get the answers to these questions given in last week (if any) having specific tags?
1
vote
1
answer
37
views
Where do I get the user impact?
I'm trying to get the data of the user's impact.
Therefore I used the /2.2/me route and did not found any of this data.
Is there any other route that gives this information?
I'm also missing the ...
1
vote
1
answer
58
views
Stack Exchange API - What does "site_state" mean?
The /sites route can return site_state.
What does site state stand for and which values can it have?
The values I found:
normal
linked_meta
open_beta
4
votes
1
answer
90
views
Is there a way to fetch my flag quota?
I would like to stop flagging when I start running low on flags. Is there any way the API can tell me not only the flag options, but also whether I have any flags left and if so how many?
3
votes
1
answer
89
views
Getting the ID of the question-asker when fetching new answers from the API
I am fetching a list of all new answers posted on Stack Overflow using the /answers API call. This returns the owner of the answer, but I would like to know if the answerer is the same person as the ...
2
votes
1
answer
42
views
How to get "usage guidance" for a tag from the Stack Exchange API?
Stack Exchange site tags have "usage guidance", both a 1-paragraph "excerpt" and a longer tag description, as e.g. for JavaScript here. Is it possible to get this data through the API? The options ...
2
votes
1
answer
337
views
How to get (unread) achievements?
Is there an API call where you can get all achievements and all unread achievements?
Like this:
Update
Thanks to the answer of Glorfindel, I use the following methods to calculate the unread ...
5
votes
1
answer
456
views
API stopped allowing CORS requests
I'm currently using the API via JavaScript AJAX calls and it all of a sudden stopped allowing CORS requests.
I'm on localhost and I tried uploading my code to live and am still getting:
Access to ...
3
votes
1
answer
82
views
503 errors on batch get questions endpoint
I receive a lot of "socket hung up" and 503 Service Unavailable on the /questions/{ids} endpoint. I make requests in batches: 10 parallel requests with 15 question ids, interval between each 10-size ...
2
votes
1
answer
93
views
Please provide an API "flair"-data call (`/associated` route is inadequate)
So today I decided to continue refining my JavaScript skills (different post over on Code Review SE if you'd like to review the results) and utilized the Stack Exchange API (v2.2) to write a "user ...
2
votes
2
answers
135
views
Is there any way or script to sort questions/posts/answers with custom criteria?
I want to fetch some questions from the API and I would like to sort them. However, I don't want to sort by the default options (activity, votes, creations, hot, week, month), but instead, for example,...
2
votes
1
answer
66
views
Suggested edit not returned by API
This suggested edit: https://dba.stackexchange.com/suggested-edits/20375 is not returned by the /suggested-edits/{ids} API call:
https://api.stackexchange.com/2.2/suggested-edits/20375?site=dba ...
2
votes
1
answer
94
views
I am unable to get the desired response through Stack Exchange API, using Postman [duplicate]
I am using this: https://api.stackexchange.com/docs/answers#page=3&order=desc&sort=activity&filter=default&site=stackoverflow
to get the response.
Is this the correct URI?
I have ...
2
votes
1
answer
55
views
Are the revisions returned by /posts/{ids}/revisions guaranteed to be returned in descending order?
The /posts/{ids}/revisions method returns all revisions to a post, but it doesn't have the sort and order parameters most methods have. From some quick tests, e.g. this one, I think it always returns ...
2
votes
0
answers
44
views
Linked questions API call fails for frequently asked questions on Stack Overflow
The Linked Questions API fails for some of the Frequently Asked Questions on Stack Overflow, maybe because of the sheer amount of linked questions they have.
As an example, take What is a ...
2
votes
1
answer
2k
views
How to get access token from the hash?
I am trying to implement OAuth Stack Exchange API via Android app as client.
After a successful login from out I get the below URL how do I get or decode the access_token from the hash?
https://...
0
votes
1
answer
150
views
How to search ALL sites with the advanced API?
I can make a request to Stack Overflow as follows, which searches with keywords in titles:
/2.2/search/advanced?title=vlookup%20index%20match&site=stackoverflow
My question is ...
3
votes
0
answers
89
views
Open source the Stack Exchange app and API
It has come to my attention that neither the app nor the API have received much if any attention in the last two years. The latest API is also largely undocumented.
My humble request is to either A) ...
1
vote
1
answer
481
views
Is there a SQL-like query for the API?
I've looked at the API docs.
However, I haven't found a way to do complex queries through the API such as I can do in the Stack Exchange Data Explorer query editor (select, joins etc).
Example: data....
6
votes
1
answer
1k
views
Please "release" and/or document API version 2.3
I was playing around a bit with Fiddler to capture traffic from the Stack Exchange iOS app. To my surprise, it uses version 2.3 of the Stack Exchange API:
I noticed here that it has some extra ...
6
votes
0
answers
165
views
Enable access to post images in the API, for "Stack Overflow for Teams"
The Stack Exchange API supports access to Stack Overflow for Teams; see the Teams API documentation.
But, since Teams content is private, post images aren't uploaded to imgur.com, but instead hosted ...
2
votes
1
answer
397
views
Can I fetch Stack Overflow users by location in Stack Exchange API
I read the documentation and I know that I can get users' locations but I have not seen anywhere about querying by location. Does that mean that it is not possible? If it is possible, how?
As an ...
3
votes
1
answer
112
views
Stack Exchange API - Get Watched Tags for a User
Is there a way to get a list of tags that the user has set up as "Watched Tags"? If not, is it on the roadmap?
2
votes
1
answer
63
views
I have created a lot of access_token with no_expiry scope while experimenting. How do I delete them?
While learning how to work with the StackApps APIs, I created quite a few (more than 10) access_token with no_expiry scope. Finally I have got my applicaiton working but I am worried that all those ...
1
vote
1
answer
96
views
The API is not returning a value that I know it should
My "Meta Stack Overflow" site details are not listed in the API, when I use meta_site;main_site in the types parameter. See:
/2.2/users/2855348/associated?types=meta_site;...
2
votes
0
answers
35
views
.wrapper not sorted correctly in filter edit popup
When editing the filter, e.g. on this API documentation page, all types are sorted alphabetically except for .wrapper which is always shown below answer, instead of above it (or at the end):
...
3
votes
1
answer
108
views
How to query the Stack Exchange API using an OR operator?
I want to query Stack Exchange by title including optional keywords (one of).
How can I query by OR operator?
For example:
/search/advanced?page=1&tagged=java&q=title:http OR class&...
2
votes
1
answer
69
views
What are the top level question & answer localized flag_option titles?
For the SE API, the endpoints dealing with flags (e.g. /questions/{id}/flags/options) return the flag_option type. However, the option_id values are explicitly stated as being unstable, but it's ...
3
votes
1
answer
104
views
Cannot get redirect_uri to work
This is in regards to my userscript Bulk flag comments. I am sure I have not at all updated the userscript since the first release of June 24, and I am sure I was able to register for an access token ...
4
votes
1
answer
105
views
How to get a list of all StackExchange employees?
For a particular userscript feature, I need to get a list of all Stack Exchange employees. The list would be updated every day (per SE website). What is the most efficient way to do so?
I looked at ...
2
votes
1
answer
109
views
Can the API Edit a Question, changing only one field?
The documentation for the edit question method (/questions/{id}/edit) is somewhat vague.
Are all of the parameters required?
For example, if the only field I want to change in the question is tags, ...
4
votes
1
answer
52
views
Can we find the time of a vote using the API?
I've been looking at the API docs and more specifically at the filters available for the /answers/{ids}, /posts/{ids} and /questions/{ids} routes but can't find anything other than upvoted and ...
1
vote
1
answer
50
views
How to get visits per day via the API?
At the overview page of the Stack Exchange network, one can see a list of all sites of the network with some statistics for each site (number of questions, answers etc.). Most of these statistics can ...
1
vote
1
answer
92
views
How to get the user's last seen time in user's profile
In user's profile page, there's a last seen xx mins ago info:
How can I get this information in user object or other object field?
1
vote
1
answer
54
views
What's the meaning about " is_answered" field of question object?
I saw the question object has a is_answered field.
I mentioned that there're the following cases:
The is_answered field is true, and the question has an accepted answer.
The is_answered field is ...
2
votes
0
answers
71
views
I'm having a hard time finding resources for using Stack Overflow's API in Python to query some questions [duplicate]
I can just go through documentation but it'd be a time saver if I could find some sort of tutorial or intro or anything. Does anybody happen to have any resources, notes, or code examples they could ...
2
votes
1
answer
94
views
Can I get the user's top percentile, for tags, using the API?
this is the data I receive when asking for a user data with the Stack Exchange API:
{
"items": [{
"badge_counts": {
"bronze": 27,
"silver": 12,
"gold": 0
},
"...