Jira Alternative With a Better API
Linear is a project management tool loved by startups. Free for teams up to 250 issues. Their GraphQL API is clean and well-documented.
Setup
import requests
API_KEY = "lin_api_your_key" # Settings > API > Personal API Keys
HEADERS = {"Authorization": API_KEY, "Content-Type": "application/json"}
List Your Issues
def my_issues():
query = """{ issues(filter: { assignee: { isMe: { eq: true } } }) { nodes { title state { name } priority createdAt } } }"""
r = requests.post("https://api.linear.app/graphql",
headers=HEADERS, json={"query": query})
return r.json()["data"]["issues"]["nodes"]
for issue in my_issues():
print(f"[{issue[state][name]}] {issue[title]}")
Create an Issue
def create_issue(title, team_id, description="", priority=0):
mutation = """mutation($input: IssueCreateInput!) { issueCreate(input: $input) { success issue { id title url } } }"""
variables = {"input": {"title": title, "teamId": team_id, "description": description, "priority": priority}}
r = requests.post("https://api.linear.app/graphql",
headers=HEADERS, json={"query": mutation, "variables": variables})
return r.json()["data"]["issueCreate"]["issue"]
issue = create_issue("Fix login bug", "team-id-here", "Users report 500 error on login")
print(f"Created: {issue[url]}")
Search Issues
def search_issues(query_text):
query = """query($q: String!) { searchIssues(term: $q, first: 10) { nodes { title state { name } team { name } } } }"""
r = requests.post("https://api.linear.app/graphql",
headers=HEADERS, json={"query": query, "variables": {"q": query_text}})
return r.json()["data"]["searchIssues"]["nodes"]
Real Use Cases
- CLI tool — create/manage issues from terminal
- Slack bot — create issues from Slack messages
- GitHub integration — auto-link PRs to issues
- Sprint reports — query completed issues per week
- Triage automation — auto-assign issues by label
Linear vs Jira API
| Feature | Linear | Jira |
|---|---|---|
| API type | GraphQL | REST |
| Auth | API key | OAuth 2.0 |
| Documentation | Excellent | Complex |
| Rate limit | 400/min | Varies |
| Free tier | 250 issues | 10 users |
More from me: 10 Dev Tools I Use Daily | 77 Scrapers on a Schedule | 150+ Free APIs
Top comments (0)