Find an API

Search public APIs with auth details & Postman guides

← All APIs

StackExchange

stackexchange · Developer Tools

Developer Tools No Auth Free & Open collaboration developer_tools support

Stack Exchange is a network of 130+ Q&A communities including Stack Overflow.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET GET /answers

Returns all the undeleted answers in the system. The sorts accepted by this method operate on the follow fields of the answer object: - activity - last_activity_date - creation - creation_date - votes - score activity is the default sort. It is possible to create moderately complex queries

https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers?max=example&min=example&page=1&site=example&sort=activity&order=desc&filter=example&todate=1&callback=example&fromdate=1&pagesize=1

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers?max=example&min=example&page=1&site=example&sort=activity&order=desc&filter=example&todate=1&callback=example&fromdate=1&pagesize=1"
import requests
params = {
    "max": "example",
    "min": "example",
    "page": "1",
    "site": "example",
    "sort": "activity",
    "order": "desc",
    "filter": "example",
    "todate": "1",
    "callback": "example",
    "fromdate": "1",
    "pagesize": "1"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers');
url.searchParams.set('max', 'example');
url.searchParams.set('min', 'example');
url.searchParams.set('page', '1');
url.searchParams.set('site', 'example');
url.searchParams.set('sort', 'activity');
url.searchParams.set('order', 'desc');
url.searchParams.set('filter', 'example');
url.searchParams.set('todate', '1');
url.searchParams.set('callback', 'example');
url.searchParams.set('fromdate', '1');
url.searchParams.set('pagesize', '1');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers")
	q := baseURL.Query()
	q.Set("max", "example")
	q.Set("min", "example")
	q.Set("page", "1")
	q.Set("site", "example")
	q.Set("sort", "activity")
	q.Set("order", "desc")
	q.Set("filter", "example")
	q.Set("todate", "1")
	q.Set("callback", "example")
	q.Set("fromdate", "1")
	q.Set("pagesize", "1")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers")
uri.query = URI.encode_www_form({
  "max" => "example",
  "min" => "example",
  "page" => "1",
  "site" => "example",
  "sort" => "activity",
  "order" => "desc",
  "filter" => "example",
  "todate" => "1",
  "callback" => "example",
  "fromdate" => "1",
  "pagesize" => "1"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/stackexchange.com/2.0/answers?" . http_build_query([
    "max" => "example",
    "min" => "example",
    "page" => "1",
    "site" => "example",
    "sort" => "activity",
    "order" => "desc",
    "filter" => "example",
    "todate" => "1",
    "callback" => "example",
    "fromdate" => "1",
    "pagesize" => "1"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET GET /badges

Returns all the badges in the system. Badge sorts are a tad complicated. For the purposes of sorting (and min/max) tag_based is considered to be greater than named. This means that you can get a list of all tag based badges by passing min=tag_based, and conversely all the named badges by passing

https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges?max=example&min=example&page=1&site=example&sort=rank&order=desc&filter=example&inname=example&todate=1&callback=example&fromdate=1&pagesize=1

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges?max=example&min=example&page=1&site=example&sort=rank&order=desc&filter=example&inname=example&todate=1&callback=example&fromdate=1&pagesize=1"
import requests
params = {
    "max": "example",
    "min": "example",
    "page": "1",
    "site": "example",
    "sort": "rank",
    "order": "desc",
    "filter": "example",
    "inname": "example",
    "todate": "1",
    "callback": "example",
    "fromdate": "1",
    "pagesize": "1"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges');
url.searchParams.set('max', 'example');
url.searchParams.set('min', 'example');
url.searchParams.set('page', '1');
url.searchParams.set('site', 'example');
url.searchParams.set('sort', 'rank');
url.searchParams.set('order', 'desc');
url.searchParams.set('filter', 'example');
url.searchParams.set('inname', 'example');
url.searchParams.set('todate', '1');
url.searchParams.set('callback', 'example');
url.searchParams.set('fromdate', '1');
url.searchParams.set('pagesize', '1');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges")
	q := baseURL.Query()
	q.Set("max", "example")
	q.Set("min", "example")
	q.Set("page", "1")
	q.Set("site", "example")
	q.Set("sort", "rank")
	q.Set("order", "desc")
	q.Set("filter", "example")
	q.Set("inname", "example")
	q.Set("todate", "1")
	q.Set("callback", "example")
	q.Set("fromdate", "1")
	q.Set("pagesize", "1")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges")
uri.query = URI.encode_www_form({
  "max" => "example",
  "min" => "example",
  "page" => "1",
  "site" => "example",
  "sort" => "rank",
  "order" => "desc",
  "filter" => "example",
  "inname" => "example",
  "todate" => "1",
  "callback" => "example",
  "fromdate" => "1",
  "pagesize" => "1"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/stackexchange.com/2.0/badges?" . http_build_query([
    "max" => "example",
    "min" => "example",
    "page" => "1",
    "site" => "example",
    "sort" => "rank",
    "order" => "desc",
    "filter" => "example",
    "inname" => "example",
    "todate" => "1",
    "callback" => "example",
    "fromdate" => "1",
    "pagesize" => "1"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET GET /comments

Gets all the comments on the site. If you're filtering for interesting comments (by score, creation date, etc.) make use of the sort paramter with appropriate min and max values. If you're looking to query conversations between users, instead use the /users/{ids}/mentioned and /users/{ids}/comme

https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments?max=example&min=example&page=1&site=example&sort=creation&order=desc&filter=example&todate=1&callback=example&fromdate=1&pagesize=1

Hover any highlighted part to learn what it does

curl -X GET "https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments?max=example&min=example&page=1&site=example&sort=creation&order=desc&filter=example&todate=1&callback=example&fromdate=1&pagesize=1"
import requests
params = {
    "max": "example",
    "min": "example",
    "page": "1",
    "site": "example",
    "sort": "creation",
    "order": "desc",
    "filter": "example",
    "todate": "1",
    "callback": "example",
    "fromdate": "1",
    "pagesize": "1"
}
response = requests.get(
    "https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments",
    params=params,
)
print(response.json())
const url = new URL('https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments');
url.searchParams.set('max', 'example');
url.searchParams.set('min', 'example');
url.searchParams.set('page', '1');
url.searchParams.set('site', 'example');
url.searchParams.set('sort', 'creation');
url.searchParams.set('order', 'desc');
url.searchParams.set('filter', 'example');
url.searchParams.set('todate', '1');
url.searchParams.set('callback', 'example');
url.searchParams.set('fromdate', '1');
url.searchParams.set('pagesize', '1');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments")
	q := baseURL.Query()
	q.Set("max", "example")
	q.Set("min", "example")
	q.Set("page", "1")
	q.Set("site", "example")
	q.Set("sort", "creation")
	q.Set("order", "desc")
	q.Set("filter", "example")
	q.Set("todate", "1")
	q.Set("callback", "example")
	q.Set("fromdate", "1")
	q.Set("pagesize", "1")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments")
uri.query = URI.encode_www_form({
  "max" => "example",
  "min" => "example",
  "page" => "1",
  "site" => "example",
  "sort" => "creation",
  "order" => "desc",
  "filter" => "example",
  "todate" => "1",
  "callback" => "example",
  "fromdate" => "1",
  "pagesize" => "1"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/stackexchange.com/2.0/comments?" . http_build_query([
    "max" => "example",
    "min" => "example",
    "page" => "1",
    "site" => "example",
    "sort" => "creation",
    "order" => "desc",
    "filter" => "example",
    "todate" => "1",
    "callback" => "example",
    "fromdate" => "1",
    "pagesize" => "1"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with StackExchange?

StackExchange is a Developer Tools API. Developers commonly use developer tools APIs for:

  • automating code review and quality checks
  • integrating CI/CD pipelines and build systems
  • managing feature flags and A/B tests
  • monitoring errors and application performance
  • generating and validating test data

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. StackExchange is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗