Stack Exchange Answers
Answers to Stack Overflow and other Stack Exchange questions, highest score first: score, accepted flag, author, dates, question title, tags, link and an optional plain-text excerpt. Paste question links or ids, or get a site's newest answers.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from api.stackexchange.com/docs
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/stack-exchange-answers/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"question_links": [
"https://stackoverflow.com/questions/11227809"
]
},
"max_items": 50
}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
16 fields: 14 here, 2 technical ones under Technical details.
Basics
- Question title
Title of that question.
Example Why is conditional processing of a sorted array faster than of an unsorted array?
- Site
Site the answer is on, as its domain, such as stackoverflow.com.
Example stackoverflow.com
- Score
Upvotes minus downvotes.
Example 35,296
- Accepted
Yes when the person who asked marked it as the accepted answer.
Example Yes
- Author display name
Display name of the person who wrote the answer.
Example Mysticial
- Author reputation
That author's reputation on the site.
Example 473,523
- Tags
Tags of the question, such as java or c++.
Example java, c++
- Text excerpt
The first 500 characters of the answer in plain text; only with include_text.
Example You are a victim of branch prediction fail. What is Branch Prediction? Consider a railroad junction: Image by…
- Content license
License of the answer text, such as CC BY-SA 4.0.
Example CC BY-SA 4.0
Dates
- Created
When the answer was posted (UTC).
Example Jun 27, 2012
- Last activity at
Last edit or other activity on the answer (UTC).
Example Mar 4, 2024
- Last edited
When the answer was last edited (UTC); empty when it never was.
Example Mar 4, 2024
Links
- Link
Link to the answer.
- Author link
The author's profile page on the site, for the CC BY-SA credit.
Technical detailsField names and types for developers, and the 2 fields hidden above
Hidden by default
These 2 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.
- Answer ID
answer_idId of the answer on its site. - Question ID
question_idId of the question it answers.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
answer_id | text | Answer ID (hidden) | 3 of 3 |
question_id | text | Question ID (hidden) | 3 of 3 |
question_title | text | Question title | 3 of 3 |
site | text | Site | 3 of 3 |
url | link | Link | 3 of 3 |
score | number | Score | 3 of 3 |
is_accepted | yes or no | Accepted | 3 of 3 |
created_at | date and time | Created | 3 of 3 |
last_activity_at | date and time | Last activity at | 3 of 3 |
last_edited_at | date and time | Last edited | 3 of 3 |
author_display_name | text | Author display name | 3 of 3 |
author_reputation | number | Author reputation | 3 of 3 |
author_url | link | Author link | 3 of 3 |
tags | list | Tags | 3 of 3 |
text_excerpt | text | Text excerpt | 3 of 3 |
content_license | text | Content license | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Question title | Site | Score | Accepted | Author display name | Author reputation | Tags | Text excerpt | Content license | Created | Last activity at | Last edited | Link | Author link |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Why is conditional processing of a sorted array faster than of an unsorted array? | stackoverflow.com | 35,296 | Yes | Mysticial | 473,523 | java, c++, performance, cpu-architecture | You are a victim of branch prediction fail. What is Branch Prediction? Consider a railroad junction: Image by Mecanismo, via Wikimedia Commons. Used under the CC-By-SA 3.0 license. Now for the sake of argument, suppose this is back in the 1800s - before long-distance or radio… | CC BY-SA 4.0 | Jun 27, 2012 | Mar 4, 2024 | Mar 4, 2024 | stackoverflow.com/questions/11227809/why-is-conditional-processing-of-a-sorted-array-faster-than-of-an-unsorted-array/11227902 | stackoverflow.com/users/922184/mysticial |
| 2 | Why is conditional processing of a sorted array faster than of an unsorted array? | stackoverflow.com | 4,767 | No | Daniel Fischer | 184,654 | java, c++, performance, cpu-architecture | Branch prediction. With a sorted array, the condition data[c] >= 128 is first false for a streak of values, then becomes true for all later values. That's easy to predict. With an unsorted array, you pay for the branching cost. | CC BY-SA 4.0 | Jun 27, 2012 | Aug 5, 2016 | Jun 20, 2020 | stackoverflow.com/questions/11227809/why-is-conditional-processing-of-a-sorted-array-faster-than-of-an-unsorted-array/11227877 | stackoverflow.com/users/1011995/daniel-fischer |
| 3 | Why is conditional processing of a sorted array faster than of an unsorted array? | stackoverflow.com | 3,860 | No | WiSaGaN | 48,437 | java, c++, performance, cpu-architecture | The reason why performance improves drastically when the data is sorted is that the branch prediction penalty is removed, as explained beautifully in Mysticial's answer . Now, if we look at the code if (data[c] >= 128) sum += data[c]; we can find that the meaning of this… | CC BY-SA 4.0 | Jun 28, 2012 | Jul 3, 2022 | Jul 3, 2022 | stackoverflow.com/questions/11227809/why-is-conditional-processing-of-a-sorted-array-faster-than-of-an-unsorted-array/11237235 | stackoverflow.com/users/866732/wisagan |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- Stack Exchange allows 300 requests a day per address without a key, shared with everyone calling from that address; when it is used up the run stops with a note. Up to 100 questions on one site go in a single request, so send links in batches.
- Answers come highest score first within each group of up to 100 questions on the same site, and each group returns at most 2,500 answers; question_id ties every answer to its question.
- text_excerpt holds only the first 500 characters of the answer in plain text, and only with include_text; open url for the full answer.
- With no links, the newest answers on site are returned, up to 2,500 per run.
- Deleted answers and answers to deleted questions are not returned. Scores, dates and reputation are as of the time of the run.
- Answers are licensed CC BY-SA by their authors: credit the author (author_display_name and author_url) and link to the answer (url) when you publish them.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.