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
1
vote
1
answer
6k
views
How to programmatically retrieve the access_token from client-side OAuth flow?
I'm making an application in C# and I need to both search and post answers, so I need an access token.
I found some information, libraries, and code pieces:
The authentication guide for the Stack ...
3
votes
1
answer
217
views
Will the new traffic measuring formula be available via the API as well?
From this MSO answer:
stackexchange.com/sites was just updated today to use a new formula for traffic. Area 51 is still using the old formula, but will be updated soon to use the new formula.
...
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
},
"...
8
votes
1
answer
167
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=...
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 ...
5
votes
1
answer
350
views
Is there an offline copy of the API documentation?
I'm trying to find a way to get all the information in the API in one printable PDF,
complete with the examples given in the documentation.
Is there anyway I can do this?
3
votes
1
answer
160
views
Java exception when user age or location is unspecified in returned JSON
I am brand new to the Stack Exchange API and Android (well, self taught in the last four months). I have been working on creating a school project focused around Android and JSON. My initial idea was ...
4
votes
1
answer
804
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?
9
votes
1
answer
192
views
Is there any support for Area 51 in the new API?
Does the new API support Area 51? Will there be support in the future?
1
vote
2
answers
119
views
How to use the StacMan library to add a new question?
I didn't find any client.Questions.Add method.
So, how do I use the StacMan library to add a new question ?
Any sample C# example?
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 ...
4
votes
1
answer
73
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 ...
0
votes
1
answer
81
views
Specific Response attributes [duplicate]
I want to get questions related to a specific tag with the body of those questions. I have figure out this API request:
https://api.stackexchange.com/questions?site=stackoverflow&sort=votes&...
8
votes
1
answer
759
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
2
answers
364
views
What am I allowed/not permitted to do with the API?
I have a site that will offer technical help and assistance for a certain niche of computer users. I can either host my own forums, or tie in with stack... but I want to be able to make money off it ...
7
votes
1
answer
238
views
Add the 'people reached' count to the API?
Can we have the people reached statistic added to the /users/{ids} method?
The response could simply be:
"people_reached": 1000
I'm asking because it would be cool to get a network-wide number.
16
votes
2
answers
2k
views
Why does the API lack (proper) HTTP cache control headers?
I've just read Kevin's answer to Do I need API key to use StackAuth API? and been quite surprised that the API doesn't seem to facilitate proper HTTP caching already:
You really shouldn't be hitting ...
3
votes
1
answer
136
views
How to get questions, under a tag, which have at least one answer with 10+ votes?
I want to get all the questions under a tag which has at least one answer with 10 or more votes.
I searched the Advanced Search documentation and searched Py-StackExchange's documentation, but I ...
2
votes
0
answers
55
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 ...
1
vote
1
answer
118
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?
9
votes
1
answer
4k
views
List all tags in use on stackoverflow
I am trying to list all tags used on stackoverflow here: http://api.stackoverflow.com/1.1/usage/methods/tags and I cannot seem to list all.
How do I do it?.
3
votes
1
answer
2k
views
How to get Question/Answer body in the API response using filters?
I am specifically looking to get the question/answer body back. Is it possible?
I am looking through the API documentation and I'm confused about how to make a call with filters.
Sample call I'm ...
3
votes
0
answers
122
views
Only Stack Overflow has documentation, but the API erroneously lists documentation privileges for all sites
Privileges related to Stack Overflow Documentation are displaying in every other site's API data.
Using Meta Stack Exchange, for example, /2.2/privileges?site=meta returns the following documentation ...
4
votes
0
answers
192
views
Can we specify more than one OAuth Domain?
I would like to use the API from a browser extension. With WebExtensions, I should be able to support Firefox and Chrome with the same code.
Chrome provides an identity API for OAuth2, and so does ...
3
votes
1
answer
400
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 ...
4
votes
1
answer
87
views
What API do I call to measure popularity growth for specific tags over time?
I believe I can use the Stack Exchange API to get total questions that fit chosen tags.
I have an example I wrote myself here:
data.stackexchange.com/stackoverflow/...
1
vote
1
answer
145
views
Stack API doesn't return json with encoding of UTF-8
Here is the query
RESULT
{
"items": [
{
"badge_counts": {
"bronze": 2,
"silver": 1,
"gold": 0
},
...
1
vote
2
answers
89
views
Is there a glossary of the properties returned in response to the Stack Exchange API?
While most items are self-explanatory, some aren't, and I was wondering if there was a glossary explaining all the properties in each of the response types?
1
vote
1
answer
77
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 ...
2
votes
1
answer
3k
views
Bad format returned by Stack Exchange API, not GZip?
I'm attempting to request some information using the Stack Exchange API. Supposedly, it returns responses compress with GZip. Using Microsoft's System.IO.Compression.GZipStream or Ionic.Zlib....
2
votes
1
answer
668
views
Unable to download data from the API using UNIX wget?
I want to download the JSON data from this sample API call into a file.
I tried using wget, like so:
wget -O ~/ks/json.txt "http://api.stackexchange.com/2.2/search/advanced?pagesize=5&fromdate=...
1
vote
1
answer
79
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 true,...
16
votes
1
answer
486
views
Bug in the StackExchange Api ? getting "could not parse proxy url" when user not logged in
I think I may have stumbled upon a bug in the Stack Exchange JS API
I'm having a problem getting its authentication to work properly, and I just discovered that the same problem exist in the official ...
3
votes
1
answer
2k
views
SIlverlight 3 ClientHttp vs BrowserHttp stack: no cross domain policy means no gzip for Silverlight
I notice that even if I send accept-encoding=gzip the response does not seem to be compressed. ( it is late and i was conflating 'accept' with 'accept-encoding')
Should we expect, in the 1.0 ...
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....
2
votes
1
answer
220
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....
2
votes
0
answers
128
views
JavaScript API Library for StackExchange API?
I'm developing an application that integrates with the Stack Exchange Network for posting questions and importing whole discussions. Therefore I'm looking for a JavaScript library for the Stack ...
2
votes
0
answers
73
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 ...
1
vote
1
answer
2k
views
json with list of all user's on stackoverflow
I am trying to get the list of all user's in JSON format (as provided by the API) (using jQuery jsonp)
What I found is:
pagesize – The number of collection results to display during
pagination. ...
5
votes
1
answer
248
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
2
answers
463
views
How to get a User's picture (Avatar)
I've seen a couple of Stack Apps that have the actual picture for the user profile. Is that coming from the API, and if so how? If not I'm assuming they are using some screen-scrapping to get that ...
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.
...
11
votes
0
answers
184
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 ...
3
votes
1
answer
156
views
List of possible values for user_type on API for users
I'm starting to work with the API and I see on the call to retrieve a user or multiple users one of the fields that is returned is user_type.
So far I have only seen a value of "registered" ...
9
votes
1
answer
157
views
API for user next achievement/badge requirement?
If you look at your user profile you can see:
visited x days, x consecutive
So for the achievement/badge "Fanatic - Visited the site each day for 100 consecutive day" I can calculate the number of ...
6
votes
2
answers
475
views
Odd String Format Result from API Call
I'm just getting started messing around with the SO API. I haven't worked with JSON before, and I am getting a strange result from a basic call (No API Key).
WebClient stackClient = new WebClient();
...
2
votes
0
answers
240
views
Stackoverflow Javascript Authentication error
Using the Stack Overflow javascript authentication API, I get this error:
Application Login Failure An error occurred while login into an
application.
Error Details
error description: could ...
2
votes
1
answer
148
views
Retrieving a post with a specific ID
According to this question (and its answer), questions and answers are using the same index to determine their ID. In other words:
Question with ID #1
Answer with ID #2
Answer with ID #3
Answer with ...
4
votes
2
answers
357
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
86
views
Possible to return newest questions with a certain tag?
I am not finding a way to return a list of new questions by tag with the new Stack Exchange API.
Am I missing something or is this not available? If this is not available, I most certainly request ...