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.
454 questions
2
votes
1
answer
200
views
Is there any way to get statistics by tag?
We are Stack Overflow Teams users. We want to get the statistics by tags.
Currently only StackExchangeApiClient.getStatistics API is found which include all team's data.
And can the https://...
2
votes
1
answer
90
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
470
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 ...
2
votes
1
answer
85
views
How to get up_vote_count and down_vote_count for a user?
I'm testing the following command:
$ curl -s "http://api.stackexchange.com/2.1/users/55075?&site=stackoverflow" | gunzip -d | python -m json.tool
However it doesn't return up_vote_count and ...
2
votes
1
answer
96
views
Where are the built-in filters?
On api.stackexchange.com/docs/create-filter it states:
there are a number of built-in filters which cover common use cases.
Where can I find them? Can you make built-in filters a link?
I need only ...
2
votes
2
answers
720
views
Is it possible to create a private Q&A site using the Stack Exchange API?
I want to create a sort of private Q&A site to allow university students of the same courses to communicate. Is it possible by using the Stack Exchange API?
2
votes
1
answer
95
views
/users/{id} and /users/{id}/reputation disagree over +2 accept-answer bonuses
I am using the 2.2 API to display user stats by quarter, but I also want to display reputation changes between any 2 dates.
I use the /users/{ids} API to get the summaries. For example, user 2403309 ...
2
votes
1
answer
126
views
API support for close actions
Background
I would like to create an app for general Stack Overflow browsing to improve upon the UI. One of the things that I am targeting is the lack of certain options in the close dialog. I ...
2
votes
1
answer
197
views
How do I find all questions/answers per a tag?
Would also be good if I could also find the top questions/answers in a particular tag - i.e. questions tagged with Ruby or PHP.
Per the docs the only thing I can see that will return questions in a ...
2
votes
1
answer
74
views
Is there a way to get the edit URL for a tag wiki from the API?
I've been playing with a little webapp for tags of a certain kind for travel.SE (current pre-alpha version gist on github).
One thing I would like to do is add links for the various tag-related ...
2
votes
1
answer
93
views
Are there any plans to add Inbox functionality to SO API?
So, 3rd party applications will be able to notify users about new answers and comments.
2
votes
1
answer
892
views
Any guarantees on JSON string encoding?
According to the JSON specification, JSON can be returned in one of five string encodings:
UTF-8 (the default encoding)
UTF-16 Little Endian
UTF-16 Big Endian
UTF-32 Little Endian
UTF-32 Big Endian
...
2
votes
1
answer
74
views
Why are these answers dated before the question was asked?
Does anyone know why some answers are shown with a date before the question was asked?
Here are a couple of examples:
Why doesn't Java have compound assignment versions of the conditional-and and ...
2
votes
1
answer
140
views
Can "trends" be queried with the Stack Exchange API?
I've studied the Stack Exchange API to some extent (although I'm a newbie to such things), and it appears I can query the database using many criteria. But does Stack Exchange store any "trends&...
2
votes
1
answer
886
views
How to handle default compression on response with Java's HttpURLConnection? [duplicate]
I sent a request for question with no parameters to
https://api.stackexchange.com/2.2/questions?order=desc&sort=activity&site=stackoverflow
I received a response of 9764 bytes stored in ...
2
votes
1
answer
129
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 ...
2
votes
1
answer
96
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.
2
votes
1
answer
59
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
111
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
1
answer
105
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
85
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
1
answer
84
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 ...
2
votes
1
answer
108
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 ...
2
votes
1
answer
115
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
},
"...
2
votes
1
answer
306
views
How to get deleted answers?
Users with a certain reputation, can see deleted answers (deleted either by moderators or by their owners themselves).
Does the API offer any means to access such deleted answers?
2
votes
1
answer
212
views
How to get the number/count/total of tags/badges/something from the API?
I see we can fetch tags via the API, which works fine
but, sadly, there doesn't seem to be a way to get the count of all possible tags.
Currently the Stack Overflow Tags page shows 36 tags per page ...
2
votes
1
answer
157
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&...
2
votes
1
answer
135
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 should ...
2
votes
1
answer
86
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
1
answer
73
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 ...
2
votes
1
answer
132
views
"We are no longer accepting questions from this account.". Error with write access, using the API
I have created an application for testing write-access APIs. After registration, I can successfully retrieve an access token by hitting the URL:
https://stackexchange.com/oauth/dialog?client_id=3973&...
2
votes
1
answer
262
views
Why am I getting a 404 when trying to post a comment?
I'm dabbling around in /posts/{id}/comments/add, and I'm trying this query:
https://api.stackexchange.com/2.1/posts/144890/comments/add?site=meta.stackoverflow&key=ArbQthisismykeyjyecuJQ((&...
2
votes
1
answer
169
views
How to use the Stack Exchange API in PhoneGap?
I want to write a program using PhoneGap. How can I use the Stack Exchange API in PhoneGap?
2
votes
1
answer
108
views
Top questions by tag and period
I want to get via API the most voted questions from the latest week (for example) from a specified tag (php, for example).
How can I do this?
2
votes
1
answer
79
views
Is question_id unique across all stackexchange sites?
The standard structure of a question URL is:
http://site.com/questions/question-id/title
Example:
http://stackoverflow.com/questions/457927/git-workflow-and-rebase-vs-merge-questions
It is however ...
2
votes
1
answer
135
views
Pagination of users ordered by reputation
I know I can retrieve a page of users ordered by reputation using these apis:
http://api.stackoverflow.com/1.1/users/?sort=reputation&order=desc&page=1
http://api.stackoverflow.com/1.1/users/...
2
votes
1
answer
100
views
Answers without owners
Is it valid for Stack Overflow data to have an answer that does not have an owner?
For example if you hit the following API url http://api.stackoverflow.com/1.1/answers/18, it does not bring back an ...
2
votes
1
answer
253
views
Using the API directly from JavaScript
Is there any way I can use the API directly from JavaScript without any Server side proxy? I know of the inter-domain restrictions, but can we do it somehow in case of facebook API right?
2
votes
1
answer
102
views
Is it possible to restrict the pool of answerers to users meeting certain criteria?
I'm expecting the answer to this is an unfortunate "no," but I've been unable to find it discussed anywhere, so here I go asking:
I'd love to use this API, but the site I'm considering would need the ...
2
votes
2
answers
162
views
StackApps API is down.
It seems to not be responding to any request.
* at least according to downforeveryoneorjustme.com
Update: seems like all the SE sites are down :(
2
votes
1
answer
148
views
Top questions/answers
Is there a way to get a list of X questions/answers with the highest votes up, visits, etc?
Say I want to get the list of most voted questions in .NET category (tag) or Java.
2
votes
1
answer
225
views
Is there a way to use the API without using localhost or a web domain?
I'm developing an SO chrome extension in React with TypeScript.
I've been reading the guide on how to use the API with OAuth and it looks fantastic for what I'm trying to do.
The problem is that the ...
2
votes
1
answer
62
views
Writing question API failing with error 407
I'm trying to use https://api.stackexchange.com/2.3/questions/add method
payload = {
'site': 'stackoverflow',
'title': title,
'body': body,
'tags': tags,
'key': key,
'...
2
votes
1
answer
125
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
1
answer
238
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 ...
2
votes
1
answer
371
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 ...
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://...
2
votes
1
answer
143
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, ...
2
votes
1
answer
81
views
Exclude records where field is present (ie., return only open questions)
How do I exclude records based on the presence of a certain field (like the equivalent of SQL's [fieldname] Is Null)?
Example:
Results for Closed questions include field closed_date=1234567890.
...
2
votes
1
answer
95
views
How to Create a Multi-tag URI Request to /questions
Just want to confirm if I'm doing this right. The /questions guide doesn't mention this.
Let's say I want to ask for multiple tags in one request, am I doing this right?
https://api.stackexchange....