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.
122 questions
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 ...
1
vote
1
answer
50
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).
1
vote
1
answer
134
views
Getting questions that have a specific tag or tags?
In the current API (2.1 and 2.2), how do you get questions that have a specific tag or tags?
EG:
All Stack Overflow questions asked in the past 2 months tagged 'ruby'?
All Stack Overflow questions ...
0
votes
1
answer
135
views
API responses are sometimes missing fields
conclusion
never mind. the fields are marked as optional in the spec. it was late. sue me.
the q is left for reference
What is coming out:
{
"tags": [
"cakephp",
&...
20
votes
3
answers
159
views
Documentation or API method for `option_id` information, for the `/flags/options` API calls?
The Stack Exchange API has a couple of calls that return a list of flag_option objects.
These objects contain a couple of properties that can be used to identify the flag you need.
For example, when ...
15
votes
4
answers
726
views
Version 1.0 released 9th of July
For a lot of us, that would be next Friday.
At some point - most likely after noon PST - version 0.9 of the API will be replaced with the final 1.0 release.
There are no expected interface changes ...
13
votes
2
answers
620
views
Why is my API quota not resetting after UTC reset?
According to How API Keys Work, the default daily API limit -- which is per site, per day -- is 300.
I started with 300, as expected, but over a period of days, I've noticed that the remaining quota ...
12
votes
0
answers
158
views
Are there plans to involve Area51 in SE API version 3?
Several applications come to mind, proposal publicity, question analysis, making resources files, but I can't find any SE API calls that can do this.
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?.
9
votes
3
answers
235
views
Roadmap - any update?
So now it's 2011 and we should be getting some API updates. As a company you must have some kind of plan. So can you either say the API is never going to be updated or give a time frame to at least a ...
8
votes
1
answer
235
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 ...
8
votes
1
answer
729
views
StackExchange API Java wrapper
Screenshot / Code Snippet
StackExchangeApi api = new StackExchangeApi(key);
api.authorize(authToken);
StackExchangeSite siteService = api.getSiteService(StackExchangeSite.STACK_OVERFLOW);
Response&...
8
votes
2
answers
788
views
What is the right way to create a Stack Exchange API filter?
I'm trying to create a filter by following the documentation, but a few things are quite unclear:
How do I create a filter that does not have a base filter?
I'm creating a filter without a base so I ...
7
votes
0
answers
119
views
API Parameters: Consolidated Observations
This wiki question is meant to be a central location for observations and suggestions in the interest of shaping the API meta data.
Perhaps items can be removed when accepted and resolved as ...
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 ...
6
votes
0
answers
230
views
stackapi.cpp - a C++20 library for the Stack Exchange API
Code snippet
#include "stackapi/StackAPI.hpp"
#include "stackapi/data/structs/comments/Comment.hpp"
#include <iostream>
int main() {
stackapi::StackAPI api (
{
...
6
votes
1
answer
9k
views
'The target origin provided does not match the recipient window's origin' message when trying to use localhost
I am trying to experiment with the Stack Overflow API on my localhost and am struggling to get the authentication to complete. Here is my application JavaScript code (note that I am using IBM ...
6
votes
1
answer
166
views
In the timeline the ability to know what events belong to what question
Take this example:
http://api.stackoverflow.com/0.9/questions/3165492;3182016/timeline
Would it not make sense to have the question_id as a parameter on each timeline object? It makes the timeline ...
5
votes
1
answer
113
views
How to include answers when fetching questions?
I made a small cron job which crawls questions and answers from Stack Overflow.
Here is my request URL:
https://api.stackexchange.com/2.2/questions?order=desc&tagged=php&site=stackoverflow&...
5
votes
1
answer
203
views
Provide a streaming API instead of forcing API users to poll
I've written an IRC bot that can notify channels when new questions with a certain tag are posted. However, currently I'm polling the URL #{APIURL}questions?pagesize=100&fromdate=#{@...
5
votes
1
answer
734
views
Is it possible to authenticate a user through Stack Overflow API?
Is it possible to use the Stack Overflow API to authenticate a given user identity such as with Facebook, Twitter, or OpenID?
If it's possible: Can you tell me the method (s) that make this happen?
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?
4
votes
0
answers
76
views
Add a special page where developers can reset throttle timeouts
As George Edison noted, it would be useful to have a special page where developers can reset the throttle timeout when we accidentally trigger it.
This happened to me this morning — I got banned for ...
4
votes
1
answer
141
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 ...
4
votes
1
answer
337
views
Can I get information about a user with their network ID?
My network profile's ID is 4337810.
Is there any way to get information about users with their network ID from the API? So stuff like username, location, profile image, etc...?
There doesn't seem ...
4
votes
2
answers
192
views
How can I retrieve the reputation I (or another user, fwiw) earned for a given tag from questions and answers?
(I've included the api-v2.3 because https://api.stackexchange.com/docs starts with Stack Exchange API v2.3.)
From this answer I see there's no way to get all questions with a specific tag.
However, ...
4
votes
1
answer
1k
views
Get questions with body and answers
How can I get the latest 30 questions with body and answers using the api?
And then, I want to get only first most voted 3 answers for each question. Is this possible with only one request?
To get ...
4
votes
0
answers
91
views
How can I get unread messages for inbox testing? [duplicate]
I use /users/{id}/inbox/unread method to get unread items in a user's inbox. But how could I test it if I have no unread items in my inbox?
How can I get/generate unread messages for testing?
P.S. ...
4
votes
0
answers
106
views
How to quickly retag a question from the API?
I'm playing with the write API, and I'd like to simply retag a question. This is the code I have so far:
$editURL = 'https://api.stackexchange.com/2.2/questions/' . $question->{"question_id"} . '/...
4
votes
0
answers
99
views
API v1.1 users call returns association_id for which the Stack Exchange web site has no profile
For a particular user, the users API v1.1 call returns an association_id that gives a "Page Not Found" error where the Stack Exchange profile should be, though their Stack Exchange profile can be ...
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 ...
4
votes
2
answers
297
views
Why does the API lack any POST methods?
Why aren't any POST methods available?
Being able to post new questions and answers would be very interesting.
3
votes
1
answer
73
views
How can I get user links in the API call like Twitter, GitHub and so on?
I'm trying to get the user's user links from his profile. Like this person
has GitHub and Twitter links on his profile. How can I get those?
3
votes
2
answers
258
views
Is there an api to post questions without using the websites interface?
I wanted to post questions after a proper user authentication explained here. Is there anyway I can do this?
3
votes
0
answers
41
views
Call to search/advanced is treating tagged as an AND search, not OR [duplicate]
The docs for search/advanced (https://api.stackexchange.com/docs/advanced-search) have this to state about the tagged attribute:
"tagged - a semicolon delimited list of tags, of which at least ...
3
votes
1
answer
182
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.
...
3
votes
0
answers
170
views
What's the proper way to fetch the score of all answers of SO?
I wrote a small program querying the SE API to grab the public scoring data of all SO answers (excluding the last 3 days).
Basically the request I do gets me this:
Questions[]:
Id
Title
...
3
votes
1
answer
254
views
Encoding problem while accessing the API using Java
Trying to call an API URL from a Java application, I'm having problems accessing the contents of the URL.
I can access other sites through my program but not the Stack Exchange site.
But I can call ...
3
votes
1
answer
146
views
How do I add newlines when editing a post body via the API?
I am editing the tags of a question via the API, and to do that you have to pass the body and title etc.
I can get the Markdown or HTML from the API but I can't see how to send it back formatted ...
3
votes
1
answer
124
views
Help with javascript SDK configuration
The following problem is REAL! All names have been changed to protect the innocent.
I have a site at "http://Something.github.io/MyRepository/Directory/index.html"
And I have my app configured like ...
3
votes
1
answer
100
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. ...
3
votes
2
answers
449
views
What is the correct way to get the stackoverflow.com URL for an answer via the API?
A while ago I made a little "Recently answered on Stack Overflow" sidebar widget for my homepage. Currently this works by filtering answers out of the user feed however I thought I'd update it to make ...
3
votes
1
answer
3k
views
Searching on Stack Overflow and using the API give different results?
I am trying to use the Stack Exchange API to see the trends on different topics.
Looking at the API documentation, I see that I could do this using the /search path (it's documented that this method ...
3
votes
0
answers
37
views
/associated should include user's display name and the api_site_parameter
/associated should include api_site_parameter
The /associated routes return the site_name and site_url but not the api_site_parameter.
It would be useful if it did because api_site_parameter is ...
2
votes
1
answer
163
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
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 ...
2
votes
1
answer
175
views
Possible to get more than 5 tags for /search? Or to use or-logic, for tags, in /questions?
This is the query I want to run:
/2.1/search?pagesize=100&page=1&order=desc&sort=creation&tagged=linux,ubuntu,bash,linux-mint,mint,linux-distributions,linux-distro,archlinux,&site=...
2
votes
1
answer
109
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
0
answers
81
views
Update Teams API documentation to reflect dependency on tier
The documentation says (emphasis mine):
Starting with the release of Stack Overflow For Teams, the Stack Exchange API exposes read-only access to data stored in private Teams.
This is slightly ...
2
votes
1
answer
54
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 ...